[prev in list] [next in list] [prev in thread] [next in thread] 

List:       stringtemplate-interest
Subject:    [stringtemplate-interest] Working Java 1.5 grammar?
From:       Steven Atkinson <satkinson () netflix ! com>
Date:       2010-11-16 21:30:59
Message-ID: 63B67E7680727F47B475AC6F576DB2C40EC07FBA () ExchMBX104 ! netflix ! com
[Download RAW message or body]

Folks,

I'm trying to get a working Java 1.5 grammar and tree walker for source-to-source \
refactoring efforts at Netflix.

I've installed antlrWorks in IntelliJ, downloaded the Java.g from antlr.org, and even \
went hunting in openJDK sources for a working ANTLR v3 grammer for Java 1.5 or 1.6.

When I try putting the Java.g grammar from Yang \
Jiang<http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g> \
(yang.jiang.z@gmail.com<mailto:yang.jiang.z@gmail.com>) through ANTLRWorks or on the \
command line I get the following error output

Any help is appreciated!

C:\Hack>java -jar antlr-3.2.jar Java.g
warning(209): Java.g:1783: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:1827: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:1807: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:1827: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:1815:1: Multiple token rules can match input such as \
"'!'": BANG, BANGEQ

As a result, token(s) BANGEQ were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'w'": \
WHILE, IDENTIFIER

As a result, token(s) IDENTIFIER were disabled for that input
warning(209): Java.g:1779:1: Multiple token rules can match input such as "'+'": \
PLUSPLUS, PLUS, PLUSEQ

As a result, token(s) PLUS,PLUSEQ were disabled for that input
warning(209): Java.g:1370:1: Multiple token rules can match input such as "'1'..'9'": \
LONGLITERAL, INTLITERAL, FLOATLITERAL, DOUBLELITERAL

As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL were disabled for that \
input warning(209): Java.g:1803:1: Multiple token rules can match input such as \
"'^'": CARET, CARETEQ

As a result, token(s) CARETEQ were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'s'": \
SHORT, STATIC, STRICTFP, SUPER, SWITCH, SYNCHRONIZED, IDENTIFIER

As a result, token(s) STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,IDENTIFIER were \
disabled for that input warning(209): Java.g:1827:1: Multiple token rules can match \
input such as "'f'": FINAL, FINALLY, FLOAT, FOR, FALSE, IDENTIFIER

As a result, token(s) FINALLY,FLOAT,FOR,FALSE,IDENTIFIER were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'l'": \
LONG, IDENTIFIER

As a result, token(s) IDENTIFIER were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'v'": \
VOID, VOLATILE, IDENTIFIER

As a result, token(s) VOLATILE,IDENTIFIER were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'d'": \
DEFAULT, DO, DOUBLE, IDENTIFIER

As a result, token(s) DO,DOUBLE,IDENTIFIER were disabled for that input
warning(209): Java.g:1727:1: Multiple token rules can match input such as "'='": EQ, \
EQEQ

As a result, token(s) EQEQ were disabled for that input
warning(209): Java.g:1787: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:1827:1: Multiple token rules can match input such as "'e'": \
ELSE, ENUM, EXTENDS, IDENTIFIER

As a result, token(s) ENUM,EXTENDS,IDENTIFIER were disabled for that input
warning(209): Java.g:1791:1: Multiple token rules can match input such as "'/'": \
COMMENT, LINE_COMMENT, SLASH, SLASHEQ

As a result, token(s) LINE_COMMENT,SLASH,SLASHEQ were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'g'": \
GOTO, IDENTIFIER

As a result, token(s) IDENTIFIER were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'n'": \
NATIVE, NEW, NULL, IDENTIFIER

As a result, token(s) NEW,NULL,IDENTIFIER were disabled for that input
warning(209): Java.g:1799:1: Multiple token rules can match input such as "'|'": \
BARBAR, BAR, BAREQ

As a result, token(s) BAR,BAREQ were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'r'": \
RETURN, IDENTIFIER

As a result, token(s) IDENTIFIER were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'p'": \
PACKAGE, PRIVATE, PROTECTED, PUBLIC, IDENTIFIER

As a result, token(s) PRIVATE,PROTECTED,PUBLIC,IDENTIFIER were disabled for that \
input warning(209): Java.g:1827:1: Multiple token rules can match input such as \
"'b'": BOOLEAN, BREAK, BYTE, IDENTIFIER

As a result, token(s) BREAK,BYTE,IDENTIFIER were disabled for that input
warning(209): Java.g:1370:1: Multiple token rules can match input such as "'0'": \
LONGLITERAL, INTLITERAL, FLOATLITERAL, DOUBLELITERAL

As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL were disabled for that \
input warning(209): Java.g:1827:1: Multiple token rules can match input such as \
"'a'": ABSTRACT, ASSERT, IDENTIFIER

As a result, token(s) ASSERT,IDENTIFIER were disabled for that input
warning(209): Java.g:1795:1: Multiple token rules can match input such as "'&'": \
AMPAMP, AMP, AMPEQ

As a result, token(s) AMP,AMPEQ were disabled for that input
warning(209): Java.g:1703:1: Multiple token rules can match input such as "'.'": \
FLOATLITERAL, DOUBLELITERAL, DOT, ELLIPSIS

As a result, token(s) DOUBLELITERAL,DOT,ELLIPSIS were disabled for that input
warning(209): Java.g:1827:1: Multiple token rules can match input such as "'i'": IF, \
IMPLEMENTS, IMPORT, INSTANCEOF, INT, INTERFACE, IDENTIFIER

As a result, token(s) IMPLEMENTS,IMPORT,INSTANCEOF,INT,INTERFACE,IDENTIFIER were \
disabled for that input error(208): Java.g:1815: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,CLASS,CONS \
T,CONTINUE,DO,DOUBLE,ENUM,EXTENDS,FINALLY,FLOAT,FOR,IMPLEMENTS,IMPORT,INSTANCEOF,INT,I \
NTERFACE,NEW,PRIVATE,PROTECTED,PUBLIC,STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,THROW,THROWS,TRANSIENT,TRY,VOLATIL
 E,TRUE,FALSE,NULL,DOT,ELLIPSIS,EQEQ,PLUS,SUB,SLASH,AMP,BAR,PLUSEQ,SUBEQ,STAREQ,SLASHEQ,AMPEQ,BAREQ,CARETEQ,PERCENTEQ,BANGEQ


C:\Hack>


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:x="urn:schemas-microsoft-com:office:excel" \
xmlns:p="urn:schemas-microsoft-com:office:powerpoint" \
xmlns:a="urn:schemas-microsoft-com:office:access" \
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" \
xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" \
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" \
xmlns:b="urn:schemas-microsoft-com:office:publisher" \
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" \
xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" \
xmlns:odc="urn:schemas-microsoft-com:office:odc" \
xmlns:oa="urn:schemas-microsoft-com:office:activation" \
xmlns:html="http://www.w3.org/TR/REC-html40" \
xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" \
xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" \
xmlns:Repl="http://schemas.microsoft.com/repl/" \
xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" \
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" \
xmlns:ppda="http://www.passport.com/NameSpace.xsd" \
xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" \
xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" \
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" \
xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" \
xmlns:udc="http://schemas.microsoft.com/data/udc" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema" \
xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" \
xmlns:ec="http://www.w3.org/2001/04/xmlenc#" \
xmlns:sp="http://schemas.microsoft.com/sharepoint/" \
xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" \
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" \
xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" \
xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" \
xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" \
xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" \
xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" \
xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" \
xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" \
xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" \
xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" \
xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" \
xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" \
xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" \
xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal>Folks,<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I&#8217;m trying to get a working Java 1.5 grammar and tree
walker for source-to-source refactoring efforts at Netflix. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I&#8217;ve installed antlrWorks in IntelliJ, downloaded the
Java.g from antlr.org, and even went hunting in openJDK sources for a working
ANTLR v3 grammer for Java 1.5 or 1.6.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>When I try putting the <a
href="http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g">Java.g
grammar from Yang Jiang</a> (<a \
href="mailto:yang.jiang.z@gmail.com">yang.jiang.z@gmail.com</a>) through ANTLRWorks \
or on the command line I get the following error output<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Any help is appreciated!<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>C:\Hack&gt;java -jar antlr-3.2.jar Java.g<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1783:1: Multiple token rules can match
input such as &quot;'-'&quot;: SUBSUB, SUB, SUBEQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) SUB,SUBEQ were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'c'&quot;: CASE, CATCH, CHAR, CLASS, CONST, CONTINUE,
IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s)
CATCH,CHAR,CLASS,CONST,CONTINUE,IDENTIFIER were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1807:1: Multiple token rules can match
input such as &quot;'%'&quot;: PERCENT, PERCENTEQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) PERCENTEQ were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'t'&quot;: THIS, THROW, THROWS, TRANSIENT, TRY, TRUE,
IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s)
THROW,THROWS,TRANSIENT,TRY,TRUE,IDENTIFIER were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1815:1: Multiple token rules can match
input such as &quot;'!'&quot;: BANG, BANGEQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) BANGEQ were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'w'&quot;: WHILE, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) IDENTIFIER were disabled for that
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1779:1: Multiple token rules can match
input such as &quot;'+'&quot;: PLUSPLUS, PLUS, PLUSEQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) PLUS,PLUSEQ were disabled for that
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1370:1: Multiple token rules can match
input such as &quot;'1'..'9'&quot;: LONGLITERAL, INTLITERAL, FLOATLITERAL,
DOUBLELITERAL<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL
were disabled for that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1803:1: Multiple token rules can match
input such as &quot;'^'&quot;: CARET, CARETEQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) CARETEQ were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'s'&quot;: SHORT, STATIC, STRICTFP, SUPER, SWITCH,
SYNCHRONIZED, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s)
STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,IDENTIFIER were disabled for that
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'f'&quot;: FINAL, FINALLY, FLOAT, FOR, FALSE, \
IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) FINALLY,FLOAT,FOR,FALSE,IDENTIFIER
were disabled for that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'l'&quot;: LONG, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) IDENTIFIER were disabled for that
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'v'&quot;: VOID, VOLATILE, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) VOLATILE,IDENTIFIER were disabled for
that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'d'&quot;: DEFAULT, DO, DOUBLE, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) DO,DOUBLE,IDENTIFIER were disabled for
that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1727:1: Multiple token rules can match
input such as &quot;'='&quot;: EQ, EQEQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) EQEQ were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1787:1: Multiple token rules can match
input such as &quot;'*'&quot;: STAR, STAREQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) STAREQ were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'e'&quot;: ELSE, ENUM, EXTENDS, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) ENUM,EXTENDS,IDENTIFIER were disabled
for that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1791:1: Multiple token rules can match
input such as &quot;'/'&quot;: COMMENT, LINE_COMMENT, SLASH, SLASHEQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) LINE_COMMENT,SLASH,SLASHEQ were
disabled for that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'g'&quot;: GOTO, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) IDENTIFIER were disabled for that
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'n'&quot;: NATIVE, NEW, NULL, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) NEW,NULL,IDENTIFIER were disabled for
that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1799:1: Multiple token rules can match
input such as &quot;'|'&quot;: BARBAR, BAR, BAREQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) BAR,BAREQ were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'r'&quot;: RETURN, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) IDENTIFIER were disabled for that
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'p'&quot;: PACKAGE, PRIVATE, PROTECTED, PUBLIC, \
IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) PRIVATE,PROTECTED,PUBLIC,IDENTIFIER
were disabled for that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'b'&quot;: BOOLEAN, BREAK, BYTE, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) BREAK,BYTE,IDENTIFIER were disabled
for that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1370:1: Multiple token rules can match
input such as &quot;'0'&quot;: LONGLITERAL, INTLITERAL, FLOATLITERAL,
DOUBLELITERAL<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL
were disabled for that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'a'&quot;: ABSTRACT, ASSERT, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) ASSERT,IDENTIFIER were disabled for
that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1795:1: Multiple token rules can match
input such as &quot;'&amp;'&quot;: AMPAMP, AMP, AMPEQ<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) AMP,AMPEQ were disabled for that \
input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1703:1: Multiple token rules can match
input such as &quot;'.'&quot;: FLOATLITERAL, DOUBLELITERAL, DOT, \
ELLIPSIS<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s) DOUBLELITERAL,DOT,ELLIPSIS were
disabled for that input<o:p></o:p></p>

<p class=MsoNormal>warning(209): Java.g:1827:1: Multiple token rules can match
input such as &quot;'i'&quot;: IF, IMPLEMENTS, IMPORT, INSTANCEOF, INT,
INTERFACE, IDENTIFIER<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As a result, token(s)
IMPLEMENTS,IMPORT,INSTANCEOF,INT,INTERFACE,IDENTIFIER were disabled for that
input<o:p></o:p></p>

<p class=MsoNormal>error(208): Java.g:1815: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,CLASS,CONS<o:p></o:p></p>


<p class=MsoNormal>T,CONTINUE,DO,DOUBLE,ENUM,EXTENDS,FINALLY,FLOAT,FOR,IMPLEMENTS,IMPO \
RT,INSTANCEOF,INT,INTERFACE,NEW,PRIVATE,PROTECTED,PUBLIC,STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,THROW,THROWS,TRANSIENT,TRY,VOLATIL<o:p></o:p></p>


<p class=MsoNormal>E,TRUE,FALSE,NULL,DOT,ELLIPSIS,EQEQ,PLUS,SUB,SLASH,AMP,BAR,PLUSEQ,SUBEQ,STAREQ,SLASHEQ,AMPEQ,BAREQ,CARETEQ,PERCENTEQ,BANGEQ<o:p></o:p></p>


<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>C:\Hack&gt;<o:p></o:p></p>

</div>

</body>

</html>



_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest@antlr.org
http://www.antlr.org/mailman/listinfo/stringtemplate-interest

--===============6164231007230287327==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic