Advertisement
DrBoat

Untitled

Jan 28th, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. grammar SecondTask;
  2.  
  3. !expr
  4. : dis expr
  5. ;
  6.  
  7. exprs
  8. : XOR expr
  9. |
  10. ;
  11.  
  12. dis
  13. : con dis
  14. ;
  15.  
  16. diss
  17. : OR dis
  18. |
  19. ;
  20.  
  21. con
  22. : nott cons
  23. ;
  24.  
  25. cons
  26. : AND con
  27. |
  28. ;
  29.  
  30. nott
  31. : VAR
  32. | NOT nott
  33. | LBR expr RBR
  34. ;
  35.  
  36.  
  37.  
  38. LBR : '\b[(]\b';
  39. RBR : '\b[)]\b';
  40. NOT : '\bnot\b';
  41. AND : '\band\b';
  42. OR : '\bor\b';
  43. XOR : '\bxor\b';
  44. VAR : '\b[a-z]\b';
  45.  
  46. WS -> '[ \t\r\n]';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement