[antlr-interest] parser resuse

gidadoifiok gidadoifiok at yahoo.com
Thu Jan 24 08:03:21 PST 2002


I search on 'parser reuse' and came up with these two messages:

  http://groups.yahoo.com/group/antlr-interest/message/4590
  http://groups.yahoo.com/group/antlr-interest/message/4176

Which did not seem to apply.  But my guess is that I can do
something like this:

  TransformScanner ts =
      new TransformScanner(transform); // my derived lexer
  TokenBuffer tb = new TokenBuffer(ts);
  parser.setTokenBuffer(tb);  // user previously constructer parser
  parser.rewind();            // probably don't need to do this?

I will put this in a synchronized method to insure thread-safety.
Is this the way to do it, or is there a correct way?

Thanks,
Gidado


 

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



More information about the antlr-interest mailing list