[DGD] Re: RFC: parse_string()
Richard Braakman
dark at xs4all.nl
Mon Oct 13 00:40:47 CEST 1997
I have no comments, but a couple of questions. Or perhaps my
questions are comments :)
> token: 'regular_expression'
Why ' ? The slash is the usual delimiter for regexps, and anything
that looks like /this/ is immediately recognisable as a regexp. That
also avoids the punctuation clash:
> 'xxx' in a rule specifies the literal string xxx, not
> a regular expression.
Or you could do like lex and not have explicit delimiters at all.
That avoids the need to escape the delimiter if it occurs inside the
expression (which is awkward when machine-generating a grammar),
but leading whitespace still has to be escaped.
My second question is about the implementation. Will parse_string()
be efficient enough to be invoked with a fairly complex grammar for
every command line? I would expect that to bring up the same problems
as the regexp packages try to handle, i.e. some way to store or cache
a compiled version of the grammar. Do you have any plans for that?
Perhaps I'll address more high-level issues after I've tried to
construct a grammar for LPC :)
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list