]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar
(refs #6924) Support for record field access syntax.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / parsing / parser / SCL.grammar
index 0312cf6f8819658e0a88b41a88e86565e63acc71..7551271af416cd323ab16f89e45d6d7a2bdfe4d1 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
@@ -119,7 +120,6 @@ ruleDeclaration
  */
  
 exp = bexp (HASTYPE type)?                                   # LocalTypeAnnotation, shift HASTYPE, shift COLON
-    | bexp COLON ID WITH? queryBlock?                        # EntityTypeAnnotation, shift LBRACE, shift WITH
     ;
 
 bexp 
@@ -323,4 +323,5 @@ symbolWithoutMinus
 /******************************************************************************
  * Auxiliary tokens
  */
-dummy = COMMENT EOL ;
\ No newline at end of file
+dummy = COMMENT EOL                                          # Dummy 
+      ;
\ No newline at end of file