From 98c6af780efded6bed75dc9af397b93ce95a3e14 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 31 Mar 2017 17:02:14 +0200 Subject: [PATCH] grammar update --- doc/grammar.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/grammar.txt b/doc/grammar.txt index 47f7391747..c70a6737fd 100644 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -10,7 +10,7 @@ operator = OP0 | OP1 | OP2 | OP3 | OP4 | OP5 | OP6 | OP7 | OP8 | OP9 prefixOperator = operator optInd = COMMENT? optPar = (IND{>} | IND{=})? -simpleExpr = arrowExpr (OP0 optInd arrowExpr)* +simpleExpr = arrowExpr (OP0 optInd arrowExpr)* pragma? arrowExpr = assignExpr (OP1 optInd assignExpr)* assignExpr = orExpr (OP2 optInd orExpr)* orExpr = andExpr (OP3 optInd andExpr)* @@ -23,8 +23,6 @@ mulExpr = dollarExpr (OP9 optInd dollarExpr)* dollarExpr = primary (OP10 optInd primary)* symbol = '`' (KEYW|IDENT|literal|(operator|'('|')'|'['|']'|'{'|'}'|'=')+)+ '`' | IDENT | 'addr' | 'type' -indexExpr = expr -indexExprList = indexExpr ^+ comma exprColonEqExpr = expr (':'|'=' expr)? exprList = expr ^+ comma dotExpr = expr '.' optInd symbol @@ -194,7 +192,7 @@ complexOrSimpleStmt = (ifStmt | whenStmt | whileStmt | 'converter' routine | 'type' section(typeDef) | 'const' section(constant) - | ('let' | 'var') section(variable) + | ('let' | 'var' | 'using') section(variable) | bindStmt | mixinStmt) / simpleStmt stmt = (IND{>} complexOrSimpleStmt^+(IND{=} / ';') DED)