Skip to content
ccckmit edited this page Jan 18, 2019 · 1 revision

X0 共用語法

LIST<X>  = X (, X)*
VAR      = type LIST<id>
WHILE    = while (E) STMT
IF       = if (E) STMT (else STMT)?
BLOCK    = { LIST(LIST<VAR> STMT* }
RETURN   = return E;
CALL     = id ( LIST<E> )
STMT     = WHILE | IF | BLOCK | RETURN | (ASSIGN | CALL);
E        = F (op F)*
F        = (E) | Number | Literal | [++ -- &*+-~!]? Id [E]* | CALL
Clone this wiki locally