[antlr-interest] Writing an interactive interpreter with TreeParsers

Loring Craymer craymer at warpiv.com
Sun Jul 9 15:49:00 PDT 2006


Right the second time.  It isn't the number of stages to interpret stuff,
it's the size of the input.  Once the input is valid (successful parse), you
can process an AST.  The equivalent happens with Python, for example:  all
input is converted into a parse tree, and then byte code before the byte
code interpreter is invoked to process the statement(s).

--Loring


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Sohail Somani
> Sent: Sunday, July 09, 2006 3:21 PM
> To: antlr-interest
> Subject: [antlr-interest] Writing an interactive interpreter with
> TreeParsers
> 
> Hi,
> 
> Is it possible to write an interactive interpreter using TreeParsers
> with antlr? I think not because you have to complete parsing input
> before you can start the tree parser.
> 
> Is this correct?
> 
> I suppose I could interpret one line at a time...
> 
> Thanks!
> 
> Sohail




More information about the antlr-interest mailing list