Incremental parser (was: Backtick Hickup)
A. Pagaltzis
pagaltzis at gmx.de
Sun Aug 19 10:25:35 EDT 2007
* Michel Fortin <michel.fortin at michelf.com> [2007-08-14 16:45]:
> I'm totally not convinced that creating a byte-by-byte parser
> in Perl or PHP is going to be very useful.
Perl has this handy /c switch for regular expressions that means
“continue” and has the effect that a failed match does not reset
the start position for /g matches on the string. That way you can
write parsers using a separate /gc pattern for each token. This
would be hardly any slower than the current Perl implementation
which also runs lots of separate regexes.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Markdown-Discuss
mailing list