Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!jayneus From: jayneus@reliant.Berkeley.EDU (System Hacker) Newsgroups: comp.lang.misc Subject: Info. needed on parsing expressions Message-ID: Date: 26 Mar 89 02:01:03 GMT Sender: usenet@ucbvax.BERKELEY.EDU Distribution: comp Organization: University of California, Berkeley, CA, USA. Lines: 30 I need to parse a file which contains a set of arithmetic expressions in normal format and build up an expression tree for use in my C program. The tree need not be balanced. For example, given the following expression in a file:- x = a*b + c*(d + e); The resulting tree would be:- + / \ / \ * * / \ /\ a b c \ + /\ d e Is there some utility package for doing this ? Any information/help shall be greatly appreciated. Thanks, Arvind EMAIL: sarvind@janus.Berkeley.EDU -- ---------------------------------------------------------------------------- "There is a certain power in mirth that only the jokers know" EMAIL: jayneus@reliant.Berkeley.EDU ----------------------------------------------------------------------------