Skip to content

Commit

Permalink
Merge pull request #245 from MarcMazas/My_new_branch
Browse files Browse the repository at this point in the history
Fix issue #243
  • Loading branch information
zosrothko committed Aug 30, 2022
2 parents 31febfb + 81ab138 commit 22c4541
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 250 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.12 is our latest stable release.
JavaCC 7.0.10 is our latest stable release.

* 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))
* JavaCC 7.0.10 - ([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](docs/release-notes.md#javacc-7.0.10))

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.

Expand All @@ -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.12.zip
$ unzip javacc-7.0.10.zip
or
$ tar xvf javacc-7.0.12.tar.gz
$ tar xvf javacc-7.0.10.tar.gz
```

Then place the binary `javacc-7.0.12.jar` in a new `target/` folder, and rename to `javacc.jar`.
Then place the binary `javacc-7.0.10.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.12/` 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.10/` directory:

```
chmod +x scripts/javacc
Expand Down Expand Up @@ -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.12</version>
<version>7.0.10</version>
</dependency>
```
Expand All @@ -259,7 +259,7 @@ repositories {
}
dependencies {
compile group: 'net.java.dev.javacc', name: 'javacc', version: '7.0.12'
compile group: 'net.java.dev.javacc', name: 'javacc', version: '7.0.10'
}
```
-->
Expand Down
6 changes: 3 additions & 3 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ title: JavaCC
description: The most popular parser generator for use with Java applications.

# Latest release
version: 7.0.11
version: 7.0.10

# Site URLs
github:
contributors_url: https://github.com/javacc/javacc/graphs/contributors
zip_url: https://github.com/javacc/javacc/archive/javacc-7.0.11.zip
tar_url: https://github.com/javacc/javacc/archive/javacc-7.0.11.tar.gz
zip_url: https://github.com/javacc/javacc/archive/javacc-7.0.10.zip
tar_url: https://github.com/javacc/javacc/archive/javacc-7.0.10.tar.gz
2 changes: 1 addition & 1 deletion docs/documentation/grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ javacc_input ::= javacc_options
"PARSER_BEGIN" "(" <IDENTIFIER> ")"
java_compilation_unit
"PARSER_END" "(" <IDENTIFIER> ")"
( production )+
( production )*
<EOF>
```

Expand Down
10 changes: 4 additions & 6 deletions docs/downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

### <a name="stable"></a>All stable releases

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.
N.B. LOOKAHEAD functionality is broken from version 7.0.5. It will be fixed in version 7.0.10. In the interim, if you require LOOKAHEAD functionality, please use version 7.0.4.

JavaCC 7.0.12 is our latest stable release.
JavaCC 7.0.10 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))
* JavaCC 7.0.8 - 2020-06-22 ([Source (zip)](https://github.com/javacc/javacc/archive/javacc-7.0.8.zip), [Source (tar.gz)](https://github.com/javacc/javacc/archive/javacc-7.0.8.tar.gz), [Binaries](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.8/javacc-7.0.8.jar), [Javadocs](https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/7.0.8/javacc-7.0.8-javadoc.jar), [Release Notes](release-notes.md#javacc-7.0.8))
Expand All @@ -36,9 +34,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.12.zip
$ unzip javacc-7.0.10.zip
or
$ tar xvf javacc-7.0.12.tar.gz
$ tar xvf javacc-7.0.10.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.
Expand Down
16 changes: 8 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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.12 is our latest stable release.
JavaCC 7.0.10 is our latest stable release.

* 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))
* JavaCC 7.0.10 - ([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))


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.
Expand All @@ -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.12.zip
$ unzip javacc-7.0.10.zip
or
$ tar xvf javacc-7.0.12.tar.gz
$ tar xvf javacc-7.0.10.tar.gz
```

Then place the binary `javacc-7.0.12.jar` in a new `target/` folder, and rename to `javacc.jar`.
Then place the binary `javacc-7.0.10.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.12/` 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.10/` directory:

```
chmod +x scripts/javacc
Expand Down Expand Up @@ -288,7 +288,7 @@ User | Use Case
[Apache Calcite](https://calcite.apache.org/) | Parsing SQL statements | [Parser.jj](https://github.com/apache/calcite/blob/master/core/src/main/codegen/templates/Parser.jj)
[Apache Camel](https://camel.apache.org/) | Parsing stored SQL templates | [sspt.jj](https://github.com/apache/camel/blob/master/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/template/grammar/sspt.jj)
[Apache Jena](https://jena.apache.org/) | Parsing queries written in SPARQL, ARQ, SSE, Turtle and JSON | [sparql_10](https://github.com/apache/jena/blob/master/jena-arq/Grammar/Final/sparql_10-final.jj), [sparql_11](https://github.com/apache/jena/blob/master/jena-arq/Grammar/Final/sparql_11-final.jj), [arq.jj](https://github.com/apache/jena/blob/master/jena-arq/Grammar/arq.jj), [sse.jj](https://github.com/apache/jena/blob/master/jena-arq/Grammar/sse/sse.jj), [turtle.jj](https://github.com/apache/jena/blob/master/jena-arq/Grammar/turtle.jj), [json.jj](https://github.com/apache/jena/blob/master/jena-arq/Grammar/JSON/json.jj)
[Apache Lucene](https://lucene.apache.org/) | Parsing search queries | [QueryParser.jj](https://github.com/apache/lucene/tree/main/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj)
[Apache Lucene](https://lucene.apache.org/) | Parsing search queries | [QueryParser.jj](https://github.com/apache/lucene-solr/blob/master/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj)
[Apache Tomcat](https://tomcat.apache.org/) | Parsing Expression Language (EL) and JSON | [ELParser.jjt](https://github.com/apache/tomcat/blob/master/java/org/apache/el/parser/ELParser.jjt), [JSONParser.jj](https://github.com/apache/tomcat/blob/master/java/org/apache/tomcat/util/json/JSONParser.jj)
[Apache Zookeeper](https://zookeeper.apache.org/) | Optimising serialisation/deserialisation of Hadoop I/O records | [rcc.jj](https://github.com/apache/zookeeper/blob/master/zookeeper-jute/src/main/java/org/apache/jute/compiler/generated/rcc.jj)
[Java Parser](https://javaparser.org/) | Parsing Java language files | [java.jj](https://github.com/javaparser/javaparser/blob/master/javaparser-core/src/main/javacc/java.jj)
Expand Down
27 changes: 0 additions & 27 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ 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)
Expand Down Expand Up @@ -95,32 +94,6 @@ 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>
Expand Down
29 changes: 6 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>net.java.dev.javacc</groupId>
<artifactId>javacc</artifactId>
<name>JavaCC</name>
<version>7.0.13-SNAPSHOT</version>
<version>7.0.11-SNAPSHOT</version>

<description>JavaCC is a parser/scanner generator for java. </description>
<url>https://github.com/javacc/javacc</url>
Expand Down Expand Up @@ -310,15 +310,15 @@
<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">
<include name="*.java" />
</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" />
Expand Down Expand Up @@ -554,21 +554,6 @@
<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">
Expand Down Expand Up @@ -623,7 +608,6 @@
<executions>
<execution>
<id>generate sources jar</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
Expand All @@ -636,7 +620,6 @@
<executions>
<execution>
<id>generate javadoc jar</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
Expand All @@ -657,20 +640,20 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>deploy</phase>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
<!--
<plugin>
<artifactId>maven-jarsigner-plugin</artifactId>
<executions>
<execution>
<id>sign</id>
<phase>deploy</phase>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/TokenMgrError.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** Token Manager Error. */
${GENERATE_ANNOTATIONS?@SuppressWarnings("all") :}
${SUPPORT_CLASS_VISIBILITY_PUBLIC?public :}class ${LEGACY_EXCEPTION_HANDLING?TokenMgrError:TokenMgrException} extends ${LEGACY_EXCEPTION_HANDLING?Error:RuntimeException}
{

Expand Down Expand Up @@ -102,7 +103,7 @@ ${SUPPORT_CLASS_VISIBILITY_PUBLIC?public :}class ${LEGACY_EXCEPTION_HANDLING?Tok
return("Lexical error at line " + //
errorLine + ", column " + //
errorColumn + ". Encountered: " + //
(EOFSeen ? "<EOF>" : ("'" + addEscapes(String.valueOf(curChar)) + "' (" + curChar + "),")) + //
(EOFSeen ? "<EOF>" : ("'" + addEscapes(String.valueOf((char) curChar)) + "' (" + curChar + "),")) + //
(errorAfter == null || errorAfter.length() == 0 ? "" : " after prefix \"" + addEscapes(errorAfter) + "\"")) + //
(lexState == 0 ? "" : " (in lexical state " + lexState + ")");
}
Expand Down
12 changes: 7 additions & 5 deletions src/main/resources/templates/gwt/JavaCharStream.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -380,13 +380,14 @@ 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];
Expand All @@ -395,13 +396,14 @@ 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];
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/templates/gwt/Provider.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ public interface Provider {
/**
* Reads characters into an array
* @param buffer Destination buffer
* @param offset Offset at which to start storing characters
* @param len The maximum possible number of characters to read
* @param offset Offset at which to start storing characters
* @param length The maximum possible number of characters to read
* @return The number of characters read, or -1 if all read
* @exception IOException
*/
Expand All @@ -19,4 +19,4 @@ public interface Provider {
*/
public void close() throws IOException;

}
}
10 changes: 6 additions & 4 deletions src/main/resources/templates/gwt/SimpleCharStream.template
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ ${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];
Expand All @@ -230,13 +231,14 @@ ${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];
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version.major=7
version.minor=0
version.patch=12
version.patch=11

0 comments on commit 22c4541

Please sign in to comment.