[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interpreters


It might be possible to write your own Parser to do this. There is a
section in Etienne's thesis on page 50 on custom parsers and it might
also be worth checking out this example:


The inner class contains action code which is executed in the same way
as any AnalysisAdapter (i.e. when the node is parsed). The filter()
method applies the AnalysisAdapter to the nodes as they are parsed.

I was thinking you could write an AnalysisAdapter that compiles and
executes the input when, say, a 'semicolon' node is parsed. I'm sure
others will have comments on this approach...


On Tue, Nov 26, 2002 at 07:56:10PM -0400, Marcelo Morales wrote:
> Hi
> I just downloaded SableCC version 2.16.2 and i wish to know how to implement
> an interpreter... you know, one which does some kind of read-eval-print
> loop. Any ideas would be really apreciated.
> By the way, i did join the SableCC mailing list.
> Thanks in advance
> MM