in reply to P6: parsing whitespace

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:

class Grammar { token ws { <!ww> \s* } }

Where ww is within word, and could be defined as

token ww { <after \w> <before \w> }

If you want 8.8x5.0 to match, you need to override the ws rule in your grammar:

grammar Calc { token ws { \s* } # rest of your code here without any modifications

(Update: fixed ww rule after comment from TimToady++)

Perl 6 - links to (nearly) everything that is Perl 6.