[antlr-interest] Re: Expected token apparently not expected?!

David Bullock db at dawnbreaks.net
Thu Sep 9 11:47:03 PDT 2004


--- In antlr-interest at yahoogroups.com, "David Bullock" <db at d...> wrote:
> Having now deleted the .txt files as part of my build, I have
> unearthed a problem - lexer.g imports literals exported from parser.g,
> and parser.g of course imports lexer.g.  What is the 'right' strategy
> for compiling these?

Just for clarity, I have something like:

... in p.g

class P extends Parser;
options {
  exportVocab = P;
  importVocab = L;
}
rule
   : "keyword" DASH "modifier"
   ;


... in l.g

class L extends Lexer;
options {
  exportVocab = L;
  importVocab = P;
}

DASH
   : '-'
   ;


... and I am attempting to use antlr.Tool to compile them, and it
whinges at me if I give >1 grammar file to compile.

thanks,
David.



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list