Re: Display a parse tree with minimum parentheses?

"Daniel C. Wang" <danwang74@hotmail.com>
15 Apr 2004 12:29:14 -0400

          From comp.compilers

Related articles
Display a parse tree with minimum parentheses? johnmillaway@yahoo.com (John Millaway) (2004-04-14)
Re: Display a parse tree with minimum parentheses? danwang74@hotmail.com (Daniel C. Wang) (2004-04-15)
Re: Display a parse tree with minimum parentheses? haberg@matematik.su.se (2004-04-15)
Re: Display a parse tree with minimum parentheses? clint@0lsen.net (Clint Olsen) (2004-04-15)
| List of all articles for this month |

From: "Daniel C. Wang" <danwang74@hotmail.com>
Newsgroups: comp.compilers
Date: 15 Apr 2004 12:29:14 -0400
Organization: Compilers Central
References: 04-04-034
Keywords: parse, tools
Posted-Date: 15 Apr 2004 12:29:14 EDT

See
    Unparsing Expressions With Prefix and Postfix Operators
        Norman Ramsey


http://citeseer.ist.psu.edu/194913.html


John Millaway wrote:
> Given a parse tree representing a typical boolean expression, where the
> grouping is implicit in the tree structure, is there an algorithm to print
> the equivalent unambiguous infix expression with the minimum parentheses
> (preserving left-to-right order)?


For an algorithm and code in SML to actually do it. The ideas can probably
be easily adpated to any language with a little work.



Post a followup to this message

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