Re: how to parse linear equations

2010-01-15 Thread Rui Maciel
Michael Chen wrote: > Dear there, > > The input I have is linear equation like: > > 2 * x + ( x - y ) = x + 1 > > And I would like to get at end > > 2 * x - y = 1 > > I studied the calculator example, and be able to build ast tree. > however I have no way to reduce it. Please give me an exam

how to parse linear equations

2010-01-15 Thread Michael Chen
Dear there, The input I have is linear equation like: 2 * x + ( x - y ) = x + 1 And I would like to get at end 2 * x - y = 1 I studied the calculator example, and be able to build ast tree. however I have no way to reduce it. Please give me an example or link. Thanks. -- Best regards, Michae