Home » 2016 » February » 25

'toy3 - GUI version/24.2.2016 mod by Aurel
' Grammar:
'
'pgm = {int_decl} stmt_seq .
'int_decl = "integer" ident {"," ident} .
'stmt_seq = {print_stmt | halt_stmt | while_stmt | assign | if_stmt} .
'print_stmt = "print" (string | expr) {, (string | expr) } .
'halt_stmt = "halt" .
'while_stmt = "while" expr "do" stmt_seq "end" "while" .
'assign = ident "=" expr .
'if_stmt = "if" expr "then" stmt_seq ["else" stmt_seq] "end" "if" .
'exp    = orexp .
'orexp  = andexp {"or" andexp} .
'andexp = eqlexp {"and" eqlexp} .
'eqlexp = relexp {eqlop relexp} .
'relexp = addexp {relop addexp} .
'addexp = mulexp {addop mulexp} .
'mulexp = factor {mulop ... Read more »

Views: 103 | Added by: Zlatko | Date: 2016-02-25 | Comments (0)