Writing an interpreter with Flex?

vikshik@rediffmail.com (vikshik@rediffmail.com)
16 May 2004 23:34:33 -0400

          From comp.compilers

Related articles
Writing an interpreter with Flex? vikshik@rediffmail.com (2004-05-16)
Re: Writing an interpreter with Flex? dido@imperium.ph (2004-05-24)
| List of all articles for this month |

From: vikshik@rediffmail.com (vikshik@rediffmail.com)
Newsgroups: comp.compilers
Date: 16 May 2004 23:34:33 -0400
Organization: http://groups.google.com
Keywords: interpreter, question
Posted-Date: 16 May 2004 23:34:33 EDT

Hi Every1

please help me.
Actually i'm writing a convertor for SystemC to verilog. And i'm using
FLEX for the same. The problem i'm facing is:
to create disable block. how can i go back into source code if
FLEX find the TOKEN "break"[ \t]";" . And please suggest me how to
handle nested loops. As i have to convert first '{' to begin and last
'}' to end for every loop/switch case.

Hoping for soon reply/help.


[There's a variety of ways to handle this, but my favorite is to translate
the program into an internal form such as RPN or a parse tree and then
interpret that. Directly interpreting the source text is a pain, as
you've discovered. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.