]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar
Added module header feature to SCL language.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / parsing / parser / SCL.grammar
index 0312cf6f8819658e0a88b41a88e86565e63acc71..8ff94fd4b8f4db278f4f79f3b57010219f362a90 100644 (file)
@@ -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
@@ -323,4 +324,5 @@ symbolWithoutMinus
 /******************************************************************************
  * Auxiliary tokens
  */
-dummy = COMMENT EOL ;
\ No newline at end of file
+dummy = COMMENT EOL                                          # Dummy 
+      ;
\ No newline at end of file