[antlr-interest] Performance Question

mzukowski at yci.com mzukowski at yci.com
Mon Mar 3 08:12:37 PST 2003


Look ahead is probably quicker, but check the generated source and decide
for yourself.

Monty
-----Original Message-----
From: Trey Spiva [mailto:Trey.Spiva at embarcadero.com]
Sent: Thursday, February 27, 2003 5:49 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Performance Question


Is it better to increase the look ahead or is it better use semantic
predicates?
 
Example:
options
{
   ... 
   k = 2;
}
 
...
 
someRule
  : IDENT LPAREN
  | IDENT LBRACK
  ;
 
or is it better to do:
 
someRule
  : (IDENT LPAREN)=>IDENT LPAREN
  | IDENT LBRACK
  ;
 
 
 

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 

 

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



More information about the antlr-interest mailing list