diff --git a/antlr5-maven-plugin/src/main/java/org/antlr/mojo/antlr5/Antlr5Mojo.java b/antlr5-maven-plugin/src/main/java/org/antlr/mojo/antlr5/Antlr5Mojo.java index bf32a36c7..3803d0f40 100644 --- a/antlr5-maven-plugin/src/main/java/org/antlr/mojo/antlr5/Antlr5Mojo.java +++ b/antlr5-maven-plugin/src/main/java/org/antlr/mojo/antlr5/Antlr5Mojo.java @@ -8,7 +8,7 @@ import org.antlr.v5.Tool; import org.antlr.v5.codegen.CodeGenerator; -import org.antlr.v5.runtime._unused.misc.MultiMap; +import org.antlr.v5.runtime.java._unused.misc.MultiMap; import org.antlr.v5.tool.Grammar; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; diff --git a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/JavaRunner.java b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/JavaRunner.java index 7528c204d..7c0a513a8 100644 --- a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/JavaRunner.java +++ b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/JavaRunner.java @@ -5,7 +5,6 @@ */ package org.antlr.v5.test.runtime.java; -import org.antlr.v5.runtime.*; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.Lexer; import org.antlr.v5.runtime.core.Parser; @@ -14,7 +13,8 @@ import org.antlr.v5.runtime.core.atn.ProfilingATNSimulator; import org.antlr.v5.runtime.core.context.ParserRuleContext; import org.antlr.v5.runtime.core.tree.ParseTree; -import org.antlr.v5.runtime.tree.ParseTreeWalker; +import org.antlr.v5.runtime.java.DiagnosticErrorListener; +import org.antlr.v5.runtime.java.tree.ParseTreeWalker; import org.antlr.v5.test.runtime.*; import org.antlr.v5.test.runtime.java.helpers.CustomStreamErrorListener; import org.antlr.v5.test.runtime.java.helpers.RuntimeTestLexer; diff --git a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/TestCharStreams.java b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/TestCharStreams.java index f82774466..c98f5b411 100644 --- a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/TestCharStreams.java +++ b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/TestCharStreams.java @@ -7,7 +7,7 @@ package org.antlr.v5.test.runtime.java; import org.antlr.v5.runtime.core.CharStream; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; diff --git a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestTokenStream.java b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestTokenStream.java index 1ca2db8e0..7aaea9b03 100644 --- a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestTokenStream.java +++ b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestTokenStream.java @@ -5,7 +5,7 @@ */ package org.antlr.v5.test.runtime.java.api; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.*; import org.junit.jupiter.api.Test; diff --git a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestTokenStreamRewriter.java b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestTokenStreamRewriter.java index 436e43d9f..7d102dd4a 100644 --- a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestTokenStreamRewriter.java +++ b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestTokenStreamRewriter.java @@ -5,10 +5,11 @@ */ package org.antlr.v5.test.runtime.java.api; -import org.antlr.v5.runtime.*; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.LexerInterpreter; import org.antlr.v5.runtime.core.misc.Interval; +import org.antlr.v5.runtime.java.CharStreams; +import org.antlr.v5.runtime.java.TokenStreamRewriter; import org.antlr.v5.tool.LexerGrammar; import org.junit.jupiter.api.Test; diff --git a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestVisitors.java b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestVisitors.java index 991d8ae12..bf801a490 100644 --- a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestVisitors.java +++ b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/TestVisitors.java @@ -5,14 +5,15 @@ */ package org.antlr.v5.test.runtime.java.api; -import org.antlr.v5.runtime.BaseErrorListener; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.BaseErrorListener; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.Recognizer; import org.antlr.v5.runtime.core.error.RecognitionException; import org.antlr.v5.runtime.core.tree.ErrorNode; import org.antlr.v5.runtime.core.tree.RuleNode; import org.antlr.v5.runtime.core.tree.TerminalNode; +import org.antlr.v5.runtime.java.tree.AbstractParseTreeVisitor; import org.junit.jupiter.api.Test; import java.util.ArrayList; @@ -108,7 +109,7 @@ protected String aggregateResult(String aggregate, String nextResult) { /** * This test verifies that {@link AbstractParseTreeVisitor#visitChildren} does not call * {@link org.antlr.v5.runtime.tree.ParseTreeVisitor#visit} after - * {@link org.antlr.v5.runtime.tree.AbstractParseTreeVisitor#shouldVisitNextChild} returns + * {@link AbstractParseTreeVisitor#shouldVisitNextChild} returns * {@code false}. */ @Test diff --git a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/perf/TimeLexerSpeed.java b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/perf/TimeLexerSpeed.java index 5ba4f2086..adcfedb24 100644 --- a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/perf/TimeLexerSpeed.java +++ b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/api/perf/TimeLexerSpeed.java @@ -6,7 +6,7 @@ package org.antlr.v5.test.runtime.java.api.perf; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CharStream; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.Lexer; diff --git a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/helpers/CustomStreamErrorListener.java b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/helpers/CustomStreamErrorListener.java index 4acccdb13..10252c45c 100644 --- a/runtime-testsuite/test/org/antlr/v5/test/runtime/java/helpers/CustomStreamErrorListener.java +++ b/runtime-testsuite/test/org/antlr/v5/test/runtime/java/helpers/CustomStreamErrorListener.java @@ -1,6 +1,6 @@ package org.antlr.v5.test.runtime.java.helpers; -import org.antlr.v5.runtime.BaseErrorListener; +import org.antlr.v5.runtime.java.BaseErrorListener; import org.antlr.v5.runtime.core.error.RecognitionException; import org.antlr.v5.runtime.core.Recognizer; diff --git a/runtime-testsuite/test/org/antlr/v5/test/runtime/states/jvm/JavaCompiledState.java b/runtime-testsuite/test/org/antlr/v5/test/runtime/states/jvm/JavaCompiledState.java index 2ed604b3c..75aef9e3b 100644 --- a/runtime-testsuite/test/org/antlr/v5/test/runtime/states/jvm/JavaCompiledState.java +++ b/runtime-testsuite/test/org/antlr/v5/test/runtime/states/jvm/JavaCompiledState.java @@ -1,7 +1,7 @@ package org.antlr.v5.test.runtime.states.jvm; import kotlin.Pair; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CharStream; import org.antlr.v5.runtime.core.TokenStream; import org.antlr.v5.runtime.core.CommonTokenStream; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/BailErrorStrategy.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/BailErrorStrategy.java similarity index 98% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/BailErrorStrategy.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/BailErrorStrategy.java index 9cf1fca87..f16712edf 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/BailErrorStrategy.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/BailErrorStrategy.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import org.antlr.v5.runtime.core.Parser; import org.antlr.v5.runtime.core.Token; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/BaseErrorListener.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/BaseErrorListener.java similarity index 97% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/BaseErrorListener.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/BaseErrorListener.java index 85babb76a..aafd077e6 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/BaseErrorListener.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/BaseErrorListener.java @@ -3,7 +3,7 @@ * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import org.antlr.v5.runtime.core.atn.ATNConfigSet; import org.antlr.v5.runtime.core.Parser; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/CharStreams.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/CharStreams.java similarity index 99% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/CharStreams.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/CharStreams.java index 99258bb9c..57494cb3c 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/CharStreams.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/CharStreams.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import org.antlr.v5.runtime.core.CharStream; import org.antlr.v5.runtime.core.IntStream; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/CodePointBuffer.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/CodePointBuffer.java similarity index 99% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/CodePointBuffer.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/CodePointBuffer.java index 38d0fc2e5..980b3cdfa 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/CodePointBuffer.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/CodePointBuffer.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import java.nio.ByteBuffer; import java.nio.CharBuffer; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/CodePointCharStream.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/CodePointCharStream.java similarity index 99% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/CodePointCharStream.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/CodePointCharStream.java index 0abd855e1..b7a4bacae 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/CodePointCharStream.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/CodePointCharStream.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import org.antlr.v5.runtime.core.IntStream; import org.antlr.v5.runtime.core.CharStream; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/ConsoleErrorListener.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/ConsoleErrorListener.java similarity index 97% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/ConsoleErrorListener.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/ConsoleErrorListener.java index eb5e73bea..6ceaae088 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/ConsoleErrorListener.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/ConsoleErrorListener.java @@ -3,7 +3,7 @@ * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import org.antlr.v5.runtime.core.Recognizer; import org.antlr.v5.runtime.core.error.RecognitionException; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/DiagnosticErrorListener.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/DiagnosticErrorListener.java similarity index 99% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/DiagnosticErrorListener.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/DiagnosticErrorListener.java index 3e1898b27..1804f56ba 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/DiagnosticErrorListener.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/DiagnosticErrorListener.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import org.antlr.v5.runtime.core.Parser; import org.antlr.v5.runtime.core.atn.ATNConfig; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/ListTokenSource.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/ListTokenSource.java similarity index 99% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/ListTokenSource.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/ListTokenSource.java index 97fae58ce..847de1c40 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/ListTokenSource.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/ListTokenSource.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import kotlin.Pair; import org.antlr.v5.runtime.core.*; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/TokenStreamRewriter.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/TokenStreamRewriter.java similarity index 99% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/TokenStreamRewriter.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/TokenStreamRewriter.java index c5c19d38e..22961a0b3 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/TokenStreamRewriter.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/TokenStreamRewriter.java @@ -3,7 +3,7 @@ * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import org.antlr.v5.runtime.core.Token; import org.antlr.v5.runtime.core.TokenStream; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/misc/MultiMap.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/misc/MultiMap.java similarity index 94% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/misc/MultiMap.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/misc/MultiMap.java index 6efff293c..0ecb25ced 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/misc/MultiMap.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/misc/MultiMap.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.misc; +package org.antlr.v5.runtime.java._unused.misc; import kotlin.Pair; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/Chunk.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/Chunk.java similarity index 93% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/Chunk.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/Chunk.java index 408ded4b6..7fd75ed2b 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/Chunk.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/Chunk.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; /** * A chunk is either a token tag, a rule tag, or a span of literal text within a diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreeMatch.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreeMatch.java similarity index 98% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreeMatch.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreeMatch.java index 9c93b8935..2dad70835 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreeMatch.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreeMatch.java @@ -4,9 +4,9 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; -import org.antlr.v5.runtime._unused.misc.MultiMap; +import org.antlr.v5.runtime.java._unused.misc.MultiMap; import org.antlr.v5.runtime.core.tree.ParseTree; import java.util.Collections; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePattern.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePattern.java similarity index 97% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePattern.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePattern.java index 374b0d4f4..fab37506d 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePattern.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePattern.java @@ -4,9 +4,9 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; -import org.antlr.v5.runtime._unused.tree.xpath.XPath; +import org.antlr.v5.runtime.java._unused.tree.xpath.XPath; import org.antlr.v5.runtime.core.tree.ParseTree; import java.util.ArrayList; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePatternCompiler.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePatternCompiler.java similarity index 93% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePatternCompiler.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePatternCompiler.java index 372dcd128..be1b6e8a2 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePatternCompiler.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePatternCompiler.java @@ -1,4 +1,4 @@ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; import org.antlr.v5.runtime.core.Lexer; import org.antlr.v5.runtime.core.Parser; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePatternMatcher.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePatternMatcher.java similarity index 98% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePatternMatcher.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePatternMatcher.java index 4532e12fe..23208eb1b 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/ParseTreePatternMatcher.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/ParseTreePatternMatcher.java @@ -4,12 +4,12 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; -import org.antlr.v5.runtime.BailErrorStrategy; -import org.antlr.v5.runtime.CharStreams; -import org.antlr.v5.runtime.ListTokenSource; -import org.antlr.v5.runtime._unused.misc.MultiMap; +import org.antlr.v5.runtime.java.BailErrorStrategy; +import org.antlr.v5.runtime.java.CharStreams; +import org.antlr.v5.runtime.java.ListTokenSource; +import org.antlr.v5.runtime.java._unused.misc.MultiMap; import org.antlr.v5.runtime.core.*; import org.antlr.v5.runtime.core.atn.ATN; import org.antlr.v5.runtime.core.context.ParserRuleContext; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/RuleTagToken.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/RuleTagToken.java similarity index 98% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/RuleTagToken.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/RuleTagToken.java index de6bf64e4..5a8a457c3 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/RuleTagToken.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/RuleTagToken.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; import org.antlr.v5.runtime.core.CharStream; import org.antlr.v5.runtime.core.Token; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TagChunk.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TagChunk.java similarity index 97% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TagChunk.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TagChunk.java index b78862952..abc54f49d 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TagChunk.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TagChunk.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; /** * Represents a placeholder tag in a tree pattern. A tag can have any of the diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TextChunk.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TextChunk.java similarity index 95% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TextChunk.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TextChunk.java index a11e329ad..3e9f2320f 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TextChunk.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TextChunk.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; /** * Represents a span of raw text (concrete syntax) between tags in a tree diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TokenTagToken.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TokenTagToken.java similarity index 97% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TokenTagToken.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TokenTagToken.java index 4618ef1c0..593b8ecbd 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/pattern/TokenTagToken.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/pattern/TokenTagToken.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.pattern; +package org.antlr.v5.runtime.java._unused.tree.pattern; import org.antlr.v5.runtime.core.Token; import org.antlr.v5.runtime.core.CommonToken; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPath.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPath.java similarity index 98% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPath.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPath.java index ad8dd7514..297bfef2d 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPath.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPath.java @@ -4,9 +4,8 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; -import org.antlr.v5.runtime.*; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.Token; import org.antlr.v5.runtime.core.context.ParserRuleContext; @@ -14,6 +13,7 @@ import org.antlr.v5.runtime.core.CharStream; import org.antlr.v5.runtime.core.Parser; import org.antlr.v5.runtime.core.tree.ParseTree; +import org.antlr.v5.runtime.java.CharStreams; import java.io.IOException; import java.util.ArrayList; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathElement.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathElement.java similarity index 94% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathElement.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathElement.java index 8fc6c4187..2260a9d43 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathElement.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathElement.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; import org.antlr.v5.runtime.core.tree.ParseTree; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathLexer.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathLexer.java similarity index 98% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathLexer.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathLexer.java index cfec22232..9f7160949 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathLexer.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathLexer.java @@ -3,7 +3,7 @@ * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; import org.antlr.v5.runtime.core.*; import org.antlr.v5.runtime.core.atn.LexerATNSimulator; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathLexerErrorListener.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathLexerErrorListener.java similarity index 84% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathLexerErrorListener.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathLexerErrorListener.java index abbfc97b3..016e01e1e 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathLexerErrorListener.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathLexerErrorListener.java @@ -4,9 +4,9 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; -import org.antlr.v5.runtime.BaseErrorListener; +import org.antlr.v5.runtime.java.BaseErrorListener; import org.antlr.v5.runtime.core.error.RecognitionException; import org.antlr.v5.runtime.core.Recognizer; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathRuleAnywhereElement.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathRuleAnywhereElement.java similarity index 93% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathRuleAnywhereElement.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathRuleAnywhereElement.java index 45f57e159..715649a84 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathRuleAnywhereElement.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathRuleAnywhereElement.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; import org.antlr.v5.runtime.core.tree.ParseTree; import org.antlr.v5.runtime.core.tree.Trees; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathRuleElement.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathRuleElement.java similarity index 95% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathRuleElement.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathRuleElement.java index 2bd1b2534..25fcd80f6 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathRuleElement.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathRuleElement.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; import org.antlr.v5.runtime.core.context.ParserRuleContext; import org.antlr.v5.runtime.core.tree.ParseTree; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathTokenAnywhereElement.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathTokenAnywhereElement.java similarity index 92% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathTokenAnywhereElement.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathTokenAnywhereElement.java index 3e6b28509..c2507d482 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathTokenAnywhereElement.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathTokenAnywhereElement.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; import org.antlr.v5.runtime.core.tree.ParseTree; import org.antlr.v5.runtime.core.tree.Trees; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathTokenElement.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathTokenElement.java similarity index 95% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathTokenElement.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathTokenElement.java index 1349a2f6f..4da4dc6b8 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathTokenElement.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathTokenElement.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; import org.antlr.v5.runtime.core.tree.ParseTree; import org.antlr.v5.runtime.core.tree.TerminalNode; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathWildcardAnywhereElement.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathWildcardAnywhereElement.java similarity index 92% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathWildcardAnywhereElement.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathWildcardAnywhereElement.java index ce7d9cf48..9e85aa208 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathWildcardAnywhereElement.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathWildcardAnywhereElement.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; import org.antlr.v5.runtime.core.tree.ParseTree; import org.antlr.v5.runtime.core.tree.Trees; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathWildcardElement.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathWildcardElement.java similarity index 94% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathWildcardElement.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathWildcardElement.java index 65cf2f178..308c43c4c 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/_unused/tree/xpath/XPathWildcardElement.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/_unused/tree/xpath/XPathWildcardElement.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime._unused.tree.xpath; +package org.antlr.v5.runtime.java._unused.tree.xpath; import org.antlr.v5.runtime.core.tree.ParseTree; import org.antlr.v5.runtime.core.tree.Tree; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/tree/AbstractParseTreeVisitor.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/AbstractParseTreeVisitor.java similarity index 99% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/tree/AbstractParseTreeVisitor.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/AbstractParseTreeVisitor.java index f6f5528e4..166f79e4d 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/tree/AbstractParseTreeVisitor.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/AbstractParseTreeVisitor.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime.tree; +package org.antlr.v5.runtime.java.tree; import org.antlr.v5.runtime.core.tree.*; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/tree/IterativeParseTreeWalker.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/IterativeParseTreeWalker.java similarity index 98% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/tree/IterativeParseTreeWalker.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/IterativeParseTreeWalker.java index 37712d74f..a3c8acf52 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/tree/IterativeParseTreeWalker.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/IterativeParseTreeWalker.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime.tree; +package org.antlr.v5.runtime.java.tree; import org.antlr.v5.runtime.core.misc.IntegerStack; import org.antlr.v5.runtime.core.tree.*; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/tree/ParseTreeProperty.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/ParseTreeProperty.java similarity index 96% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/tree/ParseTreeProperty.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/ParseTreeProperty.java index dbcb46bde..de636b679 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/tree/ParseTreeProperty.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/ParseTreeProperty.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime.tree; +package org.antlr.v5.runtime.java.tree; import org.antlr.v5.runtime.core.tree.ParseTree; diff --git a/runtime/Java/src/main/java/org/antlr/v5/runtime/tree/ParseTreeWalker.java b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/ParseTreeWalker.java similarity index 98% rename from runtime/Java/src/main/java/org/antlr/v5/runtime/tree/ParseTreeWalker.java rename to runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/ParseTreeWalker.java index 8c86c23a0..a81271c6e 100644 --- a/runtime/Java/src/main/java/org/antlr/v5/runtime/tree/ParseTreeWalker.java +++ b/runtime/Java/src/main/java/org/antlr/v5/runtime/java/tree/ParseTreeWalker.java @@ -4,7 +4,7 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime.tree; +package org.antlr.v5.runtime.java.tree; import org.antlr.v5.runtime.core.context.ParserRuleContext; import org.antlr.v5.runtime.core.tree.*; diff --git a/runtime/Java/src/test/java/org/antlr/v5/runtime/TestCodePointCharStream.java b/runtime/Java/src/test/java/org/antlr/v5/runtime/java/TestCodePointCharStream.java similarity index 98% rename from runtime/Java/src/test/java/org/antlr/v5/runtime/TestCodePointCharStream.java rename to runtime/Java/src/test/java/org/antlr/v5/runtime/java/TestCodePointCharStream.java index ae811f8ee..fef70f49f 100644 --- a/runtime/Java/src/test/java/org/antlr/v5/runtime/TestCodePointCharStream.java +++ b/runtime/Java/src/test/java/org/antlr/v5/runtime/java/TestCodePointCharStream.java @@ -4,10 +4,12 @@ * can be found in the LICENSE.txt file in the project root. */ -package org.antlr.v5.runtime; +package org.antlr.v5.runtime.java; import org.antlr.v5.runtime.core.IntStream; import org.antlr.v5.runtime.core.misc.Interval; +import org.antlr.v5.runtime.java.CharStreams; +import org.antlr.v5.runtime.java.CodePointCharStream; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestATNLexerInterpreter.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestATNLexerInterpreter.java index edb4f6eb1..1c4e8c319 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestATNLexerInterpreter.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestATNLexerInterpreter.java @@ -6,7 +6,6 @@ package org.antlr.v5.test.tool; -import org.antlr.v5.runtime.*; import org.antlr.v5.runtime.core.CharStream; import org.antlr.v5.runtime.core.IntStream; import org.antlr.v5.runtime.core.Lexer; @@ -15,7 +14,7 @@ import org.antlr.v5.runtime.core.state.ATNState; import org.antlr.v5.runtime.core.atn.LexerATNSimulator; import org.antlr.v5.runtime.core.dfa.DFA; -import org.antlr.v5.runtime.core.misc.Utils; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.test.runtime.states.ExecutedState; import org.antlr.v5.tool.DOTGenerator; import org.antlr.v5.tool.LexerGrammar; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestAmbigParseTrees.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestAmbigParseTrees.java index 9ad866793..6b6fef29e 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestAmbigParseTrees.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestAmbigParseTrees.java @@ -7,7 +7,7 @@ package org.antlr.v5.test.tool; import org.antlr.v5.gui.Trees; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.LexerInterpreter; import org.antlr.v5.runtime.core.ParserInterpreter; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestBufferedTokenStream.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestBufferedTokenStream.java index 7936b6987..fed27f479 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestBufferedTokenStream.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestBufferedTokenStream.java @@ -6,8 +6,8 @@ package org.antlr.v5.test.tool; -import org.antlr.v5.runtime.*; import org.antlr.v5.runtime.core.*; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.tool.LexerGrammar; import org.junit.jupiter.api.Test; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestGrammarParserInterpreter.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestGrammarParserInterpreter.java index 0edc7b73b..22492ce61 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestGrammarParserInterpreter.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestGrammarParserInterpreter.java @@ -6,7 +6,7 @@ package org.antlr.v5.test.tool; import org.antlr.v5.gui.Trees; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.LexerInterpreter; import org.antlr.v5.runtime.core.context.InterpreterRuleContext; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestLookaheadTrees.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestLookaheadTrees.java index 860d76c08..2dd3a6810 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestLookaheadTrees.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestLookaheadTrees.java @@ -7,7 +7,7 @@ package org.antlr.v5.test.tool; import org.antlr.v5.gui.Trees; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.LexerInterpreter; import org.antlr.v5.runtime.core.context.ParserRuleContext; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestParseTreeMatcher.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestParseTreeMatcher.java index cb68b682c..a0bd73bd4 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestParseTreeMatcher.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestParseTreeMatcher.java @@ -7,10 +7,10 @@ package org.antlr.v5.test.tool; import kotlin.Pair; -import org.antlr.v5.runtime._unused.tree.pattern.ParseTreeMatch; -import org.antlr.v5.runtime._unused.tree.pattern.ParseTreePattern; -import org.antlr.v5.runtime._unused.tree.pattern.ParseTreePatternCompiler; -import org.antlr.v5.runtime._unused.tree.pattern.ParseTreePatternMatcher; +import org.antlr.v5.runtime.java._unused.tree.pattern.ParseTreeMatch; +import org.antlr.v5.runtime.java._unused.tree.pattern.ParseTreePattern; +import org.antlr.v5.runtime.java._unused.tree.pattern.ParseTreePatternCompiler; +import org.antlr.v5.runtime.java._unused.tree.pattern.ParseTreePatternMatcher; import org.antlr.v5.runtime.core.Lexer; import org.antlr.v5.runtime.core.Parser; import org.antlr.v5.runtime.core.Token; @@ -18,7 +18,6 @@ import org.antlr.v5.runtime.core.error.NoViableAltException; import org.antlr.v5.test.runtime.RunOptions; import org.antlr.v5.test.runtime.java.JavaRunner; -import org.antlr.v5.test.runtime.states.CompiledState; import org.antlr.v5.test.runtime.states.State; import org.antlr.v5.test.runtime.states.jvm.JavaCompiledState; import org.antlr.v5.test.runtime.states.jvm.JavaExecutedState; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestParserInterpreter.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestParserInterpreter.java index 9325f3d7c..e6a15f558 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestParserInterpreter.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestParserInterpreter.java @@ -6,7 +6,7 @@ package org.antlr.v5.test.tool; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.LexerInterpreter; import org.antlr.v5.runtime.core.ParserInterpreter; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestParserProfiler.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestParserProfiler.java index 8b811a020..29c344c9b 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestParserProfiler.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestParserProfiler.java @@ -6,8 +6,7 @@ package org.antlr.v5.test.tool; -import org.antlr.runtime.RecognitionException; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.LexerInterpreter; import org.antlr.v5.runtime.core.ParserInterpreter; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestPerformance.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestPerformance.java index 9c3898deb..93816fa7a 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestPerformance.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestPerformance.java @@ -6,7 +6,6 @@ package org.antlr.v5.test.tool; -import org.antlr.v5.runtime.*; import org.antlr.v5.runtime.core.*; import org.antlr.v5.runtime.core.atn.*; import org.antlr.v5.runtime.core.atn.PredictionMode; @@ -22,7 +21,10 @@ import org.antlr.v5.runtime.core.tree.ParseTreeListener; import org.antlr.v5.runtime.core.tree.TerminalNode; import org.antlr.v5.runtime.core.error.DefaultErrorStrategy; -import org.antlr.v5.runtime.tree.ParseTreeWalker; +import org.antlr.v5.runtime.java.BailErrorStrategy; +import org.antlr.v5.runtime.java.BaseErrorListener; +import org.antlr.v5.runtime.java.DiagnosticErrorListener; +import org.antlr.v5.runtime.java.tree.ParseTreeWalker; import org.antlr.v5.test.runtime.*; import org.antlr.v5.test.runtime.java.JavaRunner; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestUnbufferedTokenStream.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestUnbufferedTokenStream.java index 59cf7f326..975925d08 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestUnbufferedTokenStream.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestUnbufferedTokenStream.java @@ -6,12 +6,11 @@ package org.antlr.v5.test.tool; -import org.antlr.v5.runtime.*; import org.antlr.v5.runtime.core.*; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.tool.LexerGrammar; import org.junit.jupiter.api.Test; -import java.io.StringReader; import java.util.Arrays; import java.util.Collections; import java.util.List; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestUnicodeGrammar.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestUnicodeGrammar.java index 8edab90be..d0d5d3c29 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestUnicodeGrammar.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestUnicodeGrammar.java @@ -7,7 +7,7 @@ package org.antlr.v5.test.tool; import org.antlr.v5.gui.Trees; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CharStream; import org.antlr.v5.runtime.core.CommonTokenStream; import org.antlr.v5.runtime.core.LexerInterpreter; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/TestXPath.java b/tool-testsuite/test/org/antlr/v5/test/tool/TestXPath.java index 33a9a0b54..46c76d416 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/TestXPath.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/TestXPath.java @@ -7,7 +7,7 @@ package org.antlr.v5.test.tool; import kotlin.Pair; -import org.antlr.v5.runtime._unused.tree.xpath.XPath; +import org.antlr.v5.runtime.java._unused.tree.xpath.XPath; import org.antlr.v5.runtime.core.Parser; import org.antlr.v5.runtime.core.context.RuleContext; import org.antlr.v5.runtime.core.tree.ParseTree; diff --git a/tool-testsuite/test/org/antlr/v5/test/tool/ToolTestUtils.java b/tool-testsuite/test/org/antlr/v5/test/tool/ToolTestUtils.java index 7c0efe861..96a5b9254 100644 --- a/tool-testsuite/test/org/antlr/v5/test/tool/ToolTestUtils.java +++ b/tool-testsuite/test/org/antlr/v5/test/tool/ToolTestUtils.java @@ -9,7 +9,7 @@ import org.antlr.v5.Tool; import org.antlr.v5.automata.LexerATNFactory; import org.antlr.v5.automata.ParserATNFactory; -import org.antlr.v5.runtime.CharStreams; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.runtime.core.CharStream; import org.antlr.v5.runtime.core.Lexer; import org.antlr.v5.runtime.core.Token; diff --git a/tool/resources/org/antlr/v5/tool/templates/codegen/Java/Java.stg b/tool/resources/org/antlr/v5/tool/templates/codegen/Java/Java.stg index f38f76b76..d83259b54 100644 --- a/tool/resources/org/antlr/v5/tool/templates/codegen/Java/Java.stg +++ b/tool/resources/org/antlr/v5/tool/templates/codegen/Java/Java.stg @@ -56,8 +56,8 @@ import org.antlr.v5.runtime.core.error.*; import org.antlr.v5.runtime.core.dfa.*; import org.antlr.v5.runtime.core.misc.*; import org.antlr.v5.runtime.core.tree.*; -import org.antlr.v5.runtime.*; -import org.antlr.v5.runtime.tree.*; +import org.antlr.v5.runtime.java.*; +import org.antlr.v5.runtime.java.tree.*; import java.util.List; import java.util.Iterator; import java.util.ArrayList; @@ -199,7 +199,7 @@ BaseVisitorFile(file, header, namedActions) ::= << package ;
-import org.antlr.v5.runtime.tree.AbstractParseTreeVisitor; +import org.antlr.v5.runtime.java.tree.AbstractParseTreeVisitor; /** * This class provides an empty implementation of {@link Visitor}, diff --git a/tool/src/org/antlr/v5/gui/Interpreter.java b/tool/src/org/antlr/v5/gui/Interpreter.java index 00de99028..4471249b6 100644 --- a/tool/src/org/antlr/v5/gui/Interpreter.java +++ b/tool/src/org/antlr/v5/gui/Interpreter.java @@ -2,11 +2,11 @@ import org.antlr.runtime.RecognitionException; import org.antlr.v5.Tool; -import org.antlr.v5.runtime.*; import org.antlr.v5.runtime.core.*; import org.antlr.v5.runtime.core.info.DecisionInfo; import org.antlr.v5.runtime.core.info.ParseInfo; import org.antlr.v5.runtime.core.tree.ParseTree; +import org.antlr.v5.runtime.java.CharStreams; import org.antlr.v5.tool.*; import java.io.FileWriter; diff --git a/tool/src/org/antlr/v5/gui/TestRig.java b/tool/src/org/antlr/v5/gui/TestRig.java index 8269ecca5..946be5d4f 100644 --- a/tool/src/org/antlr/v5/gui/TestRig.java +++ b/tool/src/org/antlr/v5/gui/TestRig.java @@ -6,8 +6,8 @@ package org.antlr.v5.gui; -import org.antlr.v5.runtime.CharStreams; -import org.antlr.v5.runtime.DiagnosticErrorListener; +import org.antlr.v5.runtime.java.CharStreams; +import org.antlr.v5.runtime.java.DiagnosticErrorListener; import org.antlr.v5.runtime.core.*; import org.antlr.v5.runtime.core.atn.PredictionMode; import org.antlr.v5.runtime.core.context.ParserRuleContext; diff --git a/tool/src/org/antlr/v5/tool/GrammarParserInterpreter.java b/tool/src/org/antlr/v5/tool/GrammarParserInterpreter.java index c56dda930..98e275398 100644 --- a/tool/src/org/antlr/v5/tool/GrammarParserInterpreter.java +++ b/tool/src/org/antlr/v5/tool/GrammarParserInterpreter.java @@ -5,7 +5,7 @@ */ package org.antlr.v5.tool; -import org.antlr.v5.runtime.BailErrorStrategy; +import org.antlr.v5.runtime.java.BailErrorStrategy; import org.antlr.v5.runtime.core.*; import org.antlr.v5.runtime.core.atn.ATN; import org.antlr.v5.runtime.core.atn.PredictionMode; diff --git a/tool/src/org/antlr/v5/tool/LexerGrammar.java b/tool/src/org/antlr/v5/tool/LexerGrammar.java index 4fbab0281..2237bd402 100644 --- a/tool/src/org/antlr/v5/tool/LexerGrammar.java +++ b/tool/src/org/antlr/v5/tool/LexerGrammar.java @@ -7,7 +7,7 @@ package org.antlr.v5.tool; import org.antlr.v5.Tool; -import org.antlr.v5.runtime._unused.misc.MultiMap; +import org.antlr.v5.runtime.java._unused.misc.MultiMap; import org.antlr.v5.runtime.core.error.RecognitionException; import org.antlr.v5.tool.ast.GrammarRootAST;