Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grammar SecondTask;
- !expr
- : dis expr
- ;
- exprs
- : XOR expr
- |
- ;
- dis
- : con dis
- ;
- diss
- : OR dis
- |
- ;
- con
- : nott cons
- ;
- cons
- : AND con
- |
- ;
- nott
- : VAR
- | NOT nott
- | LBR expr RBR
- ;
- LBR : '\b[(]\b';
- RBR : '\b[)]\b';
- NOT : '\bnot\b';
- AND : '\band\b';
- OR : '\bor\b';
- XOR : '\bxor\b';
- VAR : '\b[a-z]\b';
- WS -> '[ \t\r\n]';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement