Mini PASCAL Grammar
Key
ALL_CAPS
Non-Terminals
lower case and symbols
Terminals (Tokens)
|
grammar metasymbol OR
Ab | c ==Ab
Ac
{ term, term, .. }
Select1Set
PROGRAM programid; DECLARATIONS CMPD_STMT.
period
ID_LIST idID_LIST_END
ID_LIST_END , ID_LIST |
DECLARATIONS var ID_LIST :TYPE ; DECLARATIONS|
TYPE integer |
real|
string
CMPD_STMT beginOPT_STMTSend
OPT_STMTS|
STMT_LIST
STMT_LIST STMT STMT_LIST_END
STMT_LIST_END ;STMT_LIST |
STMT id:= EXPR|
CMPD_STMT |
if COND then STMT else STMT|
while COND do STMT
CONDEXPRRELOP EXPR
EXPR VAL EXPR_END
EXPR_END ARITH_OPVALEXPR_END|
ARITH_OP + |
|
* |
/
RELOP <| <= | >|
>= |
<> |
=
VAL id |
int_lit|
real_lit|
char_lit|
( EXPR )|
SIGN VAL
SIGN + |
Reviews
There are no reviews yet.