Class CAExpressions

java.lang.Object
com.io7m.cardant.parsers.CAExpressions
Direct Known Subclasses:
CAConstraintExpressions, CADescriptionMatchExpressions, CAItemLocationMatchExpressions, CAItemSerialMatchExpressions, CAMediaTypeMatchExpressions, CAMetadataExpressions, CAMetadataMatchExpressions, CANameMatchExpressions, CATypeMatchExpressions

public abstract class CAExpressions extends Object
The base type of expression parsers.
  • Constructor Details

    • CAExpressions

      protected CAExpressions(CAStrings inStrings)
  • Method Details

    • serialize

      public static String serialize(com.io7m.jsx.SExpressionType expression) throws CAException
      Serialize an expression to a string.
      Parameters:
      expression - The expression
      Returns:
      The serialized expression
      Throws:
      CAException - On errors
    • parse

      public static com.io7m.jsx.SExpressionType parse(String text) throws CAException
      Parse text as an s-expression.
      Parameters:
      text - The text
      Returns:
      The parsed expression
      Throws:
      CAException - On errors
    • syntax

      protected abstract Map<CAStringConstantType,CAStringConstantType> syntax()
    • createParseError

      protected final CAException createParseError(com.io7m.jsx.SExpressionType expression)
    • createParseError

      protected final CAException createParseError(com.io7m.jsx.SExpressionType expression, Exception e)