[antlr-interest] Internal error in 3.1; also, context-sensitive keyword sets

Terence Parr parrt at cs.usfca.edu
Thu Aug 7 12:25:59 PDT 2008


Fixed.
Ter
On Aug 5, 2008, at 11:58 PM, Jesse McGrew wrote:

> On Tue, Aug 5, 2008 at 2:25 PM, Jesse McGrew <jmcgrew at gmail.com>  
> wrote:
>> java.lang.NullPointerException
>> org 
>> .antlr 
>> .analysis 
>> .NFAToDFAConverter 
>> .getPredicatesPerNonDeterministicAlt(NFAToDFAConverter.java:1601)
> ...
>
> I've narrowed down the code that causes this internal error:
>
> ======================================
> grammar FrankBug;
>
> options
> {
> 	output = AST;
> }
>
> ID	:	('a'..'z' | 'A'..'Z')+;
> 	
> normalExpr
> 	:	expression;
>
> expression
> 	:	functionExpression
> 			({!noComma}?	(',' functionExpression)* )?
> 	;
>
> functionExpression
> 	:	ID
> 			({!noFuncCall}?	('(' expression ')')? )?
> 	;
> ======================================
>
> If I remove either of the semantic predicates, or the normalExpr rule,
> the exception goes away.
>
> Jesse



More information about the antlr-interest mailing list