option: /option/i /\w+/ optarg(?) ''

2004-05-20 Thread Alexander Farber
Hi, why doesn't the question mark in the optarg(?) below work as I expect? In the trace I see that optarg consumes the character and then the option rule fails, since the final is missing. Isn't P:RD supposed to backtrack and say ok, the optarg(?) didn't match anything here? Of course the

grammar problems

2004-05-20 Thread Jonas Wolf
Hello, I recently downloaded the Parse::RecDescent package to parse boolean queries. I have several questions, not necessarily about the package itself, but rather about my grammar. I am currently using the following grammar: my $grammar = q { autotree disj : qualif(?)

Re: option: /option/i /\w+/ optarg(?) ''

2004-05-20 Thread Ted Zlatanov
On Thu, 20 May 2004, [EMAIL PROTECTED] wrote: why doesn't the question mark in the optarg(?) below work as I expect? In the trace I see that optarg consumes the character and then the option rule fails, since the final is missing. Isn't P:RD supposed to backtrack and say ok, the

Re: option: /option/i /\w+/ optarg(?) ''

2004-05-20 Thread Ron D. Smith
On Thursday, May 20, 2004 Alexander Farber said: Hi, why doesn't the question mark in the optarg(?) below work as I expect? In the trace I see that optarg consumes the character and then the option rule fails, since the final is missing. Isn't P:RD supposed to backtrack and say ok,

Re: grammar problems

2004-05-20 Thread Ron D. Smith
On Thursday, May 20, 2004 Jonas Wolf said: Hello, I recently downloaded the Parse::RecDescent package to parse boolean queries. I have several questions, not necessarily about the package itself, but rather about my grammar. I am currently using the following grammar: my $grammar = q