program declarations statements statements |
declarations declaration ';' declarations declaration ';' |
declaration INT idlist STRING idlist |
statements statement ';' statements statement |
statement ID '=' expression P expression |
expression term '+' expression term |
term factor '*' term factor |
factor '(' expression ')' ID NUM STR |
idlist ID ',' idlist ID |