Re: Grammar for optional elements



Tony Finch <dot@xxxxxxxx> writes:

Interesting. Do you have any examples or citations? Ford's paper on the
formal properties of PEGs says that it is an open question whether there
are context-free languages that cannot be described with PEGs, and I
wonder if ordered choice is relevant.

I've been trying to track down where I read about ordered choice using
google and haven't had any luck yet. I can't find the exact reference
yet, but I recall the point was that you were using a "global ordering
of the parsing elements to make local decisions". There is a similar
issue with the precedence and ambiguity operators ala yacc. If I find
the reference, I will try to post it. Otherwise, perhaps the author
of the paper/web page I was reading will happen to read this,
recognize that I am refering to them, and chime in.

Sorry I can't be more specific yet,
-Chris

*****************************************************************************
Chris Clark Internet : compres@xxxxxxxxxxxxx
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
23 Bailey Rd voice : (508) 435-5016
Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)
.