Merge pull request #636 from sharwell/consistent-versions

Consistent versions
This commit is contained in:
Terence Parr 2014-06-18 17:56:31 -07:00
commit 3e6e218f46
23 changed files with 59 additions and 14 deletions

View File

@ -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>

View File

@ -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" />

View File

@ -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>

View File

@ -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>

View File

@ -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 ) {

View File

@ -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;

View File

@ -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

View File

@ -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() {

View File

@ -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.");

View File

@ -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 {
/**

View File

@ -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 {
/**

View File

@ -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 {
/**

View File

@ -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 {
/**

View File

@ -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 {
/**

View File

@ -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 {
/**

View File

@ -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;

View File

@ -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;
}

View File

@ -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 {
/**

View File

@ -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;

View File

@ -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();

View File

@ -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>

View File

@ -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>

View File

@ -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;
}