in reply to •Re: Parse::RecDescent and mini-language parsing
in thread Parse::RecDescent and mini-language parsing

Wow, this certainly seems more efficient, I'll start messing around with it and see what I can come up with. Thanks!



My code doesn't have bugs, it just develops random features.

Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)

  • Comment on Re: •Re: Parse::RecDescent and mini-language parsing

Replies are listed 'Best First'.
•Re: Re: •Re: Parse::RecDescent and mini-language parsing
by merlyn (Sage) on Mar 31, 2003 at 00:39 UTC
    And if you wanted 'and' to be higher precedence than 'or' and 'xor', so as not to confuse the rest of us:
    expression: <leftop: term termop term> termop: 'or' | 'xor' term: <leftop: factor factorop factor> factorop: 'and' factor: '(' expression ')' | condition condition: field comparison value field: '<' timethingy '>' timethingy: 'DAY' | 'WEEK' comparison: '<=' | '<' | '=' | '>=' | '>' | '!=' value: /\d+/

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.