Related articles |
---|
fully parenthesized expression? mr.waverlye@verizon.net (Mr.E) (2007-03-03) |
Re: fully parenthesized expression? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-03-05) |
Re: fully parenthesized expression? mr.waverlye@verizon.net (Mr.E) (2007-03-08) |
Re: fully parenthesized expression? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-03-08) |
Re: fully parenthesized expression? mr.waverlye@verizon.net (Mr.E) (2007-03-10) |
From: | "Mr.E" <mr.waverlye@verizon.net> |
Newsgroups: | comp.compilers |
Date: | 10 Mar 2007 21:35:11 -0500 |
Organization: | Compilers Central |
References: | 07-03-01507-03-026 07-03-033 |
Keywords: | parse |
Posted-Date: | 10 Mar 2007 21:35:11 EST |
> The variant with queue (pseudo-code):
>
> Stack >> Right;
> Stack >> Left;
> Stack << Left * Right;
> '(' >> Qutput; // The left side of the output queue accessed
> Output << '*';
> Output << Right;
> Output << ')';
>
> Once you finished, you can print Output.
>
> The variant with source locations:
>
> Stack >> Right;
> Stack >> Left;
> Stack <<
> Operand
> ( Left.Value * Right.Value,
> Left.Location + Right.Location + Location_of_Multiply
> );
>
[SNIP]
I believe I understand now. Hopefully this weekend I will try it out.
Thank you very much,
W.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.