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
The base type of expression parsers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final CAExceptioncreateParseError(com.io7m.jsx.SExpressionType expression) protected final CAExceptioncreateParseError(com.io7m.jsx.SExpressionType expression, Exception e) static com.io7m.jsx.SExpressionTypeParse text as an s-expression.protected final CASyntaxRuleTyperuleBranch(CAStringConstantType name, List<CAStringConstantType> subRules, List<CAStringConstantType> examples) protected final CASyntaxRuleTyperuleLeaf(CAStringConstantType name, CAStringConstantType text) protected final CASyntaxRuleTyperuleLeafWithExamples(CAStringConstantType name, CAStringConstantType text, List<CAStringConstantType> examples) static Stringserialize(com.io7m.jsx.SExpressionType expression) Serialize an expression to a string.protected final CAStringsstrings()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.io7m.cardant.parsers.CASyntaxType
syntaxRules
-
Constructor Details
-
CAExpressions
-
-
Method Details
-
strings
-
serialize
Serialize an expression to a string.- Parameters:
expression- The expression- Returns:
- The serialized expression
- Throws:
CAException- On errors
-
parse
Parse text as an s-expression.- Parameters:
text- The text- Returns:
- The parsed expression
- Throws:
CAException- On errors
-
createParseError
-
createParseError
-
ruleLeaf
-
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)
-