[antlr-interest] replacing NoViableAltException with exception with less stack

Jochen Theodorou blackdrag at gmx.org
Tue Sep 11 04:54:01 PDT 2007


Loring Craymer schrieb:
 > Exceptions are a fact of life for grammars with
 > synpreds.

that's right... for example:

declarationStart!
     :   (      "def" nls
             | modifier nls
             | annotation nls
              | (   upperCaseIdent
                    |   builtInType
                    |   qualifiedTypeName
               ) (typeArguments)? (LBRACK balancedTokens RBRACK)*
         )+
         IDENT
     ;

that is used as syntactic Predicate at several places... I know, very bad.

bye blackdrag

-- 
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/



More information about the antlr-interest mailing list