|Re: Simple constant folding in bison parser firstname.lastname@example.org (1992-08-10)|
|constant folding at parse time email@example.com (1992-08-17)|
|Re: constant folding at parse time firstname.lastname@example.org (1992-08-17)|
|Re: constant folding at parse time email@example.com.EDU (Tim Pierce) (1992-08-19)|
|Re: constant folding at parse time firstname.lastname@example.org (1992-08-20)|
|Re: constant folding at parse time email@example.com (1992-08-21)|
|Re: constant folding at parse time firstname.lastname@example.org (1992-08-21)|
|Re: constant folding at parse time email@example.com (1992-08-24)|
|Organization:||Computing Services Division, University of Wisconsin - Milwaukee|
|Date:||Mon, 17 Aug 1992 17:28:49 GMT|
firstname.lastname@example.org (Willem Jan Withagen) writes:
>Well just a little nit pick here. I do not consider this part of a
>parser. Determining wether an expression is constant or not is part of
>constant folding, which is usually not done while parsing. But the
>taken approach could be made to work.
A expression evaluation routine I wrote for an expression parser in a
recently released assembler (C-expression syntax is handled) is set up in
such a way that all constant subexpressions will be reduced to leaf nodes
during parsing. The question about whether a given expression is constant
or not doesn't even arise because it's already been handled by the parser.
Basically, if the expression tree returned by the parser is a leaf node
then it's a constant, otherwise it's not.
Return to the
Search the comp.compilers archives again.