forked from jasder/antlr
Merge pull request #636 from sharwell/consistent-versions
Consistent versions
This commit is contained in:
commit
3e6e218f46
|
@ -40,7 +40,7 @@
|
|||
<parent>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-master</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>antlr4-maven-plugin</artifactId>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</target>
|
||||
|
||||
<target name="build-init" depends="basic-init">
|
||||
<property name="version" value="4.3"/>
|
||||
<property name="version" value="4.3-SNAPSHOT"/>
|
||||
<property name="build.sysclasspath" value="ignore"/>
|
||||
<property name="install.root.dir" value="${dist.dir}/antlr-${version}" />
|
||||
<property name="jar.file" value="${dist.dir}/antlr-${version}-complete.jar" />
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -9,7 +9,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-master</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.3-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>ANTLR 4</name>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-master</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.3-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
|||
<plugin>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-maven-plugin</artifactId>
|
||||
<version>4.2</version>
|
||||
<version>4.2.2</version>
|
||||
<configuration>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
</configuration>
|
||||
|
|
|
@ -892,6 +892,9 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 4.3
|
||||
*/
|
||||
public void setProfile(boolean profile) {
|
||||
ParserATNSimulator interp = getInterpreter();
|
||||
if ( profile ) {
|
||||
|
|
|
@ -160,6 +160,8 @@ public abstract class Recognizer<Symbol, ATNInterpreter extends ATNSimulator> {
|
|||
|
||||
/** If profiling during the parse/lex, this will return DecisionInfo records
|
||||
* for each decision in recognizer in a ParseInfo object.
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public ParseInfo getParseInfo() {
|
||||
return null;
|
||||
|
|
|
@ -61,6 +61,8 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
|||
* be removed by calling {@link #removeListener} for
|
||||
* {@link DefaultListener#INSTANCE} or {@link #clearListeners}. If required, it
|
||||
* may be re-registered by calling {@link #addListener}.</p>
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class RuntimeMetaData {
|
||||
/**
|
||||
|
@ -71,13 +73,8 @@ public class RuntimeMetaData {
|
|||
* This compile-time constant value allows generated parsers and other
|
||||
* libraries to include a literal reference to the version of the ANTLR 4
|
||||
* runtime library the code was compiled against.</p>
|
||||
*
|
||||
* <p>
|
||||
* During development (between releases), this value contains the
|
||||
* <em>expected</em> next release version. For official releases, the value
|
||||
* will be the actual published version of the library.</p>
|
||||
*/
|
||||
public static final String VERSION = "4.3";
|
||||
public static final String VERSION = "4.3-SNAPSHOT";
|
||||
|
||||
/**
|
||||
* This class provides detailed information about a mismatch between the
|
||||
|
|
|
@ -199,6 +199,8 @@ public class ATNConfigSet implements Set<ATNConfig> {
|
|||
* set.
|
||||
*
|
||||
* @return the set of represented alternatives in this configuration set
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
@NotNull
|
||||
public BitSet getAlts() {
|
||||
|
|
|
@ -108,6 +108,8 @@ public abstract class ATNSimulator {
|
|||
*
|
||||
* @throws UnsupportedOperationException if the current instance does not
|
||||
* support clearing the DFA.
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public void clearDFA() {
|
||||
throw new UnsupportedOperationException("This ATN simulator does not support clearing the DFA.");
|
||||
|
|
|
@ -60,6 +60,8 @@ import org.antlr.v4.runtime.misc.NotNull;
|
|||
*
|
||||
* @see ParserATNSimulator#reportAmbiguity
|
||||
* @see ANTLRErrorListener#reportAmbiguity
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class AmbiguityInfo extends DecisionEventInfo {
|
||||
/**
|
||||
|
|
|
@ -49,6 +49,8 @@ import org.antlr.v4.runtime.misc.NotNull;
|
|||
*
|
||||
* @see ParserATNSimulator#reportContextSensitivity
|
||||
* @see ANTLRErrorListener#reportContextSensitivity
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class ContextSensitivityInfo extends DecisionEventInfo {
|
||||
/**
|
||||
|
|
|
@ -37,6 +37,8 @@ import org.antlr.v4.runtime.misc.Nullable;
|
|||
/**
|
||||
* This is the base class for gathering detailed information about prediction
|
||||
* events which occur during parsing.
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class DecisionEventInfo {
|
||||
/**
|
||||
|
|
|
@ -43,6 +43,8 @@ import java.util.List;
|
|||
* operations are started). For best results, gather and use aggregate
|
||||
* statistics from a large sample of inputs representing the inputs expected in
|
||||
* production before using the results to make changes in the grammar.</p>
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class DecisionInfo {
|
||||
/**
|
||||
|
|
|
@ -45,6 +45,8 @@ import org.antlr.v4.runtime.misc.NotNull;
|
|||
*
|
||||
* @see Parser#notifyErrorListeners(Token, String, RecognitionException)
|
||||
* @see ANTLRErrorListener#syntaxError
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class ErrorInfo extends DecisionEventInfo {
|
||||
/**
|
||||
|
|
|
@ -37,6 +37,8 @@ import org.antlr.v4.runtime.misc.Nullable;
|
|||
/**
|
||||
* This class represents profiling event information for tracking the lookahead
|
||||
* depth required in order to make a prediction.
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class LookaheadEventInfo extends DecisionEventInfo {
|
||||
/**
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.util.List;
|
|||
/**
|
||||
* This class provides access to specific and aggregate statistics gathered
|
||||
* during profiling of a parser.
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class ParseInfo {
|
||||
protected final ProfilingATNSimulator atnSimulator;
|
||||
|
|
|
@ -1345,6 +1345,8 @@ public class ParserATNSimulator extends ATNSimulator {
|
|||
* @param fullCtx {@code true} if the evaluation is occurring during LL
|
||||
* prediction; otherwise, {@code false} if the evaluation is occurring
|
||||
* during SLL prediction
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
protected boolean evalSemanticContext(@NotNull SemanticContext pred, ParserRuleContext parserCallStack, int alt, boolean fullCtx) {
|
||||
return pred.eval(parser, parserCallStack);
|
||||
|
@ -1922,6 +1924,9 @@ public class ParserATNSimulator extends ATNSimulator {
|
|||
return mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 4.3
|
||||
*/
|
||||
public Parser getParser() {
|
||||
return parser;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ import org.antlr.v4.runtime.misc.NotNull;
|
|||
* evaluations which occur during prediction.
|
||||
*
|
||||
* @see ParserATNSimulator#evalSemanticContext
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public class PredicateEvalInfo extends DecisionEventInfo {
|
||||
/**
|
||||
|
|
|
@ -40,6 +40,9 @@ import org.antlr.v4.runtime.misc.Nullable;
|
|||
|
||||
import java.util.BitSet;
|
||||
|
||||
/**
|
||||
* @since 4.3
|
||||
*/
|
||||
public class ProfilingATNSimulator extends ParserATNSimulator {
|
||||
protected final DecisionInfo[] decisions;
|
||||
protected int numDecisions;
|
||||
|
|
|
@ -207,6 +207,8 @@ public abstract class SemanticContext {
|
|||
/**
|
||||
* This is the base class for semantic context "operators", which operate on
|
||||
* a collection of semantic context "operands".
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public static abstract class Operator extends SemanticContext {
|
||||
/**
|
||||
|
@ -214,6 +216,8 @@ public abstract class SemanticContext {
|
|||
*
|
||||
* @return a collection of {@link SemanticContext} operands for the
|
||||
* operator.
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
@NotNull
|
||||
public abstract Collection<SemanticContext> getOperands();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-master</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.3-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-master</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>antlr4</artifactId>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.10</version>
|
||||
<version>4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -93,6 +93,8 @@ public abstract class Target {
|
|||
* between a template called VERSION. This value is checked against Tool.VERSION during load of templates.
|
||||
*
|
||||
* This additional method forces all targets 4.3 and beyond to add this method.
|
||||
*
|
||||
* @since 4.3
|
||||
*/
|
||||
public abstract String getVersion();
|
||||
|
||||
|
@ -376,14 +378,23 @@ public abstract class Target {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 4.3
|
||||
*/
|
||||
public boolean wantsBaseListener() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 4.3
|
||||
*/
|
||||
public boolean wantsBaseVisitor() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 4.3
|
||||
*/
|
||||
public boolean supportsOverloadedMethods() {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue