;
declaration
- = var (COMMA var)* HASTYPE type # TypeAnnotation
+ = MODULE LBRACE (field (COMMA field)*)? RBRACE # ModuleHeader
+ | var (COMMA var)* HASTYPE type # TypeAnnotation
| bexp rhs # ValueDefinition
| DATA ID+ (EQUALS constructor (BAR constructor)*)? # DataDefinition
| TYPE ID+ EQUALS type # TypeDefinition
WHERE ruleDeclarations # RuleDefinition
| MAPPING_RELATION ID atype* # MappingRelationDefinition
| bexp FOLLOWS ruleDeclarations # RelationDefinition
+ | RULESET ID WHERE statements # RulesetDefinition
;
import
*/
exp = bexp (HASTYPE type)? # LocalTypeAnnotation, shift HASTYPE, shift COLON
- | bexp COLON ID WITH? queryBlock? # EntityTypeAnnotation, shift LBRACE, shift WITH
;
bexp
| exp FOLLOWS queryBlock # RuleStatement
| chrQuery IMPLIES chrQuery # CHRStatement
| WHEN verboseChrQuery THEN_AFTER_WHEN verboseChrQuery # VerboseCHRStatement
- | CONSTRAINT ID atype* # ConstraintStatement
+ | CONSTRAINT constructor # ConstraintStatement
+ | INCLUDE ID aexp # LocalInclude
;
chrQuery
/******************************************************************************
* Auxiliary tokens
*/
-dummy = COMMENT EOL ;
\ No newline at end of file
+dummy = COMMENT EOL # Dummy
+ ;
\ No newline at end of file