Update grammar

This commit is contained in:
Bartłomiej Pluta
2019-07-10 14:22:39 +02:00
parent 578141c7b8
commit 823c5cb18f

View File

@@ -9,7 +9,8 @@ PITCH_MODIFIER = 'b' | '#'
<string> ::= '"' CHAR* '"' <string> ::= '"' CHAR* '"'
<note> ::= '@' PITCH PITCH_MODIFIER? DIGIT? [':' DIGIT+ 'd'?]? <note> ::= '@' PITCH PITCH_MODIFIER? DIGIT? [':' DIGIT+ 'd'?]?
<identifier> ::= ID [ID|DIGIT]* <identifier> ::= ID [ID|DIGIT]*
<type> ::= 'integer' | 'string' | 'note' | 'list' | 'void' <bool> ::= 'true' | 'false'
<type> ::= 'integer' | 'string' | 'note' | 'list' | 'map' | 'sound' | 'bool' | 'void'
# Parser # Parser
<expr> ::= <integer> <access> | <integer> <expr> ::= <integer> <access> | <integer>
@@ -18,9 +19,10 @@ PITCH_MODIFIER = 'b' | '#'
<expr> ::= <identifier> <access> | <identifier> '=' <expr> | <functionCall> | <identifier> <expr> ::= <identifier> <access> | <identifier> '=' <expr> | <functionCall> | <identifier>
<expr> ::= <list> <access> | <list> <expr> ::= <list> <access> | <list>
<expr> ::= <map> <access> | <map> <expr> ::= <map> <access> | <map>
<expr> ::= <bool> <access> | <bool>
<expr> ::= <expr> '.' <identifier> | <expr> '.' <functionCall> <expr> ::= <expr> '.' <identifier> | <expr> '.' <functionCall>
<expr> ::= <asteriskExpr> '*' <expr> <expr> ::= <asteriskExpr> '*' <expr>
<asteriskExpr> ::= <integer> | <string> | <note> | <identifier> | <list> <asteriskExpr> ::= <integer> | <string> | <note> | <identifier> | <list> | <map>
<functionCall> ::= <identifier> <arglist> <functionCall> ::= <identifier> <arglist>