summary refs log tree commit diff stats
path: root/doc/grammar.txt
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-11 18:17:39 +0200
committerAraq <rumpf_a@web.de>2012-07-11 18:17:39 +0200
commitb4a9aca2d391f5baa4293444135a98a816ebc043 (patch)
treeba44c9fb27cd909d18b63bb340ab79411cb62012 /doc/grammar.txt
parent6074a9c129677cd7846309d02479d7bea684672f (diff)
downloadNim-b4a9aca2d391f5baa4293444135a98a816ebc043.tar.gz
';' now valid for parameter lists
Diffstat (limited to 'doc/grammar.txt')
-rwxr-xr-xdoc/grammar.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt
index 4dcb2d3f8..f378cd140 100755
--- a/doc/grammar.txt
+++ b/doc/grammar.txt
@@ -1,6 +1,8 @@
 module ::= ([COMMENT] [SAD] stmt)*
 
 comma ::= ',' [COMMENT] [IND]
+semicolon ::= ';' [COMMENT] [IND]
+
 operator ::=  OP0 | OP1 | OP2 | OP3 | OP4 | OP5 | OP6 | OP7 | OP8 | OP9
            | 'or' | 'xor' | 'and'
            | 'is' | 'isnot' | 'in' | 'notin' | 'of'
@@ -141,14 +143,14 @@ fromStmt ::= 'from' filename 'import' symbol (comma symbol)*
 pragma ::= '{.' optInd (colonExpr [comma])* optPar ('.}' | '}')
 
 param ::= symbol (comma symbol)* (':' typeDesc ['=' expr] | '=' expr)
-paramList ::= ['(' [param (comma param)*] optPar ')'] [':' typeDesc]
+paramList ::= ['(' [param (comma|semicolon param)*] optPar ')'] [':' typeDesc]
 
 genericConstraint ::= 'object' | 'tuple' | 'enum' | 'proc' | 'ref' | 'ptr' 
                     | 'var' | 'distinct' | primary
 genericConstraints ::= genericConstraint ( '|' optInd genericConstraint )*
 
 genericParam ::= symbol [':' genericConstraints] ['=' expr]
-genericParams ::= '[' genericParam (comma genericParam)* optPar ']'
+genericParams ::= '[' genericParam (comma|semicolon genericParam)* optPar ']'
 
 
 routineDecl := symbol ['*'] [genericParams] paramList [pragma] ['=' stmt]
@@ -180,7 +182,7 @@ objectCase ::= 'case' expr ':' typeDesc [COMMENT]
 
 objectPart ::= objectWhen | objectCase | objectIdentPart | 'nil'
              | indPush objectPart (SAD objectPart)* DED indPop
-tupleDesc ::= '[' optInd [param (comma param)*] optPar ']'
+tupleDesc ::= '[' optInd [param (comma|semicolon param)*] optPar ']'
 
 objectDef ::= 'object' [pragma] ['of' typeDesc] objectPart
 enumField ::= symbol ['=' expr]