expressions ?! how ?
[email protected] (raptor) Tue, 29 Jul 2003 00:00:23 +0300
| Newsgroups | perl.recdescent |
|---|---|
| Message-ID | <[email protected]> |
expression : andExpr 'or' expression | andExpr #{ "$item[1] $item[2]"}
andExpr : notExpr 'and' andExpr | notExpr
notExpr : 'not' brackExpr | brackExpr
brackExpr : '(' expression ')' | comparison
comparison : identifier compType identifier { "$item[1] $item[2] $item[3]\n" }
compType : '=' | '>' | '<' | '>=' | '<='
identifier : fieldName | number
fieldName : /[a-z]+/
number : /\d+/
fieldx > 3 or fieldy < 12
i get "fieldx > 3"
fieldx > 3 or fieldy < 12 and fieldX = 32
i get nothing... what is my problem ?! i got the example from Parse::RecDescent docs and extended it with "comparison"..
what i'm doing wrong... seems i can't figure out the recusrion
tia
raptor