SUMMARY: Constant folding in the parser

jeremy@sw.oz.au (Jeremy Fitzhardinge)
Wed, 12 Aug 1992 09:04:23 GMT

          From comp.compilers

Related articles
SUMMARY: Constant folding in the parser jeremy@sw.oz.au (1992-08-12)
| List of all articles for this month |
Newsgroups: comp.compilers
From: jeremy@sw.oz.au (Jeremy Fitzhardinge)
Organization: Softway Pty Ltd
Date: Wed, 12 Aug 1992 09:04:23 GMT
Summary: It's best not to
Keywords: parse, optimize

A week ago or so, I asked whether a non-ambigious grammar can be
constructed to eliminate constant expressions without explicit semantic
analysis of the parse tree.


The most popular answer was "Keep semantic analysis away from the parser",
and do the constant elimination as the tree is constructed. This can be
generalized to putting off such optimisations until the tree is completely
built, so that other transformations can be done.


Thanks to:
John R. Levine <johnl@iecc.cambridge.ma.us>
twpierce@amhux1.amherst.edu (Tim Pierce)
kurt@tc.fluke.COM (Kurt Guntheroth)
"Jorge Tapia Jopia" <jtapia@vandi.ars.cl>
e86jh@efd.lth.se (Jens Hansson)
nelson@berlioz.nsc.com (Taed Nelson)


J
--
jeremy@softway.sw.oz.au ph:+61 2 698 2322-x122 fax:+61 2 699 9174
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.