[antlr-interest] java.g does not compile

Jim Idle jimi at temporal-wave.com
Wed Jan 20 11:31:45 PST 2010


Souds like your machine is pretty slow and the conversion timeout default is therefore not engouh.

Use the -Xconversiontimeout 30000 option to increase the elapsed time it will spend on it.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Andrew Haley
> Sent: Wednesday, January 20, 2010 10:58 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] java.g does not compile
> 
> I just downloaded java.g from
> http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g
> and
> 
> ~ $ java -jar Downloads/antlr-3.2.jar java.g
> warning(209): java.g:1771:1: Multiple token rules can match input such
> as "'*'": STAR, STAREQ
> 
> As a result, token(s) STAREQ were disabled for that input
> warning(209): java.g:1811:1: Multiple token rules can match input such
> as "'i'": IF, IMPLEMENTS, IMPORT, INSTANCEOF, INT, INTERFACE,
> IDENTIFIER
> 
> ...
> 
> error(208): java.g:1799:1: The following token definitions can never be
> matched because prior tokens match the same input:
> INTLITERAL,DOUBLELITERAL,LINE_COMMENT,ASSERT,BREAK,BYTE,CATCH,CHAR,CLAS
> S,CONST,CONTINUE,DO,DOUBLE,ENUM,EXTENDS,FINALLY,FLOAT,FOR,IMPLEMENTS,IM
> PORT,INSTANCEOF,INT,INTERFACE,NEW,PRIVATE,PROTECTED,PUBLIC,STATIC,STRIC
> TFP,SUPER,SWITCH,SYNCHRONIZED,THROW,THROWS,TRANSIENT,TRY,VOLATILE,TRUE,
> FALSE,NULL,DOT,ELLIPSIS,EQEQ,PLUS,SUB,SLASH,AMP,BAR,PLUSEQ,SUBEQ,STAREQ
> ,SLASHEQ,AMPEQ,BAREQ,CARETEQ,PERCENTEQ,BANGEQ
> 
> This seems very odd.  Any ideas?  It's claimed to be a grammar for
> ANTLR v3.
> 
> Andrew.
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address





More information about the antlr-interest mailing list