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