> 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
Did you turn on the various diagnostics listed in the synopsis? $::RD_ERRORS # unless undefined, report fatal errors $::RD_WARN # unless undefined, also report non-fatal problems $::RD_HINT # if defined, also suggestion remedies $::RD_TRACE # if defined, also trace parsers' behaviour Yves