Related articles |
---|
Re: Parsing w/ operator precedence cfc@world.std.com (Chris F Clark) (2002-01-24) |
RE: Parsing w/ operator precedence qjackson@shaw.ca (Quinn Tyler Jackson) (2002-10-18) |
From: | "Quinn Tyler Jackson" <qjackson@shaw.ca> |
Newsgroups: | comp.compilers |
Date: | 18 Oct 2002 23:08:38 -0400 |
Organization: | Compilers Central |
References: | 02-01-120 |
Keywords: | parse, LL(1) |
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
http://members.shaw.ca/qjackson/
http://members.shaw.ca/jacksonsolutions/
Return to the
comp.compilers page.
Search the
comp.compilers archives again.