|Re: Parsing w/ operator precedence email@example.com (Chris F Clark) (2002-01-24)|
|RE: Parsing w/ operator precedence firstname.lastname@example.org (Quinn Tyler Jackson) (2002-10-18)|
|From:||"Quinn Tyler Jackson" <email@example.com>|
|Date:||18 Oct 2002 23:08:38 -0400|
|Posted-Date:||18 Oct 2002 23:08:38 EDT|
Chris Clark said:
> The result is five mutually recursive routines (E, E1, F, F1, and T)
> that create the parse tree. Note the resulting parse tree does not
> look like the one that matches the naive grammar.
I've mentioned that a recent addition to the next release of Meta-S
(which uses an LL(k) engine) is the #refine(name) statement, which
can be used to manipulate the tree during a parse such that, although
expression productions have the standard LL form, the resulting trees
are free of intermediate nodes.
An unexpected (but nice) side-effect of the #refine statement is that
it results in a slight performance increase, since useless nodes are
eliminated at an early stage in the parse, and are not copied at every
reduction above the expression.
Quinn Tyler Jackson
Return to the
Search the comp.compilers archives again.