%semantic token '+' '-' '*' '?' %syntactic token '[' ']' %token NUM = /\d+/ %% s: s '+' | s '-' | s '*' | s '?' | s '[' ']' | NUM ; %%