[comp.misc] Info. needed on parsing expressions

jayneus@reliant.Berkeley.EDU (System Hacker) (03/26/89)

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
----------------------------------------------------------------------------