Created
June 11, 2009 00:36
-
-
Save besquared/127619 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grammar Where | |
| rule expression | |
| '(' space expression space ')' / conjoined | |
| end | |
| rule conjoined | |
| primary space conjunction space expression / primary | |
| end | |
| rule conjunction | |
| 'and'* / 'or'* | |
| end | |
| rule primary | |
| '(' space primary space ')' / condition | |
| end | |
| rule condition | |
| dimension space operator space value | |
| end | |
| rule operator | |
| (eq / neq / lte / lt / gte / gt) | |
| end | |
| rule value | |
| (real_value / whole_value / string_value) | |
| end | |
| rule eq | |
| '=' | |
| end | |
| rule neq | |
| '<>' | |
| end | |
| rule lte | |
| '<=' | |
| end | |
| rule gte | |
| '>=' | |
| end | |
| rule lt | |
| '<' | |
| end | |
| rule gt | |
| '>' | |
| end | |
| rule real_value | |
| whole_value '.' [0-9]* | |
| end | |
| rule whole_value | |
| [1-9] [0-9]* | |
| end | |
| rule string_value | |
| "'" (!"'" .)* "'" | |
| end | |
| rule dimension | |
| [\w\_0-9]+ | |
| end | |
| rule space | |
| ' '* | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment