daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. grammar antmath1;
  2.  
  3. expr
  4.     :   '(' expr ')'                         # parensExpr
  5.     |   op=('+'|'-') expr                    # unaryExpr
  6.     |   left=expr op=('*'|'/') right=expr    # infixExpr
  7.     |   left=expr op=('+'|'-') right=expr    # infixExpr
  8.     |   value=NUM                            # numberExpr
  9.     ;
  10.  
  11. NUM :   [0-9]+;
  12. WS  :   [ trn] -> channel(HIDDEN);
  13.    
  14. grammar antmath;
  15.  
  16. expr
  17.     :   '(' expr ')'                         # parensExpr
  18.     |   left=expr op=('*'|'/') right=expr    # infixExpr
  19.     |   left=expr op=('+'|'-') right=expr    # infixExpr
  20.     |   op=('+'|'-') expr                    # unaryExpr
  21.     |   value=NUM                            # numberExpr
  22.     ;
  23.  
  24. NUM :   [0-9]+;
  25. WS  :   [ trn] -> channel(HIDDEN);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top