grammar update
This commit is contained in:
parent
529609f7ed
commit
98c6af780e
1 changed files with 2 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ operator = OP0 | OP1 | OP2 | OP3 | OP4 | OP5 | OP6 | OP7 | OP8 | OP9
|
||||||
prefixOperator = operator
|
prefixOperator = operator
|
||||||
optInd = COMMENT?
|
optInd = COMMENT?
|
||||||
optPar = (IND{>} | IND{=})?
|
optPar = (IND{>} | IND{=})?
|
||||||
simpleExpr = arrowExpr (OP0 optInd arrowExpr)*
|
simpleExpr = arrowExpr (OP0 optInd arrowExpr)* pragma?
|
||||||
arrowExpr = assignExpr (OP1 optInd assignExpr)*
|
arrowExpr = assignExpr (OP1 optInd assignExpr)*
|
||||||
assignExpr = orExpr (OP2 optInd orExpr)*
|
assignExpr = orExpr (OP2 optInd orExpr)*
|
||||||
orExpr = andExpr (OP3 optInd andExpr)*
|
orExpr = andExpr (OP3 optInd andExpr)*
|
||||||
|
|
@ -23,8 +23,6 @@ mulExpr = dollarExpr (OP9 optInd dollarExpr)*
|
||||||
dollarExpr = primary (OP10 optInd primary)*
|
dollarExpr = primary (OP10 optInd primary)*
|
||||||
symbol = '`' (KEYW|IDENT|literal|(operator|'('|')'|'['|']'|'{'|'}'|'=')+)+ '`'
|
symbol = '`' (KEYW|IDENT|literal|(operator|'('|')'|'['|']'|'{'|'}'|'=')+)+ '`'
|
||||||
| IDENT | 'addr' | 'type'
|
| IDENT | 'addr' | 'type'
|
||||||
indexExpr = expr
|
|
||||||
indexExprList = indexExpr ^+ comma
|
|
||||||
exprColonEqExpr = expr (':'|'=' expr)?
|
exprColonEqExpr = expr (':'|'=' expr)?
|
||||||
exprList = expr ^+ comma
|
exprList = expr ^+ comma
|
||||||
dotExpr = expr '.' optInd symbol
|
dotExpr = expr '.' optInd symbol
|
||||||
|
|
@ -194,7 +192,7 @@ complexOrSimpleStmt = (ifStmt | whenStmt | whileStmt
|
||||||
| 'converter' routine
|
| 'converter' routine
|
||||||
| 'type' section(typeDef)
|
| 'type' section(typeDef)
|
||||||
| 'const' section(constant)
|
| 'const' section(constant)
|
||||||
| ('let' | 'var') section(variable)
|
| ('let' | 'var' | 'using') section(variable)
|
||||||
| bindStmt | mixinStmt)
|
| bindStmt | mixinStmt)
|
||||||
/ simpleStmt
|
/ simpleStmt
|
||||||
stmt = (IND{>} complexOrSimpleStmt^+(IND{=} / ';') DED)
|
stmt = (IND{>} complexOrSimpleStmt^+(IND{=} / ';') DED)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue