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=6bcffa14789b96542b16cccf2a5bbf8d7163f0c7;hb=6d233d1b05176e40f634766537082d2a2ec65fd0;hpb=649890ad306df48440a97893d7d53fb8a6386a4e 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 6bcffa147..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