# Class CAExpressions

java.lang.Object
com.io7m.cardant.parsers.CAExpressions

All Implemented Interfaces:
  `CASyntaxType`

Direct Known Subclasses:
  `CADescriptionMatchExpressions`, `CAItemIDMatchExpressions`, `CAItemLocationMatchExpressions`, `CAItemSerialMatchExpressions`, `CAMediaTypeMatchExpressions`, `CAMetadataConstraintExpressions`, `CAMetadataExpressions`, `CAMetadataFieldMatchExpressions`, `CAMetadataMatchExpressions`, `CAMetadataPackageMatchExpressions`, `CAMetadataTypeMatchExpressions`, `CAModelSyntax`, `CANameMatchFuzzyExpressions`, `CATypeMatchExpressions`

public abstract class CAExpressions extends Object implements CASyntaxType
The base type of expression parsers.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `CAExpressions(CAStrings inStrings)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected final CAException`
  `createParseError(com.io7m.jsx.SExpressionType expression)`
  `protected final CAException`
  `createParseError(com.io7m.jsx.SExpressionType expression, Exception e)`
  `static com.io7m.jsx.SExpressionType`
  `parse(String text)`
  Parse text as an s-expression.
  `protected final CASyntaxRuleType`
  `ruleBranch(CAStringConstantType name, List<CAStringConstantType> subRules, List<CAStringConstantType> examples)`
  `protected final CASyntaxRuleType`
  `ruleLeaf(CAStringConstantType name, CAStringConstantType text)`
  `protected final CASyntaxRuleType`
  `ruleLeafWithExamples(CAStringConstantType name, CAStringConstantType text, List<CAStringConstantType> examples)`
  `static String`
  `serialize(com.io7m.jsx.SExpressionType expression)`
  Serialize an expression to a string.
  `protected final CAStrings`
  `strings()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.io7m.cardant.parsers.CASyntaxType

  `syntaxRules`

- ## Constructor Details

  - ### CAExpressions

    protected CAExpressions(CAStrings inStrings)

- ## Method Details

  - ### strings

    protected final CAStrings strings()

  - ### 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

  - ### createParseError

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

  - ### createParseError

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

  - ### ruleLeaf

    protected final CASyntaxRuleType ruleLeaf(CAStringConstantType name, CAStringConstantType text)

  - ### ruleLeafWithExamples

    protected final CASyntaxRuleType ruleLeafWithExamples(CAStringConstantType name, CAStringConstantType text, List<CAStringConstantType> examples)

  - ### ruleBranch

    protected final CASyntaxRuleType ruleBranch(CAStringConstantType name, List<CAStringConstantType> subRules, List<CAStringConstantType> examples)