Dan Sugalski wrote in perl.perl6.language : > > Don't forget, we already change parsing rules at compile time. Perl's > got three (maybe four) different sets of rules as it is: > > *) Normal perl > *) Regexes > *) Double-quoted strings > *) Single-quoted strings > > Adding another, or changing those, isn't a big deal.
Strictly speaking, the last three are handled by perl 5's tokenizer. An insteresting case of compile-time parsing rules modification is given by prototypes : the perl 5 statement foo 1, 2 is parsed differently if foo() has ($) or (@) as prototype.