goyacc: filter expr of micsoft restful api ; yacc lex
实现以下表达式语法解析
Operator | Description | Example |
---|---|---|
Comparison Operators | ||
eq | Equal | city eq 'Redmond' |
ne | Not equal | city ne 'London' |
gt | Greater than | price gt 20 |
ge | Greater than or equal | price ge 10 |
lt | Less than | price lt 20 |
le | Less than or equal | price le 100 |
Logical Operators | ||
and | Logical and | price le 200 and price gt 3.5 |
or | Logical or | price le 3.5 or price gt 200 |
not | Logical negation | not price le 3.5 |
Grouping Operators | ||
( ) | Precedence grouping | (priority eq 1 or city eq 'Redmond') and price gt 100 |