[antlr-interest] Java Grammar

Jim Idle jimi at temporal-wave.com
Wed Jul 28 12:43:39 PDT 2010


Use -Xconversiontimeout 10000 and see if that makes a difference.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Alan Gutierrez
> Sent: Wednesday, July 28, 2010 12:10 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Java Grammar
> 
> I'd like to use Antlr to create a syntax highlighter. I've taken the
Java.g
> grammer offered up at the web site for Java 6 and ran it through
> org.antlr.Tool.
> 
> It produced a lot of warning messages. Is this normal? Below is the half-
> screen of warnings.
> 
> java -cp /Users/alan/.m2/repository/org/antlr/antlr-runtime/3.2/antlr-
> runtime-3.2.jar:/Users/alan/.m2/repository/antlr/antlr/2.7.7/
> antlr-2.7.7.jar:/Users/alan/.m2/repository/org/antlr/stringtemplate/
> 3.2.1/stringtemplate-3.2.1.jar:/Users/alan/.m2/repository/org/antlr/
> antlr/3.2/antlr-3.2.jar org.antlr.Tool Java.g
> warning(209): Java.g:1767:1: Multiple token rules can match input such as
"'-
> '": SUBSUB, SUB, SUBEQ
> 
> As a result, token(s) SUB,SUBEQ were disabled for that input
> warning(209): Java.g:1811:1: Multiple token rules can match input such as
> "'c'": CASE, CATCH, CHAR, CLASS, CONST, CONTINUE, IDENTIFIER
> 
> As a result, token(s) CATCH,CHAR,CLASS,CONST,CONTINUE,IDENTIFIER were
> disabled for that input
> warning(209): Java.g:1791:1: Multiple token rules can match input such as
> "'%'": PERCENT, PERCENTEQ
> 
> As a result, token(s) PERCENTEQ were disabled for that input
> warning(209): Java.g:1811:1: Multiple token rules can match input such as
> "'t'": THIS, THROW, THROWS, TRANSIENT, TRY, TRUE, IDENTIFIER
> 
> As a result, token(s) THROW,THROWS,TRANSIENT,TRY,TRUE,IDENTIFIER
> were disabled for that input
> warning(209): Java.g:1799:1: Multiple token rules can match input such as
> "'!'": BANG, BANGEQ
> 
> --
> Alan Gutierrez - alan at blogometer.com - http://twitter.com/bigeasy
> 
> 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