An identifier, terminal $\mathsf{id}$, consists of a lowercase letter, which is followed by any number of upper or lowercase letters or the prime character (apostrophe).
A number, terminal $\mathsf{num}$, consists of a non-empty sequence of digits.
The while keyword, terminal $\mathsf{while}$, consists of the string “while”.
A left parenthesis, terminal $\mathsf{lparen}$, consists of the single character ‘)’.
The assignment symbol, terminal $\mathsf{assn}$, consists of the string “<-“.
The plus symbol, terminal $\mathsf{plus}$, consists of the character ‘+’.