Sender: nate AT cartsys DOT com Message-ID: <36B1533C.F687F4A6@cartsys.com> Date: Thu, 28 Jan 1999 22:20:44 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: i need help with parsing nested commands References: <36AF5A68 DOT F368496 AT geocities DOT com> <12210 DOT 990129 AT flashback DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com anarko wrote: > > Hello everyone :-) > > I need a code snippet that "un-nests" a textstring like: > (a*4(b/32)+9)+(b*(97+4)) > > just an example, as you might have guessed i need it for > a compiler i am writing, and it is not a c compiler > but a project of my own, i'll tell you more when i > have more code written, it's in early stages. > > if someone might have written such code snippet, > or can explain the principles in how to "un-nest" > this with a loop or something, could you please help me then? This is a classical parser job, and Bison's manual has an example that does it. -- Nate Eldredge nate AT cartsys DOT com