diff --git a/.gitignore b/.gitignore
index e54916ee1d..327c924f68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,4 +29,5 @@ nbactions*.xml
# Playground
#/tool/playground/
-.vscode/
\ No newline at end of file
+.vscode/
+.boot
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000000..cb28b0e37c
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000000..7a838d90f2
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+distributionUrl=https://maven.pkg.st/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
+wrapperUrl=https://maven.pkg.st/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
diff --git a/antlr4-maven-plugin/pom.xml b/antlr4-maven-plugin/pom.xml
index 46750c79ba..62de37f75d 100644
--- a/antlr4-maven-plugin/pom.xml
+++ b/antlr4-maven-plugin/pom.xml
@@ -13,7 +13,7 @@
com.tunnelvisionlabs
antlr4-master
- 4.9.1-SNAPSHOT
+ 4.10.0-SNAPSHOT
antlr4-maven-plugin
@@ -21,13 +21,13 @@
ANTLR 4 Maven plugin
Maven plugin for ANTLR 4 grammars
- http://www.antlr.org
+ https://www.antlr.org
3.0
-
2009
@@ -48,20 +48,17 @@
org.apache.maven
maven-plugin-api
- 3.0.5
- compile
+ provided
org.codehaus.plexus
plexus-compiler-api
- 2.2
org.sonatype.plexus
plexus-build-api
- 0.0.7
-
junit
junit
- 4.13.1
test
-
io.takari.maven.plugins
takari-plugin-testing
- 2.9.0
test
org.apache.maven.plugin-tools
maven-plugin-annotations
- 3.2
provided
org.apache.maven
maven-compat
- 3.0.5
test
org.codehaus.plexus
plexus-utils
- 3.0.15
- provided
+ test
org.apache.maven
maven-project
- 2.2.1
+ provided
@@ -127,9 +117,6 @@
maven-plugin-no-tests
-
- 1.6
-
true
@@ -137,15 +124,12 @@
maven-plugin-tests
-
- !1.6
-
io.takari.maven.plugins
takari-lifecycle-plugin
- 1.11.12
+ true
testProperties
@@ -184,7 +168,6 @@
org.apache.maven.plugins
maven-plugin-plugin
- 3.6.0
true
@@ -208,13 +191,11 @@
org.apache.maven.plugins
maven-site-plugin
- 3.3
org.apache.maven.plugins
maven-project-info-reports-plugin
- 2.7
false
@@ -229,13 +210,11 @@
org.apache.maven.plugins
maven-plugin-plugin
- 3.3
org.apache.maven.plugins
maven-javadoc-plugin
- 2.9
true
@@ -244,7 +223,6 @@
org.apache.maven.plugins
maven-jxr-plugin
- 2.3
diff --git a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java
index aefcf0fce2..8298640f2a 100644
--- a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java
+++ b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java
@@ -6,7 +6,7 @@
package org.antlr.mojo.antlr4;
import org.antlr.v4.Tool;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.ANTLRToolListener;
import org.apache.maven.plugin.logging.Log;
diff --git a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
index b4b6056e77..f706c9e358 100644
--- a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
+++ b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
@@ -9,7 +9,7 @@
import org.antlr.v4.Tool;
import org.antlr.v4.codegen.CodeGenerator;
import org.antlr.v4.runtime.misc.MultiMap;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.tool.Grammar;
import org.apache.maven.plugin.AbstractMojo;
diff --git a/antlr4-testgen-maven-plugin/pom.xml b/antlr4-testgen-maven-plugin/pom.xml
index d04fc11998..5c6b12cfb5 100644
--- a/antlr4-testgen-maven-plugin/pom.xml
+++ b/antlr4-testgen-maven-plugin/pom.xml
@@ -9,7 +9,7 @@
com.tunnelvisionlabs
antlr4-master
- 4.9.1-SNAPSHOT
+ 4.10.0-SNAPSHOT
antlr4-testgen-maven-plugin
@@ -17,13 +17,13 @@
ANTLR 4 Test Generator Maven plugin
Maven plugin for generating ANTLR 4 runtime tests
- http://www.antlr.org
+ https://www.antlr.org
3.0
-
2009
@@ -31,7 +31,7 @@
true
@@ -142,13 +134,11 @@
org.apache.maven.plugins
maven-site-plugin
- 3.3
org.apache.maven.plugins
maven-project-info-reports-plugin
- 2.7
false
@@ -163,13 +153,11 @@
org.apache.maven.plugins
maven-plugin-plugin
- 3.3
org.apache.maven.plugins
maven-javadoc-plugin
- 2.9
true
@@ -178,7 +166,6 @@
org.apache.maven.plugins
maven-jxr-plugin
- 2.3
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 0000000000..ceabc3f878
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+VERSION="4.10.0-BOOTSTRAP"
+
+echo "Installing boostrap runtime JAR...";
+mvn install:install-file \
+ -Dfile="./lib/antlr4-bootstrap.jar" \
+ -DgroupId="com.tunnelvisionlabs" \
+ -DartifactId="antlr4-runtime" \
+ -Dversion="$VERSION" \
+ -Dpackaging=jar
+
+echo "Installing boostrap Maven plugin JAR...";
+mvn install:install-file \
+ -Dfile="./lib/antlr4-bootstrap-maven-plugin.jar" \
+ -DgroupId="com.tunnelvisionlabs" \
+ -DartifactId="antlr4-maven-plugin" \
+ -Dversion="$VERSION" \
+ -Dpackaging=jar
diff --git a/lib/antlr4-bootstrap-maven-plugin.jar b/lib/antlr4-bootstrap-maven-plugin.jar
new file mode 100644
index 0000000000..a37999bf81
Binary files /dev/null and b/lib/antlr4-bootstrap-maven-plugin.jar differ
diff --git a/lib/antlr4-bootstrap.jar b/lib/antlr4-bootstrap.jar
new file mode 100644
index 0000000000..6bfa6ce946
Binary files /dev/null and b/lib/antlr4-bootstrap.jar differ
diff --git a/lib/plugin-enhanced.xml b/lib/plugin-enhanced.xml
new file mode 100644
index 0000000000..2cf89d4e5c
--- /dev/null
+++ b/lib/plugin-enhanced.xml
@@ -0,0 +1,287 @@
+
+
+
+
+
+ ANTLR 4 Maven plugin
+ Maven plugin for ANTLR 4 grammars
+ com.tunnelvisionlabs
+ antlr4-maven-plugin
+ 4.10.0-BOOTSTRAP
+ antlr4
+ false
+ true
+ 11
+ 3.0
+
+
+ antlr4
+ Parses ANTLR 4 grammar files <code>*.g4</code> and transforms them into Java source files.
+ compile
+ false
+ true
+ false
+ false
+ false
+ true
+ generate-sources
+ org.antlr.mojo.antlr4.Antlr4Mojo
+ java
+ per-lookup
+ once-per-session
+ false
+
+
+ arguments
+ java.util.List<java.lang.String>
+ false
+ true
+ A list of additional command line arguments to pass to the ANTLR tool.
+
+
+ atn
+ boolean
+ false
+ true
+ If set to true then the ANTLR tool will generate a description of the ATN for each rule in <a href="http://www.graphviz.org">Dot format</a>.
+
+
+ excludes
+ java.util.Set<java.lang.String>
+ false
+ true
+ A set of Ant-like exclusion patterns used to prevent certain files from being processed. By default, this set is empty such that no files are excluded.
+
+
+ forceATN
+ boolean
+ false
+ true
+ Use the ATN simulator for all predictions.
+
+
+ generateTestSources
+ boolean
+ false
+ true
+ Specifies whether sources are added to the <code>compile</code> or <code>test</code> scope.
+
+
+ includes
+ java.util.Set<java.lang.String>
+ false
+ true
+ Provides an explicit list of all the grammars that should be included in the generate phase of the plugin. Note that the plugin is smart enough to realize that imported grammars should be included but not acted upon directly by the ANTLR Tool.
+<p>A set of Ant-like inclusion patterns used to select files from the source directory for processing. By default, the pattern <code>**/*.g4</code> is used to select grammar files.</p>
+
+
+ inputEncoding
+ java.lang.String
+ false
+ true
+ specify grammar file encoding; e.g., euc-jp
+
+
+ libDirectory
+ java.io.File
+ false
+ true
+ Specify location of imported grammars and tokens files.
+
+
+ listener
+ boolean
+ false
+ true
+ Generate parse tree listener interface and base class.
+
+
+ options
+ java.util.Map<java.lang.String, java.lang.String>
+ false
+ true
+ A list of grammar options to explicitly specify to the tool. These options are passed to the tool using the <code>-D<option>=<value></code> syntax.
+
+
+ outputDirectory
+ java.io.File
+ false
+ true
+ Specify output directory where the Java files are generated.
+
+
+ outputEncoding
+ java.lang.String
+ false
+ true
+ specify output file encoding; defaults to source encoding
+
+
+ project
+ org.apache.maven.project.MavenProject
+ true
+ false
+ The current Maven project.
+
+
+ sourceDirectory
+ java.io.File
+ false
+ true
+ The directory where the ANTLR grammar files (<code>*.g4</code>) are located.
+
+
+ statusDirectory
+ java.io.File
+ false
+ false
+ The directory where build status information is located.
+
+
+ treatWarningsAsErrors
+ boolean
+ false
+ true
+ Treat warnings as errors.
+
+
+ visitor
+ boolean
+ false
+ true
+ Generate parse tree visitor interface and base class.
+
+
+
+ ${antlr4.atn}
+ ${antlr4.forceATN}
+ ${antlr4.generateTestSources}
+ ${project.build.sourceEncoding}
+
+ ${antlr4.listener}
+
+ ${project.build.sourceEncoding}
+ ${project}
+
+
+ ${antlr4.treatWarningsAsErrors}
+ ${antlr4.visitor}
+
+
+
+ org.sonatype.plexus.build.incremental.BuildContext
+ buildContext
+
+
+
+
+ help
+ Display help information on antlr4-maven-plugin.
+<br />
+ Call <code>mvn antlr4:help -Ddetail=true -Dgoal=<goal-name></code> to display parameter details.
+ false
+ false
+ false
+ false
+ false
+ true
+ com.tunnelvisionlabs.antlr4_maven_plugin.HelpMojo
+ java
+ per-lookup
+ once-per-session
+ true
+
+
+ detail
+ boolean
+ false
+ true
+ If <code>true</code>, display all settable properties for each goal.
+
+
+ goal
+ java.lang.String
+ false
+ true
+ The name of the goal for which to show help. If unspecified, all goals will be displayed.
+
+
+ indentSize
+ int
+ false
+ true
+ The number of spaces per indentation level, should be positive.
+
+
+ lineLength
+ int
+ false
+ true
+ The maximum length of a display line, should be positive.
+
+
+
+ ${detail}
+ ${goal}
+ ${indentSize}
+ ${lineLength}
+
+
+
+
+
+ org.codehaus.plexus
+ plexus-compiler-api
+ jar
+ 2.2
+
+
+ org.sonatype.plexus
+ plexus-build-api
+ jar
+ 0.0.7
+
+
+ com.tunnelvisionlabs
+ antlr4
+ jar
+ 4.10.0-SNAPSHOT
+
+
+ com.tunnelvisionlabs
+ antlr4-runtime
+ jar
+ 4.10.0-SNAPSHOT
+
+
+ com.tunnelvisionlabs
+ antlr4-annotations
+ jar
+ 4.10.0-SNAPSHOT
+
+
+ org.antlr
+ antlr-runtime
+ jar
+ 3.5.2
+
+
+ org.antlr
+ ST4
+ jar
+ 4.0.8
+
+
+ org.abego.treelayout
+ org.abego.treelayout.core
+ jar
+ 1.0.1
+
+
+ com.ibm.icu
+ icu4j
+ jar
+ 58.2
+
+
+
\ No newline at end of file
diff --git a/mvnw b/mvnw
new file mode 100755
index 0000000000..190dd2d08b
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,317 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Apache Maven Wrapper startup batch script, version 3.2.0
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ ! -f ./.boot ]
+then
+ touch ./.boot;
+ echo "Bootstrapping 'antlr4' project (one-time step)...";
+ bash ./bootstrap.sh;
+ echo "Project bootstrap artifacts installed in local Maven repository. Proceeding with build.";
+ sleep 1;
+fi
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /usr/local/etc/mavenrc ] ; then
+ . /usr/local/etc/mavenrc
+ fi
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "$(uname)" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
+ else
+ JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=$(java-config --jre-home)
+ fi
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
+ JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="$(which javac)"
+ if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=$(which readlink)
+ if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
+ if $darwin ; then
+ javaHome="$(dirname "\"$javaExecutable\"")"
+ javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
+ else
+ javaExecutable="$(readlink -f "\"$javaExecutable\"")"
+ fi
+ javaHome="$(dirname "\"$javaExecutable\"")"
+ javaHome=$(expr "$javaHome" : '\(.*\)/bin')
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=$(cd "$wdir/.." || exit 1; pwd)
+ fi
+ # end of workaround
+ done
+ printf '%s' "$(cd "$basedir" || exit 1; pwd)"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ # Remove \r in case we run on Windows within Git Bash
+ # and check out the repository with auto CRLF management
+ # enabled. Otherwise, we may read lines that are delimited with
+ # \r\n and produce $'-Xarg\r' rather than -Xarg due to word
+ # splitting rules.
+ tr -s '\r\n' ' ' < "$1"
+ fi
+}
+
+log() {
+ if [ "$MVNW_VERBOSE" = true ]; then
+ printf '%s\n' "$1"
+ fi
+}
+
+BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
+log "$MAVEN_PROJECTBASEDIR"
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
+if [ -r "$wrapperJarPath" ]; then
+ log "Found $wrapperJarPath"
+else
+ log "Couldn't find $wrapperJarPath, downloading it ..."
+
+ if [ -n "$MVNW_REPOURL" ]; then
+ wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ else
+ wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ fi
+ while IFS="=" read -r key value; do
+ # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
+ safeValue=$(echo "$value" | tr -d '\r')
+ case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
+ esac
+ done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
+ log "Downloading from: $wrapperUrl"
+
+ if $cygwin; then
+ wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
+ fi
+
+ if command -v wget > /dev/null; then
+ log "Found wget ... using wget"
+ [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+ else
+ wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ log "Found curl ... using curl"
+ [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
+ else
+ curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
+ fi
+ else
+ log "Falling back to using Java to download"
+ javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaSource=$(cygpath --path --windows "$javaSource")
+ javaClass=$(cygpath --path --windows "$javaClass")
+ fi
+ if [ -e "$javaSource" ]; then
+ if [ ! -e "$javaClass" ]; then
+ log " - Compiling MavenWrapperDownloader.java ..."
+ ("$JAVA_HOME/bin/javac" "$javaSource")
+ fi
+ if [ -e "$javaClass" ]; then
+ log " - Running MavenWrapperDownloader.java ..."
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+# If specified, validate the SHA-256 sum of the Maven wrapper jar file
+wrapperSha256Sum=""
+while IFS="=" read -r key value; do
+ case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
+ esac
+done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
+if [ -n "$wrapperSha256Sum" ]; then
+ wrapperSha256Result=false
+ if command -v sha256sum > /dev/null; then
+ if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
+ wrapperSha256Result=true
+ fi
+ elif command -v shasum > /dev/null; then
+ if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
+ wrapperSha256Result=true
+ fi
+ else
+ echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available."
+ echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
+ exit 1
+ fi
+ if [ $wrapperSha256Result = false ]; then
+ echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
+ echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
+ echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
+ exit 1
+ fi
+fi
+
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+# shellcheck disable=SC2086 # safe args
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ $MAVEN_DEBUG_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100755
index 0000000000..c4586b564e
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,205 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Apache Maven Wrapper startup batch script, version 3.2.0
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %WRAPPER_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
+SET WRAPPER_SHA_256_SUM=""
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
+)
+IF NOT %WRAPPER_SHA_256_SUM%=="" (
+ powershell -Command "&{"^
+ "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^
+ "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
+ " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^
+ " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^
+ " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^
+ " exit 1;"^
+ "}"^
+ "}"
+ if ERRORLEVEL 1 goto error
+)
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+ %JVM_CONFIG_MAVEN_PROPS% ^
+ %MAVEN_OPTS% ^
+ %MAVEN_DEBUG_OPTS% ^
+ -classpath %WRAPPER_JAR% ^
+ "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+ %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%
diff --git a/perf-testsuite/pom.xml b/perf-testsuite/pom.xml
index 5416543093..dd582df944 100644
--- a/perf-testsuite/pom.xml
+++ b/perf-testsuite/pom.xml
@@ -10,7 +10,7 @@
com.tunnelvisionlabs
antlr4-master
- 4.9.1-SNAPSHOT
+ 4.10.0-SNAPSHOT
antlr4-perf-testsuite
@@ -22,7 +22,6 @@
junit
junit
- 4.13.1
test
@@ -46,7 +45,6 @@
org.openjdk.jol
jol-core
- 0.8
compile
@@ -65,7 +63,6 @@
org.jacoco
jacoco-maven-plugin
- 0.7.7.201606060606
@@ -131,5 +128,4 @@
-
diff --git a/pom.xml b/pom.xml
index 66c21e569c..e7aaff48ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,12 +15,12 @@
4.0.0
com.tunnelvisionlabs
antlr4-master
- 4.9.1-SNAPSHOT
+ 4.10.0-SNAPSHOT
pom
ANTLR 4
ANTLR 4 Master Build POM
- http://www.antlr.org
+ https://www.antlr.org
1992
Tunnel Vision Laboratories, LLC
- http://tunnelvisionlabs.com
+ https://tunnelvisionlabs.com
The BSD License
- http://www.antlr.org/license.html
+ https://www.antlr.org/license.html
repo
@@ -51,7 +51,7 @@
Sam Harwell
- http://tunnelvisionlabs.com
+ https://tunnelvisionlabs.com
Developer
@@ -60,7 +60,7 @@
Jim Idle
jimi@idle.ws
- http://www.linkedin.com/in/jimidle
+ https://www.linkedin.com/in/jimidle
Developer - Maven Plugin
@@ -72,8 +72,8 @@
runtime/Java
runtime/JavaAnnotations
tool
- antlr4-maven-plugin
antlr4-testgen-maven-plugin
+ antlr4-maven-plugin
runtime-testsuite
perf-testsuite
@@ -81,13 +81,11 @@
UTF-8
UTF-8
- ${env.JAVA5_HOME}
- ${env.JAVA6_HOME}
- ${java5.home}/lib/rt.jar
- ${java6.home}/lib/rt.jar
- ${bootclasspath.java6}
- ${bootclasspath.java6}
true
+ 4.10.0-BOOTSTRAP
+ 11
+ 11
+ 11
@@ -146,23 +144,6 @@
-
- jdk6-bnd
-
- 1.6
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- 2.5.4
- true
-
-
-
-
-
jdk7plus-bnd
@@ -173,7 +154,7 @@
org.apache.felix
maven-bundle-plugin
- 3.0.1
+ 5.1.9
true
@@ -183,26 +164,42 @@
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+
+
+ enforce-maven
+
+ enforce
+
+
+
+
+ 3.9.6
+
+
+
+
+
+
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.1
true
true
-
- 1.6
+
+ 11
-Xlint
-Xlint:-serial
-
org.apache.maven.plugins
maven-jar-plugin
- 2.6
@@ -211,42 +208,28 @@
-
org.apache.maven.plugins
maven-surefire-plugin
- 2.18.1
-
org.apache.maven.plugins
maven-source-plugin
-
- 2.4
-
org.apache.maven.plugins
maven-javadoc-plugin
-
- 2.10.3
true
-
org.apache.maven.plugins
maven-gpg-plugin
-
- 1.6
-
org.apache.maven.plugins
maven-release-plugin
-
- 2.5.3
-Psonatype-oss-release ${release.arguments}
true
@@ -254,5 +237,196 @@
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 3.4.1
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.12.1
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.3.0
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.2.5
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.3.0
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.6.3
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.1.0
+
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ 3.0.1
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.5.2
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.11
+
+
+ org.antlr
+ antlr3-maven-plugin
+ 3.5.3
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+ 3.12.1
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+ 3.5.0
+
+
+ org.apache.maven.plugins
+ maven-plugin-plugin
+ 3.11.0
+
+
+ org.apache.maven.plugins
+ maven-jxr-plugin
+ 3.3.2
+
+
+ io.takari.maven.plugins
+ takari-lifecycle-plugin
+ 2.1.4
+
+
+ us.bryon
+ graphviz-maven-plugin
+ 1.0
+
+
+ com.webguys
+ string-template-maven-plugin
+ 1.1
+
+
+
+
+
+
+ org.codehaus.plexus
+ plexus-compiler-api
+ 2.2
+
+
+ org.sonatype.plexus
+ plexus-build-api
+ 0.0.7
+
+
+ org.antlr
+ ST4
+ 4.0.8
+
+
+ org.antlr
+ antlr-runtime
+ 3.5.2
+
+
+ org.abego.treelayout
+ org.abego.treelayout.core
+ 1.0.1
+
+
+ com.ibm.icu
+ icu4j
+ 58.2
+
+
+ org.openjdk.jol
+ jol-core
+ 0.8
+
+
+
+ com.tunnelvisionlabs
+ antlr4
+ ${project.version}
+
+
+ com.tunnelvisionlabs
+ runtime-testsuite
+ ${project.version}
+
+
+ com.tunnelvisionlabs
+ antlr4-annotations
+ ${project.version}
+
+
+
+ org.apache.maven
+ maven-plugin-api
+ 3.0.5
+
+
+ org.apache.maven.plugin-tools
+ maven-plugin-annotations
+ 3.2
+
+
+ org.apache.maven
+ maven-compat
+ 3.0.5
+
+
+ org.codehaus.plexus
+ plexus-utils
+ 3.0.24
+
+
+ org.apache.maven
+ maven-project
+ 2.2.1
+
+
+
+ io.takari.maven.plugins
+ takari-plugin-testing
+ 2.9.0
+
+
+ org.apache.maven.shared
+ maven-plugin-testing-harness
+ 1.1
+
+
+ junit
+ junit
+ 4.13.1
+
+
+
diff --git a/runtime-testsuite/pom.xml b/runtime-testsuite/pom.xml
index 79732b2d3f..0b081e6de1 100644
--- a/runtime-testsuite/pom.xml
+++ b/runtime-testsuite/pom.xml
@@ -10,7 +10,7 @@
com.tunnelvisionlabs
antlr4-master
- 4.9.1-SNAPSHOT
+ 4.10.0-SNAPSHOT
runtime-testsuite
@@ -18,11 +18,7 @@
ANTLR 4 Runtime Test Generator
A collection of tests for ANTLR 4 Runtime libraries.
- http://www.antlr.org
-
-
- 3.0
-
+ https://www.antlr.org
2009
diff --git a/runtime/Java/pom.xml b/runtime/Java/pom.xml
index 9634397171..0be699c012 100644
--- a/runtime/Java/pom.xml
+++ b/runtime/Java/pom.xml
@@ -10,8 +10,8 @@
com.tunnelvisionlabs
antlr4-master
- 4.9.1-SNAPSHOT
- ../..
+ 4.10.0-SNAPSHOT
+ ../../pom.xml
antlr4-runtime
@@ -29,7 +29,6 @@
com.tunnelvisionlabs
antlr4-annotations
- ${project.version}
compile
true
@@ -37,7 +36,6 @@
junit
junit
- 4.13.1
test
@@ -50,7 +48,6 @@
us.bryon
graphviz-maven-plugin
- 1.0
@@ -79,7 +76,6 @@
org.apache.maven.plugins
maven-shade-plugin
- 2.2
false
@@ -123,17 +119,26 @@
org.apache.maven.plugins
maven-compiler-plugin
+
+
+ com.tunnelvisionlabs
+ antlr4-annotations
+ ${project.version}
+
+
-processor
- org.antlr.v4.runtime.misc.NullUsageProcessor
+ org.antlr.v4.runtime.processors.NullUsageProcessor
+
+ 11
com.tunnelvisionlabs
antlr4-maven-plugin
- 4.7.2
+ ${antlr4.plugin.bootstrap.version}
src
diff --git a/runtime/Java/src/module-info.java b/runtime/Java/src/module-info.java
new file mode 100644
index 0000000000..55f0268c1f
--- /dev/null
+++ b/runtime/Java/src/module-info.java
@@ -0,0 +1,13 @@
+module antlr.runtime {
+ requires antlr.annotations;
+ requires java.compiler;
+ requires java.logging;
+
+ exports org.antlr.v4.runtime;
+ exports org.antlr.v4.runtime.atn;
+ exports org.antlr.v4.runtime.dfa;
+ exports org.antlr.v4.runtime.misc;
+ exports org.antlr.v4.runtime.tree;
+ exports org.antlr.v4.runtime.tree.pattern;
+ exports org.antlr.v4.runtime.tree.xpath;
+}
diff --git a/runtime/Java/src/org/antlr/v4/runtime/ANTLRErrorListener.java b/runtime/Java/src/org/antlr/v4/runtime/ANTLRErrorListener.java
index 945e378499..9a14a2a242 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/ANTLRErrorListener.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/ANTLRErrorListener.java
@@ -6,8 +6,8 @@
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/** How to emit recognition errors. */
public interface ANTLRErrorListener {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/ANTLRErrorStrategy.java b/runtime/Java/src/org/antlr/v4/runtime/ANTLRErrorStrategy.java
index fb2e9e59bd..c896dd2b1f 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/ANTLRErrorStrategy.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/ANTLRErrorStrategy.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.tree.ErrorNode;
/**
diff --git a/runtime/Java/src/org/antlr/v4/runtime/ANTLRFileStream.java b/runtime/Java/src/org/antlr/v4/runtime/ANTLRFileStream.java
index 41a3854233..4f092f6116 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/ANTLRFileStream.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/ANTLRFileStream.java
@@ -5,8 +5,8 @@
*/
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Utils;
import java.io.IOException;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/BaseErrorListener.java b/runtime/Java/src/org/antlr/v4/runtime/BaseErrorListener.java
index 3d9eedef5a..6b884e190a 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/BaseErrorListener.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/BaseErrorListener.java
@@ -8,8 +8,8 @@
import org.antlr.v4.runtime.atn.ATNConfigSet;
import org.antlr.v4.runtime.atn.SimulatorState;
import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.BitSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java b/runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java
index 1c6b824599..f5bdc50c90 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.ArrayList;
import java.util.BitSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/CharStream.java b/runtime/Java/src/org/antlr/v4/runtime/CharStream.java
index 32ade257fe..855d089094 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/CharStream.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/CharStream.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/** A source of characters for an ANTLR lexer. */
public interface CharStream extends IntStream {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/CommonToken.java b/runtime/Java/src/org/antlr/v4/runtime/CommonToken.java
index f4adc032f7..f5b7f4c13f 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/CommonToken.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/CommonToken.java
@@ -6,8 +6,8 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/CommonTokenStream.java b/runtime/Java/src/org/antlr/v4/runtime/CommonTokenStream.java
index ee6c4db212..2ca2bb5a70 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/CommonTokenStream.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/CommonTokenStream.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* This class extends {@link BufferedTokenStream} with functionality to filter
diff --git a/runtime/Java/src/org/antlr/v4/runtime/DefaultErrorStrategy.java b/runtime/Java/src/org/antlr/v4/runtime/DefaultErrorStrategy.java
index 89669ff4ba..eee699457a 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/DefaultErrorStrategy.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/DefaultErrorStrategy.java
@@ -11,8 +11,8 @@
import org.antlr.v4.runtime.atn.PredictionContext;
import org.antlr.v4.runtime.atn.RuleTransition;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
/**
diff --git a/runtime/Java/src/org/antlr/v4/runtime/DiagnosticErrorListener.java b/runtime/Java/src/org/antlr/v4/runtime/DiagnosticErrorListener.java
index 25a2622e67..ddf194b664 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/DiagnosticErrorListener.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/DiagnosticErrorListener.java
@@ -11,8 +11,8 @@
import org.antlr.v4.runtime.atn.SimulatorState;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.BitSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/FailedPredicateException.java b/runtime/Java/src/org/antlr/v4/runtime/FailedPredicateException.java
index 515c18bf47..548d13ca53 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/FailedPredicateException.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/FailedPredicateException.java
@@ -8,8 +8,8 @@
import org.antlr.v4.runtime.atn.ATNState;
import org.antlr.v4.runtime.atn.AbstractPredicateTransition;
import org.antlr.v4.runtime.atn.PredicateTransition;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Locale;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/InputMismatchException.java b/runtime/Java/src/org/antlr/v4/runtime/InputMismatchException.java
index e062bd5bc3..85030c9291 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/InputMismatchException.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/InputMismatchException.java
@@ -5,7 +5,7 @@
*/
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/** This signifies any kind of mismatched input exceptions such as
* when the current input does not match the expected token.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/IntStream.java b/runtime/Java/src/org/antlr/v4/runtime/IntStream.java
index 1a1db9f0c4..a3fa2ef04e 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/IntStream.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/IntStream.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* A simple stream of symbols whose values are represented as integers. This
diff --git a/runtime/Java/src/org/antlr/v4/runtime/InterpreterRuleContext.java b/runtime/Java/src/org/antlr/v4/runtime/InterpreterRuleContext.java
index 9e1960dbc4..c0c0a101e8 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/InterpreterRuleContext.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/InterpreterRuleContext.java
@@ -5,7 +5,7 @@
*/
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.Nullable;
/**
* This class extends {@link ParserRuleContext} by allowing the value of
diff --git a/runtime/Java/src/org/antlr/v4/runtime/Lexer.java b/runtime/Java/src/org/antlr/v4/runtime/Lexer.java
index 0973200cf2..5f0e141377 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/Lexer.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/Lexer.java
@@ -9,7 +9,7 @@
import org.antlr.v4.runtime.atn.LexerATNSimulator;
import org.antlr.v4.runtime.misc.IntegerStack;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/LexerInterpreter.java b/runtime/Java/src/org/antlr/v4/runtime/LexerInterpreter.java
index 55f3332745..445fc00d91 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/LexerInterpreter.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/LexerInterpreter.java
@@ -9,8 +9,8 @@
import org.antlr.v4.runtime.atn.ATN;
import org.antlr.v4.runtime.atn.ATNType;
import org.antlr.v4.runtime.atn.LexerATNSimulator;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Collection;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/LexerNoViableAltException.java b/runtime/Java/src/org/antlr/v4/runtime/LexerNoViableAltException.java
index 0010bb9d5a..95dfa71588 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/LexerNoViableAltException.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/LexerNoViableAltException.java
@@ -8,8 +8,8 @@
import org.antlr.v4.runtime.atn.ATNConfigSet;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Utils;
import java.util.Locale;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/ListTokenSource.java b/runtime/Java/src/org/antlr/v4/runtime/ListTokenSource.java
index ad84f0d053..05b7ccad45 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/ListTokenSource.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/ListTokenSource.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.misc.Tuple;
import java.util.List;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/NoViableAltException.java b/runtime/Java/src/org/antlr/v4/runtime/NoViableAltException.java
index f0d2004c36..a4b9be9dc7 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/NoViableAltException.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/NoViableAltException.java
@@ -6,8 +6,8 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.atn.ATNConfigSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/** Indicates that the parser could not decide which of two or more paths
* to take based upon the remaining input. It tracks the starting token
diff --git a/runtime/Java/src/org/antlr/v4/runtime/Parser.java b/runtime/Java/src/org/antlr/v4/runtime/Parser.java
index 745d73aad8..efb63ce2ca 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/Parser.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/Parser.java
@@ -17,8 +17,8 @@
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.IntegerStack;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.ErrorNodeImpl;
import org.antlr.v4.runtime.tree.ParseTreeListener;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/ParserErrorListener.java b/runtime/Java/src/org/antlr/v4/runtime/ParserErrorListener.java
index 8ad72e1078..568754dce6 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/ParserErrorListener.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/ParserErrorListener.java
@@ -12,8 +12,8 @@
import org.antlr.v4.runtime.atn.PredictionMode;
import org.antlr.v4.runtime.atn.SimulatorState;
import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.BitSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java b/runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java
index 93065bdb16..b29379a313 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java
@@ -19,7 +19,7 @@
import org.antlr.v4.runtime.atn.RuleTransition;
import org.antlr.v4.runtime.atn.StarLoopEntryState;
import org.antlr.v4.runtime.atn.Transition;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/ParserRuleContext.java b/runtime/Java/src/org/antlr/v4/runtime/ParserRuleContext.java
index b94bce3df3..e2f99b540a 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/ParserRuleContext.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/ParserRuleContext.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.ErrorNodeImpl;
import org.antlr.v4.runtime.tree.ParseTree;
@@ -322,13 +322,13 @@ public Interval getSourceInterval() {
return Interval.of(start.getTokenIndex(), stop.getTokenIndex());
}
- /**
- * Get the initial token in this context.
+ /**
+ * Get the initial token in this context.
* Note that the range from start to stop is inclusive, so for rules that do not consume anything
* (for example, zero length or error productions) this token may exceed stop.
*/
public Token getStart() { return start; }
- /**
+ /**
* Get the final token in this context.
* Note that the range from start to stop is inclusive, so for rules that do not consume anything
* (for example, zero length or error productions) this token may precede start.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/ProxyErrorListener.java b/runtime/Java/src/org/antlr/v4/runtime/ProxyErrorListener.java
index be41fc97aa..16bd4be4ac 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/ProxyErrorListener.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/ProxyErrorListener.java
@@ -5,8 +5,8 @@
*/
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Collection;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/RecognitionException.java b/runtime/Java/src/org/antlr/v4/runtime/RecognitionException.java
index 108bc6eb61..49c33a87a6 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/RecognitionException.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/RecognitionException.java
@@ -7,7 +7,7 @@
import org.antlr.v4.runtime.atn.DecisionState;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.Nullable;
/** The root of the ANTLR exception hierarchy. In general, ANTLR tracks just
* 3 kinds of errors: prediction errors, failed predicate errors, and
diff --git a/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java b/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java
index 6b24ddef0d..8508d5df95 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java
@@ -10,8 +10,8 @@
import org.antlr.v4.runtime.atn.ATNSimulator;
import org.antlr.v4.runtime.atn.ParseInfo;
import org.antlr.v4.runtime.misc.Args;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Utils;
import java.util.ArrayList;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java b/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java
index aaf4c0ecf8..5cbfe31b35 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java
@@ -7,7 +7,7 @@
import org.antlr.v4.runtime.atn.ATN;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
import org.antlr.v4.runtime.tree.RuleNode;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/TokenFactory.java b/runtime/Java/src/org/antlr/v4/runtime/TokenFactory.java
index 197434e6f6..de1a4a4ebf 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/TokenFactory.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/TokenFactory.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.misc.Tuple2;
/** The default mechanism for creating tokens. It's used by default in Lexer and
diff --git a/runtime/Java/src/org/antlr/v4/runtime/TokenSource.java b/runtime/Java/src/org/antlr/v4/runtime/TokenSource.java
index 7ba1f7ca37..1df5caf426 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/TokenSource.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/TokenSource.java
@@ -5,8 +5,8 @@
*/
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/**
* A source of tokens must provide a sequence of tokens via {@link #nextToken()}
diff --git a/runtime/Java/src/org/antlr/v4/runtime/TokenStream.java b/runtime/Java/src/org/antlr/v4/runtime/TokenStream.java
index bc6bba9790..8579068e5e 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/TokenStream.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/TokenStream.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* An {@link IntStream} whose symbols are {@link Token} instances.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java b/runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java
index b4e451480c..4a7265f1da 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/UnbufferedTokenStream.java b/runtime/Java/src/org/antlr/v4/runtime/UnbufferedTokenStream.java
index 8f8be4646c..ff9fb3b48a 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/UnbufferedTokenStream.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/UnbufferedTokenStream.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.Arrays;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/Vocabulary.java b/runtime/Java/src/org/antlr/v4/runtime/Vocabulary.java
index 0aab1c416d..5e81e95a48 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/Vocabulary.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/Vocabulary.java
@@ -5,8 +5,8 @@
*/
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/**
* This interface provides information about the vocabulary used by a
diff --git a/runtime/Java/src/org/antlr/v4/runtime/VocabularyImpl.java b/runtime/Java/src/org/antlr/v4/runtime/VocabularyImpl.java
index fea005f91e..9a5ceae5af 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/VocabularyImpl.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/VocabularyImpl.java
@@ -5,8 +5,8 @@
*/
package org.antlr.v4.runtime;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Arrays;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATN.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATN.java
index 560e862333..3bd21fd669 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATN.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATN.java
@@ -12,8 +12,8 @@
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.Args;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java
index 459a964672..af86621e5b 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java
@@ -8,8 +8,8 @@
import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.ObjectEqualityComparator;
import java.util.ArrayDeque;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java
index 586840a1bc..17879dc0e6 100755
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java
@@ -6,8 +6,8 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Utils;
import java.util.ArrayList;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializationOptions.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializationOptions.java
index f71b857d3d..4c6a15c7df 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializationOptions.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializationOptions.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
*
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java
index acbb812931..ed3c280542 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java
@@ -10,8 +10,8 @@
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
import org.antlr.v4.runtime.misc.Tuple3;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNSimulator.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNSimulator.java
index ecb9f4d5d9..15d62fc2ba 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNSimulator.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNSimulator.java
@@ -9,7 +9,7 @@
import org.antlr.v4.runtime.dfa.DFAState;
import org.antlr.v4.runtime.dfa.EmptyEdgeMap;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.List;
import java.util.UUID;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java
index f52a125c4a..651ea44140 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
public final class ActionTransition extends Transition {
public final int ruleIndex;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/AmbiguityInfo.java b/runtime/Java/src/org/antlr/v4/runtime/atn/AmbiguityInfo.java
index a8b21d315c..a33a6be531 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/AmbiguityInfo.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/AmbiguityInfo.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.ParserErrorListener;
import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.BitSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ArrayPredictionContext.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ArrayPredictionContext.java
index 7fe71e34c2..d5a349c674 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ArrayPredictionContext.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ArrayPredictionContext.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime.atn;
import org.antlr.v4.runtime.atn.PredictionContextCache.IdentityCommutativePredictionContextOperands;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.ArrayDeque;
import java.util.Arrays;
@@ -110,7 +110,7 @@ private static PredictionContext appendContext(PredictionContext context, Predic
if (context.hasEmpty()) {
return EMPTY_LOCAL;
}
-
+
throw new UnsupportedOperationException("what to do here?");
}
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java
index 43bc8ae3ae..edd654b9b0 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime.atn;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/** TODO: make all transitions sets? no, should remove set edges */
public final class AtomTransition extends Transition {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ContextSensitivityInfo.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ContextSensitivityInfo.java
index e6bcbf27df..8a88a2d553 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ContextSensitivityInfo.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ContextSensitivityInfo.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.ParserErrorListener;
import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* This class represents profiling event information for a context sensitivity.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/DecisionEventInfo.java b/runtime/Java/src/org/antlr/v4/runtime/atn/DecisionEventInfo.java
index 04fc47afd5..862b5e68a6 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/DecisionEventInfo.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/DecisionEventInfo.java
@@ -7,8 +7,8 @@
package org.antlr.v4.runtime.atn;
import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/**
* This is the base class for gathering detailed information about prediction
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java
index ddefb86d46..cd6c6fd52d 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
public final class EpsilonTransition extends Transition {
@@ -26,7 +26,7 @@ public EpsilonTransition(@NotNull ATNState target, int outermostPrecedenceReturn
* returning from, where the precedence value is 0; otherwise, -1.
*
* @see ATNConfig#isPrecedenceFilterSuppressed()
- * @see ParserATNSimulator#applyPrecedenceFilter(ATNConfigSet, ParserRuleContext, PredictionContextCache)
+ * @see ParserATNSimulator#applyPrecedenceFilter(ATNConfigSet, ParserRuleContext, PredictionContextCache)
* @since 4.4.1
*/
public int outermostPrecedenceReturn() {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ErrorInfo.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ErrorInfo.java
index d72382bc64..930c243111 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ErrorInfo.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ErrorInfo.java
@@ -11,7 +11,7 @@
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* This class represents profiling event information for a syntax error
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LL1Analyzer.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LL1Analyzer.java
index b337dfe9bc..6cc901e63c 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LL1Analyzer.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LL1Analyzer.java
@@ -8,8 +8,8 @@
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.BitSet;
import java.util.HashSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java
index 53e8616d19..0b3bee475f 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java
@@ -15,8 +15,8 @@
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.dfa.DFAState;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Locale;
@@ -511,9 +511,9 @@ protected ATNConfig getEpsilonTarget(@NotNull CharStream input,
else {
c = null;
}
-
+
break;
-
+
case Transition.ACTION:
if (config.getContext().hasEmpty()) {
// execute actions anywhere in the start rule for a token.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerAction.java
index 33abb50031..406c2e72f9 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerAction.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Lexer;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Represents a single action which can be executed following the successful
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerActionExecutor.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerActionExecutor.java
index 0c36ff37a2..801cdd671b 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerActionExecutor.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerActionExecutor.java
@@ -11,8 +11,8 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Arrays;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerChannelAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerChannelAction.java
index e8c9fe7a49..965668e940 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerChannelAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerChannelAction.java
@@ -9,7 +9,7 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Implements the {@code channel} lexer action by calling
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerCustomAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerCustomAction.java
index 83e92e6012..50d41f105d 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerCustomAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerCustomAction.java
@@ -10,7 +10,7 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Executes a custom lexer action by calling {@link Recognizer#action} with the
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerIndexedCustomAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerIndexedCustomAction.java
index c8f237082e..35f29630ed 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerIndexedCustomAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerIndexedCustomAction.java
@@ -9,7 +9,7 @@
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* This implementation of {@link LexerAction} is used for tracking input offsets
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerModeAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerModeAction.java
index e7ebf4ae92..113b22b2a9 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerModeAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerModeAction.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Implements the {@code mode} lexer action by calling {@link Lexer#mode} with
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerMoreAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerMoreAction.java
index 1e6c5614c0..3384e7bea4 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerMoreAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerMoreAction.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Implements the {@code more} lexer action by calling {@link Lexer#more}.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerPopModeAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerPopModeAction.java
index 725303bad0..049661c038 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerPopModeAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerPopModeAction.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Implements the {@code popMode} lexer action by calling {@link Lexer#popMode}.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerPushModeAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerPushModeAction.java
index fcfc630886..a313eb9d60 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerPushModeAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerPushModeAction.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Implements the {@code pushMode} lexer action by calling
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerSkipAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerSkipAction.java
index 5cd23745f1..7355713541 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerSkipAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerSkipAction.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Implements the {@code skip} lexer action by calling {@link Lexer#skip}.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerTypeAction.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerTypeAction.java
index f69d57641e..ccfa39145f 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LexerTypeAction.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LexerTypeAction.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Implements the {@code type} lexer action by calling {@link Lexer#setType}
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/LookaheadEventInfo.java b/runtime/Java/src/org/antlr/v4/runtime/atn/LookaheadEventInfo.java
index c339c8bbda..70b5f0bb9d 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/LookaheadEventInfo.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/LookaheadEventInfo.java
@@ -7,8 +7,8 @@
package org.antlr.v4.runtime.atn;
import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/**
* This class represents profiling event information for tracking the lookahead
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java
index 8286e286ab..6d52c3cea3 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java
@@ -7,8 +7,8 @@
package org.antlr.v4.runtime.atn;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
public final class NotSetTransition extends SetTransition {
public NotSetTransition(@NotNull ATNState target, @Nullable IntervalSet set) {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ParseInfo.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ParseInfo.java
index 5b6d92d351..16a2677fd1 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ParseInfo.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ParseInfo.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime.atn;
import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java
index 07f7375f1d..9fc7b86f02 100755
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java
@@ -22,8 +22,8 @@
import org.antlr.v4.runtime.dfa.DFAState;
import org.antlr.v4.runtime.misc.IntegerList;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
@@ -2076,7 +2076,7 @@ else if (alt != currentAlt) {
exact = false;
break;
}
-
+
currentAlt = alt;
}
}
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/PrecedencePredicateTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/PrecedencePredicateTransition.java
index 850cae2d9f..eba5cbe61d 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/PrecedencePredicateTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/PrecedencePredicateTransition.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
*
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateEvalInfo.java b/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateEvalInfo.java
index a9bc1c0300..8781cac60d 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateEvalInfo.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateEvalInfo.java
@@ -10,7 +10,7 @@
import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.RuleContext;
import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* This class represents profiling event information for semantic predicate
@@ -41,7 +41,7 @@ public class PredicateEvalInfo extends DecisionEventInfo {
* Constructs a new instance of the {@link PredicateEvalInfo} class with the
* specified detailed predicate evaluation information.
*
- * @param state The simulator state
+ * @param state The simulator state
* @param decision The decision number
* @param input The input token stream
* @param startIndex The start index for the current prediction
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java
index af183d2d06..4e479969b9 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/** TODO: this is old comment:
* A tree of semantic predicates from the grammar AST if label==SEMPRED.
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java b/runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java
index 92ff255dee..7844d3d86f 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java
@@ -11,7 +11,7 @@
import org.antlr.v4.runtime.misc.AbstractEqualityComparator;
import org.antlr.v4.runtime.misc.FlexibleHashMap;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/PredictionMode.java b/runtime/Java/src/org/antlr/v4/runtime/atn/PredictionMode.java
index ee1dce4d80..903585c8db 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/PredictionMode.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/PredictionMode.java
@@ -9,7 +9,7 @@
import org.antlr.v4.runtime.misc.AbstractEqualityComparator;
import org.antlr.v4.runtime.misc.FlexibleHashMap;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.BitSet;
import java.util.Collection;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ProfilingATNSimulator.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ProfilingATNSimulator.java
index 48aec2d674..8e76a47be4 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/ProfilingATNSimulator.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ProfilingATNSimulator.java
@@ -11,7 +11,7 @@
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.dfa.DFAState;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.misc.Tuple2;
import java.util.BitSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java
index d9d155b4dc..d1b9eb3940 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime.atn;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
public final class RangeTransition extends Transition {
public final int from;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java
index 6864e97811..f41dd27f46 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/** */
public final class RuleTransition extends Transition {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/SemanticContext.java b/runtime/Java/src/org/antlr/v4/runtime/atn/SemanticContext.java
index a7ae85a27e..2f8769875f 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/SemanticContext.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/SemanticContext.java
@@ -9,7 +9,7 @@
import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.RuleContext;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.misc.Utils;
import java.util.ArrayList;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/SetTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/SetTransition.java
index 4b88ff2f41..1422c937a9 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/SetTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/SetTransition.java
@@ -8,8 +8,8 @@
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/** A transition containing a set of values. */
public class SetTransition extends Transition {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/SimulatorState.java b/runtime/Java/src/org/antlr/v4/runtime/atn/SimulatorState.java
index c3e3bd340f..228c18c2f1 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/SimulatorState.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/SimulatorState.java
@@ -6,7 +6,7 @@
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.dfa.DFAState;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
*
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/SingletonPredictionContext.java b/runtime/Java/src/org/antlr/v4/runtime/atn/SingletonPredictionContext.java
index 56231531ab..96f5e3c895 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/SingletonPredictionContext.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/SingletonPredictionContext.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
public class SingletonPredictionContext extends PredictionContext {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/Transition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/Transition.java
index fae2a44090..4e84076e0b 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/Transition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/Transition.java
@@ -7,8 +7,8 @@
package org.antlr.v4.runtime.atn;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Arrays;
import java.util.Collections;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java
index e2279ec7da..86d22e10dd 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.atn;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
public final class WildcardTransition extends Transition {
public WildcardTransition(@NotNull ATNState target) { super(target); }
diff --git a/runtime/Java/src/org/antlr/v4/runtime/dfa/DFA.java b/runtime/Java/src/org/antlr/v4/runtime/dfa/DFA.java
index f22ae437ba..ede06b67be 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/dfa/DFA.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/dfa/DFA.java
@@ -16,8 +16,8 @@
import org.antlr.v4.runtime.atn.LexerATNSimulator;
import org.antlr.v4.runtime.atn.StarLoopEntryState;
import org.antlr.v4.runtime.atn.TokensStartState;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Map;
import java.util.Set;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/dfa/DFASerializer.java b/runtime/Java/src/org/antlr/v4/runtime/dfa/DFASerializer.java
index 810b8cf4a0..f4bed33706 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/dfa/DFASerializer.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/dfa/DFASerializer.java
@@ -14,8 +14,8 @@
import org.antlr.v4.runtime.atn.ATNSimulator;
import org.antlr.v4.runtime.atn.ATNState;
import org.antlr.v4.runtime.atn.PredictionContext;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/dfa/DFAState.java b/runtime/Java/src/org/antlr/v4/runtime/dfa/DFAState.java
index d6339d254a..29114ef908 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/dfa/DFAState.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/dfa/DFAState.java
@@ -13,8 +13,8 @@
import org.antlr.v4.runtime.atn.PredictionContext;
import org.antlr.v4.runtime.atn.SemanticContext;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Arrays;
import java.util.BitSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/dfa/EdgeMap.java b/runtime/Java/src/org/antlr/v4/runtime/dfa/EdgeMap.java
index 67ace6b02b..9d86055b08 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/dfa/EdgeMap.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/dfa/EdgeMap.java
@@ -4,8 +4,8 @@
*/
package org.antlr.v4.runtime.dfa;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.Map;
import java.util.Set;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/dfa/HashEdgeMap.java b/runtime/Java/src/org/antlr/v4/runtime/dfa/HashEdgeMap.java
index fd537d3415..637b295053 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/dfa/HashEdgeMap.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/dfa/HashEdgeMap.java
@@ -5,7 +5,7 @@
*/
package org.antlr.v4.runtime.dfa;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.Collections;
import java.util.Map;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/dfa/LexerDFASerializer.java b/runtime/Java/src/org/antlr/v4/runtime/dfa/LexerDFASerializer.java
index 289056be22..936287ee7e 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/dfa/LexerDFASerializer.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/dfa/LexerDFASerializer.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime.dfa;
import org.antlr.v4.runtime.VocabularyImpl;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
public class LexerDFASerializer extends DFASerializer {
public LexerDFASerializer(@NotNull DFA dfa) {
diff --git a/runtime/Java/src/org/antlr/v4/runtime/dfa/SparseEdgeMap.java b/runtime/Java/src/org/antlr/v4/runtime/dfa/SparseEdgeMap.java
index 212400adae..e089bc7cd9 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/dfa/SparseEdgeMap.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/dfa/SparseEdgeMap.java
@@ -5,7 +5,7 @@
*/
package org.antlr.v4.runtime.dfa;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java b/runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java
index 1b42901dc2..4dac8640b4 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java
@@ -6,6 +6,9 @@
package org.antlr.v4.runtime.misc;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
+
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/FlexibleHashMap.java b/runtime/Java/src/org/antlr/v4/runtime/misc/FlexibleHashMap.java
index 01310a4ba2..f8e4bb90d8 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/FlexibleHashMap.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/FlexibleHashMap.java
@@ -6,6 +6,9 @@
package org.antlr.v4.runtime.misc;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/IntSet.java b/runtime/Java/src/org/antlr/v4/runtime/misc/IntSet.java
index e35ffb420c..44c659492b 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/IntSet.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/IntSet.java
@@ -6,6 +6,8 @@
package org.antlr.v4.runtime.misc;
import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.List;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerList.java b/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerList.java
index 3b7e52a584..ae1b83dbea 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerList.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerList.java
@@ -5,6 +5,8 @@
*/
package org.antlr.v4.runtime.misc;
+import org.antlr.v4.runtime.annotations.NotNull;
+
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerStack.java b/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerStack.java
index f591f4fed0..f872e5aa49 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerStack.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/IntegerStack.java
@@ -5,6 +5,8 @@
*/
package org.antlr.v4.runtime.misc;
+import org.antlr.v4.runtime.annotations.NotNull;
+
/**
*
* @author Sam Harwell
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java b/runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java
index 8aafdb830d..009066a9b3 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java
@@ -9,6 +9,8 @@
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.Vocabulary;
import org.antlr.v4.runtime.VocabularyImpl;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import java.util.ArrayList;
import java.util.HashSet;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/LogManager.java b/runtime/Java/src/org/antlr/v4/runtime/misc/LogManager.java
index bcb932c117..46f55c1f31 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/LogManager.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/LogManager.java
@@ -6,6 +6,8 @@
package org.antlr.v4.runtime.misc;
+import org.antlr.v4.runtime.annotations.Nullable;
+
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/RuleDependencyProcessor.java b/runtime/Java/src/org/antlr/v4/runtime/misc/RuleDependencyProcessor.java
index 67c63a88d2..b4ebe29326 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/RuleDependencyProcessor.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/RuleDependencyProcessor.java
@@ -9,6 +9,8 @@
import org.antlr.v4.runtime.RuleDependencies;
import org.antlr.v4.runtime.RuleDependency;
import org.antlr.v4.runtime.RuleVersion;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.atn.ATN;
import org.antlr.v4.runtime.atn.ATNDeserializer;
import org.antlr.v4.runtime.atn.ATNSimulator;
@@ -61,15 +63,15 @@ public RuleDependencyProcessor() {
public SourceVersion getSupportedSourceVersion() {
SourceVersion latestSupported = SourceVersion.latestSupported();
- if (latestSupported.ordinal() <= 6) {
- return SourceVersion.RELEASE_6;
+ if (latestSupported.ordinal() <= 11) {
+ return SourceVersion.RELEASE_11;
}
- else if (latestSupported.ordinal() <= 8) {
+ else if (latestSupported.ordinal() <= 21) {
return latestSupported;
}
else {
- // this annotation processor is tested through Java 8
- return SourceVersion.values()[8];
+ // this annotation processor is tested through Java 21
+ return SourceVersion.values()[21];
}
}
diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/Utils.java b/runtime/Java/src/org/antlr/v4/runtime/misc/Utils.java
index e084c87c32..a554bfe63f 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/misc/Utils.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/misc/Utils.java
@@ -6,6 +6,9 @@
package org.antlr.v4.runtime.misc;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/AbstractParseTreeVisitor.java b/runtime/Java/src/org/antlr/v4/runtime/tree/AbstractParseTreeVisitor.java
index 6c307da46e..34ca8e81ba 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/AbstractParseTreeVisitor.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/AbstractParseTreeVisitor.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.tree;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
public abstract class AbstractParseTreeVisitor implements ParseTreeVisitor {
/**
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java b/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java
index ba5e75eb15..3d532260b8 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java
@@ -7,7 +7,7 @@
package org.antlr.v4.runtime.tree;
import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/** This interface describes the minimal core of methods triggered
* by {@link ParseTreeWalker}. E.g.,
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeVisitor.java b/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeVisitor.java
index e175cd8458..449f05fa85 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeVisitor.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeVisitor.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.tree;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* This interface defines the basic notion of a parse tree visitor. Generated
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/SyntaxTree.java b/runtime/Java/src/org/antlr/v4/runtime/tree/SyntaxTree.java
index dddb87386a..b00646e46f 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/SyntaxTree.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/SyntaxTree.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/** A tree that knows about an interval in a token stream
* is some kind of syntax tree. Subinterfaces distinguish
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java b/runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java
index 2df29f2d1c..1b13f9958c 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java
@@ -13,8 +13,8 @@
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.atn.ATN;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Predicate;
import org.antlr.v4.runtime.misc.Utils;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreeMatch.java b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreeMatch.java
index df68cf6f6d..a4506abf6a 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreeMatch.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreeMatch.java
@@ -7,8 +7,8 @@
package org.antlr.v4.runtime.tree.pattern;
import org.antlr.v4.runtime.misc.MultiMap;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.tree.ParseTree;
import java.util.Collections;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePattern.java b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePattern.java
index f51c93fd06..3f10e87686 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePattern.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePattern.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.tree.pattern;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.xpath.XPath;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java
index 1c65b8b0d8..468d4fb87c 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java
@@ -18,8 +18,8 @@
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.atn.ATN;
import org.antlr.v4.runtime.misc.MultiMap;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.ParseCancellationException;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.RuleNode;
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/RuleTagToken.java b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/RuleTagToken.java
index 49263ea764..2d9c1f5a72 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/RuleTagToken.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/RuleTagToken.java
@@ -9,8 +9,8 @@
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenSource;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/**
* A {@link Token} object representing an entire subtree matched by a parser
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TagChunk.java b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TagChunk.java
index 79f4521ac6..1dfe5008ee 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TagChunk.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TagChunk.java
@@ -6,8 +6,8 @@
package org.antlr.v4.runtime.tree.pattern;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/**
* Represents a placeholder tag in a tree pattern. A tag can have any of the
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TextChunk.java b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TextChunk.java
index a5068baff5..1e1c500e02 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TextChunk.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TextChunk.java
@@ -6,7 +6,7 @@
package org.antlr.v4.runtime.tree.pattern;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
* Represents a span of raw text (concrete syntax) between tags in a tree
diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TokenTagToken.java b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TokenTagToken.java
index 5f2d78483a..d1fb044afc 100644
--- a/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TokenTagToken.java
+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/pattern/TokenTagToken.java
@@ -8,8 +8,8 @@
import org.antlr.v4.runtime.CommonToken;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
/**
* A {@link Token} object representing a token of a particular type; e.g.,
diff --git a/runtime/JavaAnnotations/pom.xml b/runtime/JavaAnnotations/pom.xml
index 05d94409c4..a1b3f3ead5 100644
--- a/runtime/JavaAnnotations/pom.xml
+++ b/runtime/JavaAnnotations/pom.xml
@@ -5,8 +5,8 @@
com.tunnelvisionlabs
antlr4-master
- 4.9.1-SNAPSHOT
- ../..
+ 4.10.0-SNAPSHOT
+ ../../pom.xml
antlr4-annotations
@@ -31,9 +31,10 @@
-proc:none
+
+ 11
-
diff --git a/runtime/JavaAnnotations/resources/META-INF/services/javax.annotation.processing.Processor b/runtime/JavaAnnotations/resources/META-INF/services/javax.annotation.processing.Processor
index 1a8dc1b9a2..562294d95b 100644
--- a/runtime/JavaAnnotations/resources/META-INF/services/javax.annotation.processing.Processor
+++ b/runtime/JavaAnnotations/resources/META-INF/services/javax.annotation.processing.Processor
@@ -1 +1 @@
-org.antlr.v4.runtime.misc.NullUsageProcessor
\ No newline at end of file
+org.antlr.v4.runtime.processors.NullUsageProcessor
diff --git a/runtime/JavaAnnotations/src/module-info.java b/runtime/JavaAnnotations/src/module-info.java
new file mode 100644
index 0000000000..ef418fb9b0
--- /dev/null
+++ b/runtime/JavaAnnotations/src/module-info.java
@@ -0,0 +1,8 @@
+module antlr.annotations {
+ requires java.compiler;
+
+ exports org.antlr.v4.runtime.annotations;
+ exports org.antlr.v4.runtime.processors;
+
+ provides javax.annotation.processing.Processor with org.antlr.v4.runtime.processors.NullUsageProcessor;
+}
diff --git a/runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/NotNull.java b/runtime/JavaAnnotations/src/org/antlr/v4/runtime/annotations/NotNull.java
similarity index 98%
rename from runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/NotNull.java
rename to runtime/JavaAnnotations/src/org/antlr/v4/runtime/annotations/NotNull.java
index b33ee82cb5..8a97b0aeda 100644
--- a/runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/NotNull.java
+++ b/runtime/JavaAnnotations/src/org/antlr/v4/runtime/annotations/NotNull.java
@@ -4,7 +4,7 @@
* can be found in the LICENSE.txt file in the project root.
*/
-package org.antlr.v4.runtime.misc;
+package org.antlr.v4.runtime.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
diff --git a/runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/Nullable.java b/runtime/JavaAnnotations/src/org/antlr/v4/runtime/annotations/Nullable.java
similarity index 97%
rename from runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/Nullable.java
rename to runtime/JavaAnnotations/src/org/antlr/v4/runtime/annotations/Nullable.java
index a932768e13..ca509f5b0d 100644
--- a/runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/Nullable.java
+++ b/runtime/JavaAnnotations/src/org/antlr/v4/runtime/annotations/Nullable.java
@@ -4,7 +4,7 @@
* can be found in the LICENSE.txt file in the project root.
*/
-package org.antlr.v4.runtime.misc;
+package org.antlr.v4.runtime.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
diff --git a/runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/NullUsageProcessor.java b/runtime/JavaAnnotations/src/org/antlr/v4/runtime/processors/NullUsageProcessor.java
similarity index 94%
rename from runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/NullUsageProcessor.java
rename to runtime/JavaAnnotations/src/org/antlr/v4/runtime/processors/NullUsageProcessor.java
index 51d2a57c56..7c6f282601 100644
--- a/runtime/JavaAnnotations/src/org/antlr/v4/runtime/misc/NullUsageProcessor.java
+++ b/runtime/JavaAnnotations/src/org/antlr/v4/runtime/processors/NullUsageProcessor.java
@@ -4,32 +4,22 @@
* can be found in the LICENSE.txt file in the project root.
*/
-package org.antlr.v4.runtime.misc;
+package org.antlr.v4.runtime.processors;
+
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.SourceVersion;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
+import javax.lang.model.element.*;
import javax.lang.model.type.NoType;
import javax.lang.model.type.PrimitiveType;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
import javax.tools.Diagnostic;
-
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Deque;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
/**
* A compile-time validator for correct usage of the {@link NotNull} and
@@ -59,8 +49,8 @@
*/
@SupportedAnnotationTypes({NullUsageProcessor.NotNullClassName, NullUsageProcessor.NullableClassName})
public class NullUsageProcessor extends AbstractProcessor {
- public static final String NotNullClassName = "org.antlr.v4.runtime.misc.NotNull";
- public static final String NullableClassName = "org.antlr.v4.runtime.misc.Nullable";
+ public static final String NotNullClassName = "org.antlr.v4.runtime.annotations.NotNull";
+ public static final String NullableClassName = "org.antlr.v4.runtime.annotations.Nullable";
private TypeElement notNullType;
private TypeElement nullableType;
@@ -72,15 +62,15 @@ public NullUsageProcessor() {
public SourceVersion getSupportedSourceVersion() {
SourceVersion latestSupported = SourceVersion.latestSupported();
- if (latestSupported.ordinal() <= 6) {
- return SourceVersion.RELEASE_6;
+ if (latestSupported.ordinal() <= 11) {
+ return SourceVersion.RELEASE_11;
}
- else if (latestSupported.ordinal() <= 8) {
+ else if (latestSupported.ordinal() <= 21) {
return latestSupported;
}
else {
- // this annotation processor is tested through Java 8
- return SourceVersion.values()[8];
+ // this annotation processor is tested through Java 11
+ return SourceVersion.values()[21];
}
}
diff --git a/tool/pom.xml b/tool/pom.xml
index a0ba3cf80d..959e6fa915 100644
--- a/tool/pom.xml
+++ b/tool/pom.xml
@@ -10,7 +10,7 @@
com.tunnelvisionlabs
antlr4-master
- 4.9.1-SNAPSHOT
+ 4.10.0-SNAPSHOT
antlr4
@@ -22,7 +22,6 @@
junit
junit
- 4.13.1
test
@@ -40,26 +39,22 @@
org.antlr
antlr-runtime
- 3.5.2
compile
org.antlr
ST4
- 4.3
compile
org.abego.treelayout
org.abego.treelayout.core
1.0.1
- compile
com.ibm.icu
icu4j
58.2
- provided
@@ -82,7 +77,6 @@
org.apache.maven.plugins
maven-shade-plugin
- 2.2
false
@@ -136,7 +130,6 @@
org.jacoco
jacoco-maven-plugin
- 0.7.7.201606060606
@@ -184,7 +177,6 @@
com.webguys
string-template-maven-plugin
- 1.1
@@ -206,8 +198,8 @@
${basedir}/target/generated-sources/tool/src/org/antlr/v4/unicode/UnicodeData.java
org.antlr.v4.unicode.UnicodeDataTemplateController
- 1.6
- 1.6
+ 11
+ 11
getProperties
@@ -226,7 +218,6 @@
org.antlr
antlr3-maven-plugin
- 3.5.2
src
true
@@ -267,8 +258,6 @@
-
-
diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg
index 291f3c29d9..9b31227204 100644
--- a/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg
+++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg
@@ -27,6 +27,7 @@ package ;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.annotations.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
@@ -43,7 +44,8 @@ package ;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
@@ -84,7 +86,7 @@ package ;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.TerminalNode;
@@ -142,7 +144,7 @@ package ;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
/**
@@ -175,7 +177,7 @@ package ;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
/**
@@ -947,6 +949,7 @@ import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.annotations.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;
diff --git a/tool/src/org/antlr/v4/Tool.java b/tool/src/org/antlr/v4/Tool.java
index 0bd48cab4d..56d5811cc8 100644
--- a/tool/src/org/antlr/v4/Tool.java
+++ b/tool/src/org/antlr/v4/Tool.java
@@ -27,7 +27,7 @@
import org.antlr.v4.runtime.atn.ATNSerializer;
import org.antlr.v4.runtime.misc.LogManager;
import org.antlr.v4.runtime.misc.IntegerList;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.semantics.SemanticPipeline;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.ANTLRToolListener;
diff --git a/tool/src/org/antlr/v4/analysis/LeftFactoringRuleTransformer.java b/tool/src/org/antlr/v4/analysis/LeftFactoringRuleTransformer.java
index 5245a9f3fc..4c2bcc2224 100644
--- a/tool/src/org/antlr/v4/analysis/LeftFactoringRuleTransformer.java
+++ b/tool/src/org/antlr/v4/analysis/LeftFactoringRuleTransformer.java
@@ -11,7 +11,7 @@
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.atn.ATNSimulator;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.tool.Alternative;
import org.antlr.v4.tool.Grammar;
import org.antlr.v4.tool.LeftRecursiveRule;
diff --git a/tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java b/tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java
index 3a521d8fdc..fabfb4133c 100644
--- a/tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java
+++ b/tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java
@@ -17,7 +17,7 @@
import org.antlr.v4.parse.GrammarASTAdaptor;
import org.antlr.v4.parse.LeftRecursiveRuleWalker;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
import org.antlr.v4.tool.ErrorType;
diff --git a/tool/src/org/antlr/v4/automata/ATNFactory.java b/tool/src/org/antlr/v4/automata/ATNFactory.java
index dada97ebe3..be1b6dbac9 100644
--- a/tool/src/org/antlr/v4/automata/ATNFactory.java
+++ b/tool/src/org/antlr/v4/automata/ATNFactory.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.atn.ATN;
import org.antlr.v4.runtime.atn.ATNState;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.tool.ast.ActionAST;
import org.antlr.v4.tool.ast.BlockAST;
import org.antlr.v4.tool.ast.GrammarAST;
diff --git a/tool/src/org/antlr/v4/automata/ATNOptimizer.java b/tool/src/org/antlr/v4/automata/ATNOptimizer.java
index 871e2abb1c..b3519fdaea 100644
--- a/tool/src/org/antlr/v4/automata/ATNOptimizer.java
+++ b/tool/src/org/antlr/v4/automata/ATNOptimizer.java
@@ -20,7 +20,7 @@
import org.antlr.v4.runtime.atn.Transition;
import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.tool.ErrorType;
import org.antlr.v4.tool.Grammar;
import org.antlr.v4.tool.Rule;
diff --git a/tool/src/org/antlr/v4/automata/ATNVisitor.java b/tool/src/org/antlr/v4/automata/ATNVisitor.java
index 451696a764..bacec86a92 100644
--- a/tool/src/org/antlr/v4/automata/ATNVisitor.java
+++ b/tool/src/org/antlr/v4/automata/ATNVisitor.java
@@ -8,7 +8,7 @@
import org.antlr.v4.runtime.atn.ATNState;
import org.antlr.v4.runtime.atn.Transition;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.HashSet;
import java.util.Set;
diff --git a/tool/src/org/antlr/v4/automata/LexerATNFactory.java b/tool/src/org/antlr/v4/automata/LexerATNFactory.java
index 34958cb73e..7fa43e088e 100644
--- a/tool/src/org/antlr/v4/automata/LexerATNFactory.java
+++ b/tool/src/org/antlr/v4/automata/LexerATNFactory.java
@@ -37,8 +37,8 @@
import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.misc.IntervalSet;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.tool.ErrorType;
import org.antlr.v4.tool.LexerGrammar;
diff --git a/tool/src/org/antlr/v4/automata/ParserATNFactory.java b/tool/src/org/antlr/v4/automata/ParserATNFactory.java
index 64899fb058..9793b15f38 100644
--- a/tool/src/org/antlr/v4/automata/ParserATNFactory.java
+++ b/tool/src/org/antlr/v4/automata/ParserATNFactory.java
@@ -45,8 +45,8 @@
import org.antlr.v4.runtime.atn.Transition;
import org.antlr.v4.runtime.atn.WildcardTransition;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple3;
import org.antlr.v4.semantics.UseDefAnalyzer;
diff --git a/tool/src/org/antlr/v4/automata/TailEpsilonRemover.java b/tool/src/org/antlr/v4/automata/TailEpsilonRemover.java
index 54d297e490..1cd6be1895 100644
--- a/tool/src/org/antlr/v4/automata/TailEpsilonRemover.java
+++ b/tool/src/org/antlr/v4/automata/TailEpsilonRemover.java
@@ -14,7 +14,7 @@
import org.antlr.v4.runtime.atn.RuleTransition;
import org.antlr.v4.runtime.atn.StarLoopbackState;
import org.antlr.v4.runtime.atn.Transition;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
*
diff --git a/tool/src/org/antlr/v4/codegen/CodeGenerator.java b/tool/src/org/antlr/v4/codegen/CodeGenerator.java
index c28f0c4fe3..0310324a6c 100644
--- a/tool/src/org/antlr/v4/codegen/CodeGenerator.java
+++ b/tool/src/org/antlr/v4/codegen/CodeGenerator.java
@@ -9,8 +9,8 @@
import org.antlr.v4.Tool;
import org.antlr.v4.codegen.model.OutputModelObject;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.tool.ErrorType;
import org.antlr.v4.tool.Grammar;
import org.stringtemplate.v4.AutoIndentWriter;
diff --git a/tool/src/org/antlr/v4/codegen/DefaultOutputModelFactory.java b/tool/src/org/antlr/v4/codegen/DefaultOutputModelFactory.java
index 1cf1edc2ad..deed3f8cbf 100644
--- a/tool/src/org/antlr/v4/codegen/DefaultOutputModelFactory.java
+++ b/tool/src/org/antlr/v4/codegen/DefaultOutputModelFactory.java
@@ -13,8 +13,8 @@
import org.antlr.v4.codegen.model.SrcOp;
import org.antlr.v4.codegen.model.decl.CodeBlock;
import org.antlr.v4.codegen.model.decl.Decl;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.tool.Alternative;
import org.antlr.v4.tool.Grammar;
import org.antlr.v4.tool.Rule;
diff --git a/tool/src/org/antlr/v4/codegen/OutputModelFactory.java b/tool/src/org/antlr/v4/codegen/OutputModelFactory.java
index d958ef0597..6380881d02 100644
--- a/tool/src/org/antlr/v4/codegen/OutputModelFactory.java
+++ b/tool/src/org/antlr/v4/codegen/OutputModelFactory.java
@@ -19,7 +19,7 @@
import org.antlr.v4.codegen.model.SrcOp;
import org.antlr.v4.codegen.model.decl.CodeBlock;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.tool.Alternative;
import org.antlr.v4.tool.Grammar;
import org.antlr.v4.tool.Rule;
diff --git a/tool/src/org/antlr/v4/codegen/Target.java b/tool/src/org/antlr/v4/codegen/Target.java
index 889941f68b..94ab5e9b8c 100644
--- a/tool/src/org/antlr/v4/codegen/Target.java
+++ b/tool/src/org/antlr/v4/codegen/Target.java
@@ -11,7 +11,7 @@
import org.antlr.v4.misc.Utils;
import org.antlr.v4.parse.ANTLRParser;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.tool.ErrorType;
import org.antlr.v4.tool.Grammar;
import org.antlr.v4.tool.Rule;
diff --git a/tool/src/org/antlr/v4/codegen/model/SemPred.java b/tool/src/org/antlr/v4/codegen/model/SemPred.java
index a07bc5dc2a..15404ab3c7 100644
--- a/tool/src/org/antlr/v4/codegen/model/SemPred.java
+++ b/tool/src/org/antlr/v4/codegen/model/SemPred.java
@@ -10,7 +10,7 @@
import org.antlr.v4.codegen.OutputModelFactory;
import org.antlr.v4.codegen.model.chunk.ActionChunk;
import org.antlr.v4.runtime.atn.AbstractPredicateTransition;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.tool.ast.ActionAST;
import org.antlr.v4.tool.ast.GrammarAST;
diff --git a/tool/src/org/antlr/v4/gui/TreePostScriptGenerator.java b/tool/src/org/antlr/v4/gui/TreePostScriptGenerator.java
index 0febe947d9..1ca69c15b0 100644
--- a/tool/src/org/antlr/v4/gui/TreePostScriptGenerator.java
+++ b/tool/src/org/antlr/v4/gui/TreePostScriptGenerator.java
@@ -11,7 +11,7 @@
import org.abego.treelayout.TreeForTreeLayout;
import org.abego.treelayout.TreeLayout;
import org.abego.treelayout.util.DefaultConfiguration;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.Tree;
diff --git a/tool/src/org/antlr/v4/gui/TreeViewer.java b/tool/src/org/antlr/v4/gui/TreeViewer.java
index 361a84bd61..ad9247d72c 100644
--- a/tool/src/org/antlr/v4/gui/TreeViewer.java
+++ b/tool/src/org/antlr/v4/gui/TreeViewer.java
@@ -11,8 +11,8 @@
import org.abego.treelayout.TreeLayout;
import org.abego.treelayout.util.DefaultConfiguration;
import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.Tree;
diff --git a/tool/src/org/antlr/v4/gui/Trees.java b/tool/src/org/antlr/v4/gui/Trees.java
index 716711708f..155883cd58 100644
--- a/tool/src/org/antlr/v4/gui/Trees.java
+++ b/tool/src/org/antlr/v4/gui/Trees.java
@@ -7,8 +7,8 @@
package org.antlr.v4.gui;
import org.antlr.v4.runtime.Parser;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.runtime.tree.Tree;
diff --git a/tool/src/org/antlr/v4/parse/ScopeParser.java b/tool/src/org/antlr/v4/parse/ScopeParser.java
index 27c18221fd..151d77887e 100644
--- a/tool/src/org/antlr/v4/parse/ScopeParser.java
+++ b/tool/src/org/antlr/v4/parse/ScopeParser.java
@@ -8,8 +8,8 @@
import org.antlr.runtime.BaseRecognizer;
import org.antlr.runtime.CommonToken;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
import org.antlr.v4.tool.Attribute;
diff --git a/tool/src/org/antlr/v4/semantics/SemanticPipeline.java b/tool/src/org/antlr/v4/semantics/SemanticPipeline.java
index 777292d8c7..0efdb1ad4c 100644
--- a/tool/src/org/antlr/v4/semantics/SemanticPipeline.java
+++ b/tool/src/org/antlr/v4/semantics/SemanticPipeline.java
@@ -11,7 +11,7 @@
import org.antlr.v4.automata.LexerATNFactory;
import org.antlr.v4.parse.ANTLRParser;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.runtime.misc.Tuple2;
import org.antlr.v4.tool.ErrorType;
import org.antlr.v4.tool.Grammar;
diff --git a/tool/src/org/antlr/v4/semantics/SymbolChecks.java b/tool/src/org/antlr/v4/semantics/SymbolChecks.java
index e8dd7f921c..be05156d53 100644
--- a/tool/src/org/antlr/v4/semantics/SymbolChecks.java
+++ b/tool/src/org/antlr/v4/semantics/SymbolChecks.java
@@ -12,8 +12,8 @@
import org.antlr.v4.parse.ANTLRLexer;
import org.antlr.v4.parse.ANTLRParser;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.tool.Alternative;
import org.antlr.v4.tool.Attribute;
import org.antlr.v4.tool.AttributeDict;
diff --git a/tool/src/org/antlr/v4/tool/ANTLRMessage.java b/tool/src/org/antlr/v4/tool/ANTLRMessage.java
index bd76b74039..46305e26c5 100644
--- a/tool/src/org/antlr/v4/tool/ANTLRMessage.java
+++ b/tool/src/org/antlr/v4/tool/ANTLRMessage.java
@@ -7,8 +7,8 @@
package org.antlr.v4.tool;
import org.antlr.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.stringtemplate.v4.ST;
import java.util.Arrays;
diff --git a/tool/src/org/antlr/v4/tool/AttributeDict.java b/tool/src/org/antlr/v4/tool/AttributeDict.java
index c59cb65391..90705284af 100644
--- a/tool/src/org/antlr/v4/tool/AttributeDict.java
+++ b/tool/src/org/antlr/v4/tool/AttributeDict.java
@@ -7,8 +7,8 @@
package org.antlr.v4.tool;
import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.tool.ast.GrammarAST;
import java.util.Collections;
diff --git a/tool/src/org/antlr/v4/tool/Grammar.java b/tool/src/org/antlr/v4/tool/Grammar.java
index 38296f40e8..b1b4048c7e 100644
--- a/tool/src/org/antlr/v4/tool/Grammar.java
+++ b/tool/src/org/antlr/v4/tool/Grammar.java
@@ -32,8 +32,8 @@
import org.antlr.v4.runtime.misc.IntSet;
import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.misc.IntervalSet;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
import org.antlr.v4.tool.ast.ActionAST;
diff --git a/tool/src/org/antlr/v4/tool/ast/GrammarASTWithOptions.java b/tool/src/org/antlr/v4/tool/ast/GrammarASTWithOptions.java
index db9ebe2bb7..1766d29b0c 100644
--- a/tool/src/org/antlr/v4/tool/ast/GrammarASTWithOptions.java
+++ b/tool/src/org/antlr/v4/tool/ast/GrammarASTWithOptions.java
@@ -8,7 +8,7 @@
import org.antlr.runtime.Token;
import org.antlr.v4.misc.CharSupport;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import org.antlr.v4.tool.ErrorType;
import java.util.Collections;
diff --git a/tool/src/org/antlr/v4/tool/ast/GrammarRootAST.java b/tool/src/org/antlr/v4/tool/ast/GrammarRootAST.java
index 878cfa1a9a..4d8fa85bc8 100644
--- a/tool/src/org/antlr/v4/tool/ast/GrammarRootAST.java
+++ b/tool/src/org/antlr/v4/tool/ast/GrammarRootAST.java
@@ -9,7 +9,7 @@
import org.antlr.runtime.Token;
import org.antlr.runtime.TokenStream;
import org.antlr.runtime.tree.Tree;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
import java.util.HashMap;
import java.util.Map;
diff --git a/tool/test/org/antlr/v4/test/tool/BaseTest.java b/tool/test/org/antlr/v4/test/tool/BaseTest.java
index b70245b406..88b7578ee9 100644
--- a/tool/test/org/antlr/v4/test/tool/BaseTest.java
+++ b/tool/test/org/antlr/v4/test/tool/BaseTest.java
@@ -33,8 +33,8 @@
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.IntegerList;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.Tuple;
import org.antlr.v4.runtime.misc.Tuple2;
import org.antlr.v4.runtime.misc.Utils;
@@ -500,9 +500,9 @@ public List getCompileOptions() {
List compileOptions = new ArrayList();
compileOptions.add("-g");
compileOptions.add("-source");
- compileOptions.add("1.6");
+ compileOptions.add("11");
compileOptions.add("-target");
- compileOptions.add("1.6");
+ compileOptions.add("11");
compileOptions.add("-implicit:class");
compileOptions.add("-Xlint:-options");
diff --git a/tool/test/org/antlr/v4/test/tool/JavaUnicodeInputStream.java b/tool/test/org/antlr/v4/test/tool/JavaUnicodeInputStream.java
index bd4a3d2031..697e7cc672 100644
--- a/tool/test/org/antlr/v4/test/tool/JavaUnicodeInputStream.java
+++ b/tool/test/org/antlr/v4/test/tool/JavaUnicodeInputStream.java
@@ -9,7 +9,7 @@
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.misc.IntegerList;
import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
+import org.antlr.v4.runtime.annotations.NotNull;
/**
*
diff --git a/tool/test/org/antlr/v4/test/tool/ParserInterpreterForTesting.java b/tool/test/org/antlr/v4/test/tool/ParserInterpreterForTesting.java
index b18f3c0e3c..c59fa68c20 100644
--- a/tool/test/org/antlr/v4/test/tool/ParserInterpreterForTesting.java
+++ b/tool/test/org/antlr/v4/test/tool/ParserInterpreterForTesting.java
@@ -14,8 +14,8 @@
import org.antlr.v4.runtime.atn.ATNState;
import org.antlr.v4.runtime.atn.DecisionState;
import org.antlr.v4.runtime.atn.ParserATNSimulator;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.tool.Grammar;
public class ParserInterpreterForTesting {
diff --git a/tool/test/org/antlr/v4/test/tool/TestPerformance.java b/tool/test/org/antlr/v4/test/tool/TestPerformance.java
index 31e9d85af2..783e4052a2 100644
--- a/tool/test/org/antlr/v4/test/tool/TestPerformance.java
+++ b/tool/test/org/antlr/v4/test/tool/TestPerformance.java
@@ -39,8 +39,8 @@
import org.antlr.v4.runtime.dfa.EmptyEdgeMap;
import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.misc.MurmurHash;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.misc.Nullable;
+import org.antlr.v4.runtime.annotations.NotNull;
+import org.antlr.v4.runtime.annotations.Nullable;
import org.antlr.v4.runtime.misc.ParseCancellationException;
import org.antlr.v4.runtime.misc.Tuple2;
import org.antlr.v4.runtime.tree.ErrorNode;
@@ -424,7 +424,7 @@ public class TestPerformance extends BaseTest {
private final AtomicIntegerArray tokenCount = new AtomicIntegerArray(PASSES);
@Test
- //@org.junit.Ignore
+ @org.junit.Ignore
public void compileJdk() throws IOException, InterruptedException, ExecutionException {
String jdkSourceRoot = getSourceRoot("JDK");
assertTrue("The JDK_SOURCE_ROOT environment variable must be set for performance testing.", jdkSourceRoot != null && !jdkSourceRoot.isEmpty());