Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If you have whitespace in a rule, it is internally replaced by a call to the ws token.
The default ws matches at least one space (\s+) if the left and right are word characters (ie matching \w), and matching zero or more (\s*) otherwise. In code:
Where ww is within word, and could be defined as
If you want 8.8x5.0 to match, you need to override the ws rule in your grammar:
(Update: fixed ww rule after comment from TimToady++)
Perl 6 - links to (nearly) everything that is Perl 6.
In reply to Re: P6: parsing whitespace
by moritz
|
|