[Git][java-team/javacc][master] 3 commits: New upstream version 7.0.12
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Wed Dec 7 22:28:09 GMT 2022
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / javacc
Commits:
e1f009ec by Emmanuel Bourg at 2022-12-07T23:23:16+01:00
New upstream version 7.0.12
- - - - -
1886e29b by Emmanuel Bourg at 2022-12-07T23:23:19+01:00
Update upstream source from tag 'upstream/7.0.12'
Update to upstream version '7.0.12'
with Debian dir 86f268e72ac7f78562e7e81f81f7e3dd1cc0c545
- - - - -
41e1c06e by Emmanuel Bourg at 2022-12-07T23:27:36+01:00
New upstream release (7.0.12)
- - - - -
17 changed files:
- README.md
- debian/changelog
- docs/documentation/grammar.md
- docs/downloads.md
- docs/index.md
- docs/release-notes.md
- pom.xml
- src/main/resources/templates/TokenMgrError.template
- src/main/resources/templates/gwt/JavaCharStream.template
- src/main/resources/templates/gwt/SimpleCharStream.template
- src/main/resources/version.properties
- + test/gwtTemplate/Parser.jj
- + test/gwtUnicodeTemplate/Parser.jj
- test/javaFileGeneration/expected/no-keep-line/TokenMgrError.java
- test/javaFileGeneration/expected/non-static/TokenMgrError.java
- test/javaFileGeneration/expected/not-public/TokenMgrError.java
- test/javaFileGeneration/expected/static/TokenMgrError.java
Changes:
=====================================
README.md
=====================================
@@ -157,9 +157,9 @@ This guide will walk you through locally building the project, running an existi
### <a name="download"></a>Download & Installation
-JavaCC 7.0.11 is our latest stable release.
+JavaCC 7.0.12 is our latest stable release.
-* JavaCC 7.0.11 - ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.11.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.11.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.11/javacc-7.0.11.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.11/javacc-7.0.11-javadoc.jar), [Release Notes](docs/release-notes.md#javacc-7.0.11))
+* JavaCC 7.0.12 - ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.12.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.12.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.12/javacc-7.0.12.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.12/javacc-7.0.12-javadoc.jar), [Release Notes](docs/release-notes.md#javacc-7.0.12))
All JavaCC releases are available via [GitHub](https://github.com/javacc/javacc/releases) and [Maven](https://mvnrepository.com/artifact/net.java.dev.javacc/javacc) including checksums and cryptographic signatures.
@@ -172,16 +172,16 @@ The GitHub 8.0 branch contains the next generation of JavaCC that splits the fr
To install JavaCC, navigate to the download directory and type:
```
-$ unzip javacc-7.0.11.zip
+$ unzip javacc-7.0.12.zip
or
-$ tar xvf javacc-7.0.11.tar.gz
+$ tar xvf javacc-7.0.12.tar.gz
```
-Then place the binary `javacc-7.0.11.jar` in a new `target/` folder, and rename to `javacc.jar`.
+Then place the binary `javacc-7.0.12.jar` in a new `target/` folder, and rename to `javacc.jar`.
Once you have completed installation add the `scripts/` directory in the JavaCC installation to your `PATH`. The JavaCC, JJTree, and JJDoc invocation scripts/executables reside in this directory.
-On UNIX based systems, the scripts may not be executable immediately. This can be solved by using the command from the `javacc-7.0.11/` directory:
+On UNIX based systems, the scripts may not be executable immediately. This can be solved by using the command from the `javacc-7.0.12/` directory:
```
chmod +x scripts/javacc
@@ -242,7 +242,7 @@ Add the following dependency to your `pom.xml` file.
<dependency>
<groupId>net.java.dev.javacc</groupId>
<artifactId>javacc</artifactId>
- <version>7.0.11</version>
+ <version>7.0.12</version>
</dependency>
```
@@ -259,7 +259,7 @@ repositories {
}
dependencies {
- compile group: 'net.java.dev.javacc', name: 'javacc', version: '7.0.11'
+ compile group: 'net.java.dev.javacc', name: 'javacc', version: '7.0.12'
}
```
-->
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+javacc (7.0.12-1) unstable; urgency=medium
+
+ * New upstream release
+
+ -- Emmanuel Bourg <ebourg at apache.org> Wed, 07 Dec 2022 23:27:10 +0100
+
javacc (7.0.11-1) unstable; urgency=medium
* New upstream release
=====================================
docs/documentation/grammar.md
=====================================
@@ -66,7 +66,7 @@ javacc_input ::= javacc_options
"PARSER_BEGIN" "(" <IDENTIFIER> ")"
java_compilation_unit
"PARSER_END" "(" <IDENTIFIER> ")"
- ( production )*
+ ( production )+
<EOF>
```
=====================================
docs/downloads.md
=====================================
@@ -6,11 +6,12 @@
N.B. LOOKAHEAD functionality is broken from version 7.0.5. It will be fixed in version 7.0.10 and upper. In the interim, if you require LOOKAHEAD functionality, please use version 7.0.4.
-JavaCC 7.0.11 is our latest stable release.
+JavaCC 7.0.12 is our latest stable release.
All JavaCC releases are available via [GitHub](https://github.com/javacc/javacc/releases) and [Maven](https://mvnrepository.com/artifact/net.java.dev.javacc/javacc) including checksums and cryptographic signatures.
#### 7.0.x
+* JavaCC 7.0.12 - 2022-07-06 ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.12.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.12.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.12/javacc-7.0.12.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.12/javacc-7.0.12-javadoc.jar), [Release Notes](release-notes.md#javacc-7.0.12))
* JavaCC 7.0.11 - 2020-11-22 ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.11.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.11.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.11/javacc-7.0.11.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.11/javacc-7.0.11-javadoc.jar), [Release Notes](release-notes.md#javacc-7.0.11))
* JavaCC 7.0.10 - 2020-11-22 ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.10.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.10.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.10/javacc-7.0.10.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.10/javacc-7.0.10-javadoc.jar), [Release Notes](release-notes.md#javacc-7.0.10))
* JavaCC 7.0.9 - 2020-06-22 ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.9.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.9.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.9/javacc-7.0.9.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.9/javacc-7.0.9-javadoc.jar), [Release Notes](release-notes.md#javacc-7.0.9))
@@ -35,9 +36,9 @@ All JavaCC releases are available via [GitHub](https://github.com/javacc/javacc/
To install JavaCC, navigate to the download directory and type:
```
-$ unzip javacc-7.0.11.zip
+$ unzip javacc-7.0.12.zip
or
-$ tar xvf javacc-7.0.11.tar.gz
+$ tar xvf javacc-7.0.12.tar.gz
```
Once you have completed installation add the `bin/` directory in the JavaCC installation to your `PATH`. The JavaCC, JJTree, and JJDoc invocation scripts/executables reside in this directory.
=====================================
docs/index.md
=====================================
@@ -74,7 +74,7 @@ This example recognizes matching braces followed by zero or more line terminator
Examples of legal strings in this grammar are:
-`{}`, `{{{{{}}}}}` // ... etc
+`{}`, `{{{{{}}}}}` // ... etc
Examples of illegal strings are:
@@ -152,9 +152,9 @@ This guide will walk you through locally building the project, running an existi
### <a name="download"></a>Download & Installation
-JavaCC 7.0.11 is our latest stable release.
+JavaCC 7.0.12 is our latest stable release.
-* JavaCC 7.0.11 - ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.11.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.11.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.11/javacc-7.0.11.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.11/javacc-7.0.11-javadoc.jar), [Release Notes](release-notes.md#javacc-7.0.11))
+* JavaCC 7.0.12 - ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.12.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.12.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.12/javacc-7.0.12.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.12/javacc-7.0.12-javadoc.jar), [Release Notes](release-notes.md#javacc-7.0.12))
All JavaCC releases are available via [GitHub](https://github.com/javacc/javacc/releases) and [Maven](https://mvnrepository.com/artifact/net.java.dev.javacc/javacc) including checksums and cryptographic signatures.
@@ -168,16 +168,16 @@ The GitHub 8.0 branch contains the next generation of JavaCC that splits the fr
To install JavaCC, navigate to the download directory and type:
```
-$ unzip javacc-7.0.11.zip
+$ unzip javacc-7.0.12.zip
or
-$ tar xvf javacc-7.0.11.tar.gz
+$ tar xvf javacc-7.0.12.tar.gz
```
-Then place the binary `javacc-7.0.11.jar` in a new `target/` folder, and rename to `javacc.jar`.
+Then place the binary `javacc-7.0.12.jar` in a new `target/` folder, and rename to `javacc.jar`.
Once you have completed installation add the `scripts/` directory in the JavaCC installation to your `PATH`. The JavaCC, JJTree, and JJDoc invocation scripts/executables reside in this directory.
-On UNIX based systems, the scripts may not be executable immediately. This can be solved by using the command from the `javacc-7.0.11/` directory:
+On UNIX based systems, the scripts may not be executable immediately. This can be solved by using the command from the `javacc-7.0.12/` directory:
```
chmod +x scripts/javacc
=====================================
docs/release-notes.md
=====================================
@@ -31,6 +31,7 @@ It also includes the change history for JJTree, JJDoc and the C++ versions of Ja
#### 7.0.x
+* [7.0.12](#javacc-7.0.12)
* [7.0.11](#javacc-7.0.11)
* [7.0.10](#javacc-7.0.10)
* [7.0.9](#javacc-7.0.9)
@@ -94,6 +95,32 @@ It also includes the change history for JJTree, JJDoc and the C++ versions of Ja
<br>
+### MODIFICATIONS IN VERSION <a name="javacc-7.0.12"></a>7.0.12
+---
+ <br>
+* \#230 : Remove unused char from TokenMgrError.template in LexicalEr
+* \#228 : Remove redundant cast in TokenMgrError template
+* \#224 : Production part in javacc_input cannot be omitted
+* \#223 : Fix annotations for JavaCharStream
+* \#222 : Generate max. one deprecated annotation per method
+* \#219 : Fix mismatched javadoc
+* \#213 : Fix legacy links to Apache Lucene's grammar file
+* \#212 : Test for allocation expression #189
+* \#211 : Bad defaultVisit() method generated
+* \#210 : Another change for marked for removal
+* \#209 : Improve lexical error message
+* \#208 : Relocated misplaced annotations
+* \#207 : Changed methods marked for removal
+* \#206 : Build xml improvements
+* \#205 : Small fixes on warnings
+* \#203 : Missing change for doc for token_manager_decls (issue #190)
+* \#202 : Fix doc for token_manager_decls (issue #190)
+* \#200 : Update index.md and _config.yml
+
+* \#199 : Fix QueryParser.jj url in READMD
+
+<br>
+
### MODIFICATIONS IN VERSION <a name="javacc-7.0.11"></a>7.0.11
---
<br>
=====================================
pom.xml
=====================================
@@ -4,7 +4,7 @@
<groupId>net.java.dev.javacc</groupId>
<artifactId>javacc</artifactId>
<name>JavaCC</name>
- <version>7.0.11</version>
+ <version>7.0.12</version>
<description>JavaCC is a parser/scanner generator for java. </description>
<url>https://github.com/javacc/javacc</url>
@@ -21,7 +21,7 @@
<url>https://github.com/javacc/javacc</url>
<connection>scm:git:https://github.com/javacc/javacc.git</connection>
<developerConnection>scm:git:ssh://git@github.com/javacc/javacc.git</developerConnection>
- <tag>javacc-7.0.11</tag>
+ <tag>javacc-7.0.12</tag>
</scm>
<mailingLists>
<mailingList>
@@ -310,7 +310,7 @@
<arg line="examples/GUIParsing/ParserVersion/CalcInput.jj" />
</java>
<javac fork="true" srcdir="test.tmp/GUIParsing/ParserVersion" />
- <!--
+ <!--
<echo />
<copy todir="test.tmp/GUIParsing/TokenMgrVersion">
<fileset dir="examples/GUIParsing/TokenMgrVersion">
@@ -318,7 +318,7 @@
</fileset>
</copy>
<java failonerror="true" fork="true" classname="javacc" classpath="target/classes">
- <arg line="-OUTPUT_DIRECTORY=test.tmp/GUIParsing/TokenMgrVersion" />
+ <arg line="-OUTPUT_DIRECTORY=test.tmp/GUIParsing/TokenMgrVersion" />
<arg line="examples/GUIParsing/TokenMgrVersion/CalcInput.jj" />
</java>
<javac fork="true" srcdir="test.tmp/GUIParsing/TokenMgrVersion" />
@@ -554,6 +554,21 @@
<arg line="examples/Obfuscator/MapFile.jj" />
</java>
<javac fork="true" srcdir="test.tmp/Obfuscator" />
+
+ <echo />
+ <java failonerror="true" fork="true" classname="javacc" classpath="target/classes">
+ <arg line="-OUTPUT_DIRECTORY=test.tmp/gwtTemplate" />
+ <arg line="test/gwtTemplate/Parser.jj" />
+ </java>
+ <javac fork="true" srcdir="test.tmp/gwtTemplate" />
+
+ <echo />
+ <java failonerror="true" fork="true" classname="javacc" classpath="target/classes">
+ <arg line="-OUTPUT_DIRECTORY=test.tmp/gwtUnicodeTemplate" />
+ <arg line="test/gwtUnicodeTemplate/Parser.jj" />
+ </java>
+ <javac fork="true" srcdir="test.tmp/gwtUnicodeTemplate" />
+
<!-- TODO, test cases for SimpleExamples -->
<echo />
<copy todir="test.tmp/Transformer">
@@ -647,7 +662,7 @@
</execution>
</executions>
</plugin>
- <!--
+ <!--
<plugin>
<artifactId>maven-jarsigner-plugin</artifactId>
<executions>
=====================================
src/main/resources/templates/TokenMgrError.template
=====================================
@@ -99,11 +99,10 @@ ${SUPPORT_CLASS_VISIBILITY_PUBLIC?public :}class ${LEGACY_EXCEPTION_HANDLING?Tok
* Note: You can customize the lexical error message by modifying this method.
*/
protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) {
- char curChar1 = (char)curChar;
return("Lexical error at line " + //
errorLine + ", column " + //
errorColumn + ". Encountered: " + //
- (EOFSeen ? "<EOF>" : ("'" + addEscapes(String.valueOf(curChar)) + "' (" + (int)curChar + "),")) + //
+ (EOFSeen ? "<EOF>" : ("'" + addEscapes(String.valueOf(curChar)) + "' (" + curChar + "),")) + //
(errorAfter == null || errorAfter.length() == 0 ? "" : " after prefix \"" + addEscapes(errorAfter) + "\"")) + //
(lexState == 0 ? "" : " (in lexical state " + lexState + ")");
}
=====================================
src/main/resources/templates/gwt/JavaCharStream.template
=====================================
@@ -2,7 +2,7 @@
* An implementation of interface CharStream, where the stream is assumed to
* contain only ASCII characters (with java-like unicode escape processing).
*/
-
+
#if SUPPORT_CLASS_VISIBILITY_PUBLIC
public
@@ -380,14 +380,13 @@ class JavaCharStream
}
}
-#if GENERATE_ANNOTATIONS
- @Deprecated
-#fi
/**
* @deprecated
* @see #getEndColumn
*/
+#if GENERATE_ANNOTATIONS
@Deprecated
+#fi
${PREFIX}public int getColumn() {
#if KEEP_LINE_COLUMN
return bufcolumn[bufpos];
@@ -396,14 +395,13 @@ class JavaCharStream
#fi
}
-#if GENERATE_ANNOTATIONS
- @Deprecated
-#fi
/**
* @deprecated
* @see #getEndLine
*/
+#if GENERATE_ANNOTATIONS
@Deprecated
+#fi
${PREFIX}public int getLine() {
#if KEEP_LINE_COLUMN
return bufline[bufpos];
=====================================
src/main/resources/templates/gwt/SimpleCharStream.template
=====================================
@@ -215,14 +215,13 @@ ${SUPPORT_CLASS_VISIBILITY_PUBLIC?public :}class SimpleCharStream
return c;
}
-#if GENERATE_ANNOTATIONS
- @Deprecated
-#fi
/**
* @deprecated
* @see #getEndColumn
*/
+#if GENERATE_ANNOTATIONS
@Deprecated
+#fi
${PREFIX}public int getColumn() {
#if KEEP_LINE_COLUMN
return bufcolumn[bufpos];
@@ -231,14 +230,13 @@ ${SUPPORT_CLASS_VISIBILITY_PUBLIC?public :}class SimpleCharStream
#fi
}
-#if GENERATE_ANNOTATIONS
- @Deprecated
-#fi
/**
* @deprecated
* @see #getEndLine
*/
+#if GENERATE_ANNOTATIONS
@Deprecated
+#fi
${PREFIX}public int getLine() {
#if KEEP_LINE_COLUMN
return bufline[bufpos];
=====================================
src/main/resources/version.properties
=====================================
@@ -1,3 +1,3 @@
version.major=7
version.minor=0
-version.patch=11
+version.patch=12
=====================================
test/gwtTemplate/Parser.jj
=====================================
@@ -0,0 +1,76 @@
+/* Copyright (c) 2006, Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Sun Microsystems, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+options {
+ LOOKAHEAD = 1;
+ CHOICE_AMBIGUITY_CHECK = 2;
+ OTHER_AMBIGUITY_CHECK = 1;
+ STATIC = true;
+ DEBUG_PARSER = false;
+ DEBUG_LOOKAHEAD = false;
+ DEBUG_TOKEN_MANAGER = false;
+ ERROR_REPORTING = true;
+ JAVA_UNICODE_ESCAPE = false;
+ UNICODE_INPUT = false;
+ IGNORE_CASE = false;
+ USER_TOKEN_MANAGER = false;
+ USER_CHAR_STREAM = false;
+ BUILD_PARSER = true;
+ BUILD_TOKEN_MANAGER = true;
+ SANITY_CHECK = true;
+ FORCE_LA_CHECK = false;
+ JAVA_TEMPLATE_TYPE = "modern";
+}
+
+PARSER_BEGIN(Parser)
+
+import java.io.IOException;
+
+/** Simple brace matcher. */
+public class Parser {
+
+ /** Main entry point. */
+ public static void main(String args[]) throws ParseException, IOException {
+ Parser parser = new Parser(new StreamProvider(System.in));
+ parser.Input();
+ }
+
+}
+
+PARSER_END(Parser)
+
+/** Root production. */
+void Input() :
+{}
+{
+
+ "A" {
+ System.out.println("hello");
+ } <EOF>
+}
=====================================
test/gwtUnicodeTemplate/Parser.jj
=====================================
@@ -0,0 +1,76 @@
+/* Copyright (c) 2006, Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Sun Microsystems, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+options {
+ LOOKAHEAD = 1;
+ CHOICE_AMBIGUITY_CHECK = 2;
+ OTHER_AMBIGUITY_CHECK = 1;
+ STATIC = true;
+ DEBUG_PARSER = false;
+ DEBUG_LOOKAHEAD = false;
+ DEBUG_TOKEN_MANAGER = false;
+ ERROR_REPORTING = true;
+ JAVA_UNICODE_ESCAPE = true;
+ UNICODE_INPUT = false;
+ IGNORE_CASE = false;
+ USER_TOKEN_MANAGER = false;
+ USER_CHAR_STREAM = false;
+ BUILD_PARSER = true;
+ BUILD_TOKEN_MANAGER = true;
+ SANITY_CHECK = true;
+ FORCE_LA_CHECK = false;
+ JAVA_TEMPLATE_TYPE = "modern";
+}
+
+PARSER_BEGIN(Parser)
+
+import java.io.IOException;
+
+/** Simple brace matcher. */
+public class Parser {
+
+ /** Main entry point. */
+ public static void main(String args[]) throws ParseException, IOException {
+ Parser parser = new Parser(new StreamProvider(System.in));
+ parser.Input();
+ }
+
+}
+
+PARSER_END(Parser)
+
+/** Root production. */
+void Input() :
+{}
+{
+
+ "A" {
+ System.out.println("hello");
+ } <EOF>
+}
=====================================
test/javaFileGeneration/expected/no-keep-line/TokenMgrError.java
=====================================
@@ -101,11 +101,10 @@ public class TokenMgrError extends Error
* Note: You can customize the lexical error message by modifying this method.
*/
protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) {
- char curChar1 = (char)curChar;
return("Lexical error at line " +
errorLine + ", column " +
errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar1)) + "\"") + " (" + curChar + "), ") +
+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + curChar + "), ") +
"after : \"" + addEscapes(errorAfter) + "\"");
}
=====================================
test/javaFileGeneration/expected/non-static/TokenMgrError.java
=====================================
@@ -101,11 +101,10 @@ public class TokenMgrError extends Error
* Note: You can customize the lexical error message by modifying this method.
*/
protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) {
- char curChar1 = (char)curChar;
return("Lexical error at line " +
errorLine + ", column " +
errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar1)) + "\"") + " (" + curChar + "), ") +
+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + curChar + "), ") +
"after : \"" + addEscapes(errorAfter) + "\"");
}
=====================================
test/javaFileGeneration/expected/not-public/TokenMgrError.java
=====================================
@@ -101,11 +101,10 @@ class TokenMgrError extends Error
* Note: You can customize the lexical error message by modifying this method.
*/
protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) {
- char curChar1 = (char)curChar;
return("Lexical error at line " +
errorLine + ", column " +
errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar1)) + "\"") + " (" + curChar + "), ") +
+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + curChar + "), ") +
"after : \"" + addEscapes(errorAfter) + "\"");
}
=====================================
test/javaFileGeneration/expected/static/TokenMgrError.java
=====================================
@@ -101,11 +101,10 @@ public class TokenMgrError extends Error
* Note: You can customize the lexical error message by modifying this method.
*/
protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) {
- char curChar1 = (char)curChar;
return("Lexical error at line " +
errorLine + ", column " +
errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar1)) + "\"") + " (" + curChar + "), ") +
+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + curChar + "), ") +
"after : \"" + addEscapes(errorAfter) + "\"");
}
View it on GitLab: https://salsa.debian.org/java-team/javacc/-/compare/f4de1330ac280f62e4d43f231053f9e6dc90a7ee...41e1c06ebd835e6d90af81c46b6fb218380590f4
--
View it on GitLab: https://salsa.debian.org/java-team/javacc/-/compare/f4de1330ac280f62e4d43f231053f9e6dc90a7ee...41e1c06ebd835e6d90af81c46b6fb218380590f4
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20221207/328934db/attachment.htm>
More information about the pkg-java-commits
mailing list