[antlr-interest] calling parser from lexer when using separate files

shemanthk shemanthk at yahoo.com
Sun Oct 20 20:41:22 PDT 2002


hi all, 
I am trying to use separate .g files for my lexer and parser by 
exporting the vocabulary from the lexer and importing the same in my 
parser. This works perfectly fine. 
But in case of my parser, during use of #includes in my program, i 
need to call the parser from the lexer, is there a way to do this. I 
am unable to do this right now because the lex.g file is being 
compiled first and it does not have any information about the parser 
object that i am trying to use.

could some one help me on this.

sample code
-----------
within my lex.g i am trying to do the following

Myparser *parser = new Myparser();
parser->parserule();



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list