princepawn has asked for the wisdom of the Perl Monks concerning the following question:
My grammar matches a filename, ie:my $parse = Parse::RecDescent->new(<<'EndGrammar'); rebol : block { dump_item('block', \@item) } | scalar { dump_item('scalar', \@item) } block : '[' block_stuff(s?) ']' block_stuff : scalar scalar : <skip:''> '%' file file : /w+/ EndGrammar
just fine. However, it does not match a filename within a block, ie:%reb.html
and I know exactly why after tracing the grammar.[ %reb.html ]
It is trying the
production with the input text<skip:''> '%' file
note the space in the input text." %reb.html"
The reason this distresses me is that I have not changed the universal token separator from
Yet it did not gobble up the white space between the '[' terminal and the <skip:''>'%' file production/\s*/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The skip directive in Parse::RecDescent
by merlyn (Sage) on Oct 31, 2000 at 19:02 UTC |