X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=src%2Fgrammar.txt;h=ab2e4dbe4c8962f4e3608ae0449913d039e93d44;hb=d1e64de8a0cc6c01fba1a3dc17686f9539bf5744;hp=697cca2099bea5c9c05d08eab52d1faeb9961056;hpb=e9aeda311db78b06a23aa398e18f687cccd67d0d;p=cc1516.git diff --git a/src/grammar.txt b/src/grammar.txt index 697cca2..ab2e4db 100644 --- a/src/grammar.txt +++ b/src/grammar.txt @@ -1,35 +1,27 @@ - ::= - - - ::= '+' - - ::= ['%' ] - - ::= [('+' | '-') ] - - ::= ['*' | '/' | '%'] ] - + ::= [':' ] + ::= ['||' ] + ::= ['&&' ] + ::= [('==' | '<' | '>' | '<=' | '>=' | '!=') ] + ::= (('+' | '-') )* + ::= ('*' | '/' | '%'] )* ::= ['hd'|'tl'|'fst'|'snd] - | - | - | - | 'False' - | 'True' - | '(' ')' - | '(' [] ')' - | '[]' - | '(' ',' ')' - - ::= '+' | '-' | '*' | '/' | '%' | '==' | '<' | '>' | '<=' | '>=' - | '!=' | '&&' | '||' | ':' - - ::= [',' ActArgs] - - ::= ( | 'var') '=' ';' - - ::= 'Int' - | 'Bool' - | 'Char' - | '(' Type ',' Type ')' - | '[' Type ']' - | + | + | + | + | 'False' + | 'True' + | '(' ')' + | '(' [] ')' + | '[]' + | '(' ',' ')' + + ::= [',' ActArgs] + + ::= ( | 'var') '=' ';' + + ::= 'Int' + | 'Bool' + | 'Char' + | '(' Type ',' Type ')' + | '[' Type ']' + |