Skip to content

Instantly share code, notes, and snippets.

@sebersole
Created December 12, 2011 20:18
Show Gist options
  • Save sebersole/1468905 to your computer and use it in GitHub Desktop.
Save sebersole/1468905 to your computer and use it in GitHub Desktop.
logicalExpression
: logicalOrExpression
;
logicalOrExpression
: logicalAndExpression ( or^ logicalAndExpression )*
;
logicalAndExpression
: negatedExpression ( and^ negatedExpression )*
;
negatedExpression
: NOT^ negatedExpression
| groupedLogicalExpression
;
groupedLogicalExpression
: LPAREN! relationalExpression RPAREN!
| relationalExpression
;
relationalExpression
: ... // equals, less-than, etc
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment