Mail Archives: djgpp/1999/01/29/01:20:12
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
- Raw text -