[cl-ppcre-devel] Roles of scanner vs. parser vs. lexer?

Derek Peschel dpeschel at eskimo.com
Thu Aug 4 06:34:52 UTC 2005


On Thu, Aug 04, 2005 at 01:32:37AM +0200, Edi Weitz wrote:
> [You forgot to Cc the mailing list.]

Oops.  Every list works differently.  If I reply to you and Cc the list,
is the server smart enough not to send you a second copy?  For myself,
I have the "don't send me copies of my posts" option on (Mutt already
saves a copy) so that would be a logical extension as long as everyone
uses it and everyone remembers to Cc the list.

> Without knowing anything about Climacs' internals: How about using
> CL-PPCRE::PARSE-STRING and feeding the result to Climacs?

That might be OK.  But the incremental parser algorithm keeps a lot more
state than just the parse tree, I think.  You don't have to worry about the
algorithm, but you do have to use Climacs's classes to describe your
language.

You need to preserve _all_ original text, since I believe Climacs uses
the parse tree to display the buffer, and I'd say you need to recover
from errors by continuing to parse (maybe in some restricted way) past them.

Considering these requirements it seems sensible to rewrite the parser
using Climacs's framework.

-- Derek



More information about the Cl-ppcre-devel mailing list