In progress:
set_func-> set id( args ) = statements
any_exp -> bool_exp | set_exp | mod_exp
bool_exp -> (bool_exp bool_op bool_exp) | exp op exp | true | false | null
set_exp -> SET id = any_exp
mod_exp -> exp (MOD exp)
exp -> exp + factor | exp - factor
factor -> factor * fact | factor / fact | factor % fact
fact -> fac ^ fact
fac -> term !
term -> (exp) | real | id | id( in_args )
op -> = | != | >= | <= | < | >
bool_op -> || &
statements -> while bool_exp { statements }
statements -> if bool_exp { statements } (else{ statements })?
statements -> set_exp;
statements -> return exp;
statements -> print exp;
----------------------
PRINT
RETURN
SET
IF
WHILE
LPAREN
RPAREN
LBRACK
RBRACK
LSQ
RSQ
EXP
ADD
SUB
DIV
MUL
FACTORIAL
OR
AND
EQUAL
NEQUAL
GT
LT
GEQ
LEQ
MOD
REMAIN
REAL = (0-9)*.?(0-9)*
ID = (A-Z | a-z) (A-Z | a-z | 0-9 | _)*
set_func-> set id( args ) = statements
any_exp -> bool_exp | set_exp | mod_exp
bool_exp -> (bool_exp bool_op bool_exp) | exp op exp | true | false | null
set_exp -> SET id = any_exp
mod_exp -> exp (MOD exp)
exp -> exp + factor | exp - factor
factor -> factor * fact | factor / fact | factor % fact
fact -> fac ^ fact
fac -> term !
term -> (exp) | real | id | id( in_args )
op -> = | != | >= | <= | < | >
bool_op -> || &
statements -> while bool_exp { statements }
statements -> if bool_exp { statements } (else{ statements })?
statements -> set_exp;
statements -> return exp;
statements -> print exp;
----------------------
RETURN
SET
IF
WHILE
LPAREN
RPAREN
LBRACK
RBRACK
LSQ
RSQ
EXP
ADD
SUB
DIV
MUL
FACTORIAL
OR
AND
EQUAL
NEQUAL
GT
LT
GEQ
LEQ
MOD
REMAIN
REAL = (0-9)*.?(0-9)*
ID = (A-Z | a-z) (A-Z | a-z | 0-9 | _)*