|Example interpreter C email@example.com (Henry Butwsky) (2005-08-13)|
|Re: Example interpreter C firstname.lastname@example.org (Laurence Finston) (2005-08-16)|
|Re: Example interpreter C email@example.com (Rafael 'Dido' Sevilla) (2005-08-16)|
|Re: Example interpreter C firstname.lastname@example.org (2005-08-21)|
|Re: Example interpreter C email@example.com (Laurence Finston) (2005-08-21)|
|Re: Example interpreter C firstname.lastname@example.org (George Neuner) (2005-08-24)|
|Re: Example interpreter C Markus.Elfring@web.de (2005-08-24)|
|Re: Example interpreter C email@example.com (Julian Stecklina) (2005-08-31)|
|[8 later articles]|
|From:||Laurence Finston <firstname.lastname@example.org>|
|Date:||16 Aug 2005 11:16:05 -0400|
|Keywords:||C, interpreter, comment|
|Posted-Date:||16 Aug 2005 11:16:05 EDT|
On Sat, 13 Aug 2005, Henry Butwsky wrote:
> I have written a basic parser (with flex and Bison) that evaluates
> simple expressions , but now I want to add IF/THEN construct and also
> I understand that I need to write a parser that creates and AST
> (abstract symbol table) . Can any one point in the direction of an
> such an expale interpreter ?
> [Uh, AST stands for Abstract Syntax Tree. You'll find a lot more
> references if you use the right name. -John]
I don't know what "expale" is, nor what an abstract syntax tree is.
However, I have written an interpreter with conditionals and loops.
I've also implemented macros using similar techniques.
It's available at:
The input files for the parser have names of the pattern "p*.w".
The one with the rules for loops is 'ploops.w' and the one with
rules for conditionals is 'pcondit.w'.
This topic also comes up regularly on the "help-bison" mailing list.
You might want to check the archives:
[Expale is a typo for example, and I have to say that if you don't know what
an AST is, you should consider learning a little about compiler basics. -John]
Return to the
Search the comp.compilers archives again.