X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Finternal%2Fparsing%2Fparser%2FSCL.grammar;h=f7ea1b263617cee6eae8dbc4e5dda34139e10e45;hp=0312cf6f8819658e0a88b41a88e86565e63acc71;hb=6d233d1b05176e40f634766537082d2a2ec65fd0;hpb=593a8f75d9dbc363234002dc500c346afbeba040 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar index 0312cf6f8..f7ea1b263 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar @@ -33,7 +33,8 @@ declarations ; 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 @@ -54,6 +55,7 @@ declaration WHERE ruleDeclarations # RuleDefinition | MAPPING_RELATION ID atype* # MappingRelationDefinition | bexp FOLLOWS ruleDeclarations # RelationDefinition + | RULESET ID WHERE statements # RulesetDefinition ; import @@ -119,7 +121,6 @@ ruleDeclaration */ exp = bexp (HASTYPE type)? # LocalTypeAnnotation, shift HASTYPE, shift COLON - | bexp COLON ID WITH? queryBlock? # EntityTypeAnnotation, shift LBRACE, shift WITH ; bexp @@ -199,7 +200,8 @@ statement | 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 @@ -323,4 +325,5 @@ symbolWithoutMinus /****************************************************************************** * Auxiliary tokens */ -dummy = COMMENT EOL ; \ No newline at end of file +dummy = COMMENT EOL # Dummy + ; \ No newline at end of file