Commits

trijezdci committed bc8cb8e

fixed copy-paste errors in syntax diagram generator script

Comments (0)

Files changed (1)

_GRAMMAR/modula2_syntax_diagrams.tcl

 #!/usr/bin/wish
 #
-# Syntax diagram generator for Modula-2 (R10), status Oct 14, 2012
+# Syntax diagram generator for Modula-2 (R10), status Oct 15, 2012
 #
 # This script is derived from the SQLite project's bubble-generator script.
 # It is quite possibly the only such tool that can wrap-around diagrams so
   requiredTypeDefinitionTEST {
       line TYPE = {loop permittedTypeDef ,} {opt := {loop protoliteral ,}}
   }
- permittedTypeDef {
+  permittedTypeDef {
     or RECORD { line OPAQUE {optx RECORD}}
   }
   protoliteral {
       /NEW /DISPOSE /RETAIN /RELEASE /SXF /VAL
   }
   formalParamList {
-    loop formalParams ,
+    loop formalParams ;
   }
   formalParams {
     line {or simpleFormalParams variadicFormalParams}
     }
   }
   statementSequence {
-    loop statement ,
+    loop statement ;
   }
   assignmentOrProcedureCall {
     line designator {
       {line {optx ELSE statementSequence} END}
   }
   caseStatement {
-      line CASE expression OF {loop case ,}
+      line CASE expression OF {loop case |}
       {optx ELSE statementSequence} END
   }
   case {
         ( inPragmaExpression )}
       {line {or /MIN /MAX} ( {loop inPragmaExpression ,} )}
   }
+  pragmaFORWARD {
+    line <* FORWARD {or {line TYPE Ident} procedureHeader} *>
+  }
   Ident {
     line {or _ $ Letter} {optx {loop {or _ $ Letter Digit} {}}}
   }