[antlr-interest] lazy parser code writing

Jim Idle jimi at intersystems.com
Thu Oct 26 14:41:09 PDT 2006


Robert,

I think you should just let the ANTLR code generator decide how to match your rules... You may be able to get the output code to do things like you suggest by place predicates in place but this is slower AND more code, so only do this if ANTLR tells you it is going to need one and you can't think of another way to express the construct to avoid the need.

Jim

-----Original Message-----
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest- 

The method I want to adopt is not do token type checking, instead go straight to parse BasicValue,
let BasicValue parsing method check if the first token is of INT, REAL or BOOL, if not then return
null; then parse List. The token type checking is done at lowerest level, and only once.


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.11/498 - Release Date: 10/26/2006
 


More information about the antlr-interest mailing list