>>>>> "Luke" == Luke Palmer <[EMAIL PROTECTED]> writes:
Luke> But you don't really need to parse to syntax highlight, either. You Luke> just need to tokenize. Unfortunately, to tokenize, you also have to know the state of the parse. As long as / is both "divide" and "begin regex", you're toasted. Please see my long post at "on parsing perl" in perlmonks at <http://www.perlmonks.org/index.pl?node_id=44722> for examples of *why* you need to notice whether you have a divide or a regex match. Perl is fundamentally resistant to lexing. As in the beginning of this thread, one of the RFCs suggested the possibility of making Perl lexable, but apparently the designers said "no, we think the / duality is worth keeping". And that seals the fate for Perl6 just like all Perl before it. To properly lex a Perl program (Perl6 included), you *must* execute BEGIN blocks. That's the end of that tune. Anything else is just an approximation. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!