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> <parent>
<groupId>org.antlr</groupId> <groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId> <artifactId>antlr4-master</artifactId>
<version>4.2.3-SNAPSHOT</version> <version>4.3-SNAPSHOT</version>
</parent> </parent>
<artifactId>antlr4-maven-plugin</artifactId> <artifactId>antlr4-maven-plugin</artifactId>

View File

@ -32,7 +32,7 @@
</target> </target>
<target name="build-init" depends="basic-init"> <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="build.sysclasspath" value="ignore"/>
<property name="install.root.dir" value="${dist.dir}/antlr-${version}" /> <property name="install.root.dir" value="${dist.dir}/antlr-${version}" />
<property name="jar.file" value="${dist.dir}/antlr-${version}-complete.jar" /> <property name="jar.file" value="${dist.dir}/antlr-${version}-complete.jar" />

View File

@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.antlr</groupId> <groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId> <artifactId>antlr4-master</artifactId>
<version>4.2.3-SNAPSHOT</version> <version>4.3-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>ANTLR 4</name> <name>ANTLR 4</name>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.antlr</groupId> <groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId> <artifactId>antlr4-master</artifactId>
<version>4.2.3-SNAPSHOT</version> <version>4.3-SNAPSHOT</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
@ -104,7 +104,7 @@
<plugin> <plugin>
<groupId>org.antlr</groupId> <groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId> <artifactId>antlr4-maven-plugin</artifactId>
<version>4.2</version> <version>4.2.2</version>
<configuration> <configuration>
<sourceDirectory>src</sourceDirectory> <sourceDirectory>src</sourceDirectory>
</configuration> </configuration>

View File

@ -892,6 +892,9 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
return null; return null;
} }
/**
* @since 4.3
*/
public void setProfile(boolean profile) { public void setProfile(boolean profile) {
ParserATNSimulator interp = getInterpreter(); ParserATNSimulator interp = getInterpreter();
if ( profile ) { 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 /** If profiling during the parse/lex, this will return DecisionInfo records
* for each decision in recognizer in a ParseInfo object. * for each decision in recognizer in a ParseInfo object.
*
* @since 4.3
*/ */
public ParseInfo getParseInfo() { public ParseInfo getParseInfo() {
return null; return null;

View File

@ -61,6 +61,8 @@ import java.util.concurrent.CopyOnWriteArraySet;
* be removed by calling {@link #removeListener} for * be removed by calling {@link #removeListener} for
* {@link DefaultListener#INSTANCE} or {@link #clearListeners}. If required, it * {@link DefaultListener#INSTANCE} or {@link #clearListeners}. If required, it
* may be re-registered by calling {@link #addListener}.</p> * may be re-registered by calling {@link #addListener}.</p>
*
* @since 4.3
*/ */
public class RuntimeMetaData { public class RuntimeMetaData {
/** /**
@ -71,13 +73,8 @@ public class RuntimeMetaData {
* This compile-time constant value allows generated parsers and other * This compile-time constant value allows generated parsers and other
* libraries to include a literal reference to the version of the ANTLR 4 * libraries to include a literal reference to the version of the ANTLR 4
* runtime library the code was compiled against.</p> * 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 * This class provides detailed information about a mismatch between the

View File

@ -199,6 +199,8 @@ public class ATNConfigSet implements Set<ATNConfig> {
* set. * set.
* *
* @return the set of represented alternatives in this configuration set * @return the set of represented alternatives in this configuration set
*
* @since 4.3
*/ */
@NotNull @NotNull
public BitSet getAlts() { public BitSet getAlts() {

View File

@ -108,6 +108,8 @@ public abstract class ATNSimulator {
* *
* @throws UnsupportedOperationException if the current instance does not * @throws UnsupportedOperationException if the current instance does not
* support clearing the DFA. * support clearing the DFA.
*
* @since 4.3
*/ */
public void clearDFA() { public void clearDFA() {
throw new UnsupportedOperationException("This ATN simulator does not support clearing the DFA."); 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 ParserATNSimulator#reportAmbiguity
* @see ANTLRErrorListener#reportAmbiguity * @see ANTLRErrorListener#reportAmbiguity
*
* @since 4.3
*/ */
public class AmbiguityInfo extends DecisionEventInfo { public class AmbiguityInfo extends DecisionEventInfo {
/** /**

View File

@ -49,6 +49,8 @@ import org.antlr.v4.runtime.misc.NotNull;
* *
* @see ParserATNSimulator#reportContextSensitivity * @see ParserATNSimulator#reportContextSensitivity
* @see ANTLRErrorListener#reportContextSensitivity * @see ANTLRErrorListener#reportContextSensitivity
*
* @since 4.3
*/ */
public class ContextSensitivityInfo extends DecisionEventInfo { 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 * This is the base class for gathering detailed information about prediction
* events which occur during parsing. * events which occur during parsing.
*
* @since 4.3
*/ */
public class DecisionEventInfo { public class DecisionEventInfo {
/** /**

View File

@ -43,6 +43,8 @@ import java.util.List;
* operations are started). For best results, gather and use aggregate * operations are started). For best results, gather and use aggregate
* statistics from a large sample of inputs representing the inputs expected in * statistics from a large sample of inputs representing the inputs expected in
* production before using the results to make changes in the grammar.</p> * production before using the results to make changes in the grammar.</p>
*
* @since 4.3
*/ */
public class DecisionInfo { public class DecisionInfo {
/** /**

View File

@ -45,6 +45,8 @@ import org.antlr.v4.runtime.misc.NotNull;
* *
* @see Parser#notifyErrorListeners(Token, String, RecognitionException) * @see Parser#notifyErrorListeners(Token, String, RecognitionException)
* @see ANTLRErrorListener#syntaxError * @see ANTLRErrorListener#syntaxError
*
* @since 4.3
*/ */
public class ErrorInfo extends DecisionEventInfo { 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 * This class represents profiling event information for tracking the lookahead
* depth required in order to make a prediction. * depth required in order to make a prediction.
*
* @since 4.3
*/ */
public class LookaheadEventInfo extends DecisionEventInfo { 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 * This class provides access to specific and aggregate statistics gathered
* during profiling of a parser. * during profiling of a parser.
*
* @since 4.3
*/ */
public class ParseInfo { public class ParseInfo {
protected final ProfilingATNSimulator atnSimulator; 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 * @param fullCtx {@code true} if the evaluation is occurring during LL
* prediction; otherwise, {@code false} if the evaluation is occurring * prediction; otherwise, {@code false} if the evaluation is occurring
* during SLL prediction * during SLL prediction
*
* @since 4.3
*/ */
protected boolean evalSemanticContext(@NotNull SemanticContext pred, ParserRuleContext parserCallStack, int alt, boolean fullCtx) { protected boolean evalSemanticContext(@NotNull SemanticContext pred, ParserRuleContext parserCallStack, int alt, boolean fullCtx) {
return pred.eval(parser, parserCallStack); return pred.eval(parser, parserCallStack);
@ -1922,6 +1924,9 @@ public class ParserATNSimulator extends ATNSimulator {
return mode; return mode;
} }
/**
* @since 4.3
*/
public Parser getParser() { public Parser getParser() {
return parser; return parser;
} }

View File

@ -41,6 +41,8 @@ import org.antlr.v4.runtime.misc.NotNull;
* evaluations which occur during prediction. * evaluations which occur during prediction.
* *
* @see ParserATNSimulator#evalSemanticContext * @see ParserATNSimulator#evalSemanticContext
*
* @since 4.3
*/ */
public class PredicateEvalInfo extends DecisionEventInfo { public class PredicateEvalInfo extends DecisionEventInfo {
/** /**

View File

@ -40,6 +40,9 @@ import org.antlr.v4.runtime.misc.Nullable;
import java.util.BitSet; import java.util.BitSet;
/**
* @since 4.3
*/
public class ProfilingATNSimulator extends ParserATNSimulator { public class ProfilingATNSimulator extends ParserATNSimulator {
protected final DecisionInfo[] decisions; protected final DecisionInfo[] decisions;
protected int numDecisions; 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 * This is the base class for semantic context "operators", which operate on
* a collection of semantic context "operands". * a collection of semantic context "operands".
*
* @since 4.3
*/ */
public static abstract class Operator extends SemanticContext { public static abstract class Operator extends SemanticContext {
/** /**
@ -214,6 +216,8 @@ public abstract class SemanticContext {
* *
* @return a collection of {@link SemanticContext} operands for the * @return a collection of {@link SemanticContext} operands for the
* operator. * operator.
*
* @since 4.3
*/ */
@NotNull @NotNull
public abstract Collection<SemanticContext> getOperands(); public abstract Collection<SemanticContext> getOperands();

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.antlr</groupId> <groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId> <artifactId>antlr4-master</artifactId>
<version>4.2.3-SNAPSHOT</version> <version>4.3-SNAPSHOT</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.antlr</groupId> <groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId> <artifactId>antlr4-master</artifactId>
<version>4.2.3-SNAPSHOT</version> <version>4.3-SNAPSHOT</version>
</parent> </parent>
<artifactId>antlr4</artifactId> <artifactId>antlr4</artifactId>
@ -17,7 +17,7 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.10</version> <version>4.11</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<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. * 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. * This additional method forces all targets 4.3 and beyond to add this method.
*
* @since 4.3
*/ */
public abstract String getVersion(); public abstract String getVersion();
@ -376,14 +378,23 @@ public abstract class Target {
return result; return result;
} }
/**
* @since 4.3
*/
public boolean wantsBaseListener() { public boolean wantsBaseListener() {
return true; return true;
} }
/**
* @since 4.3
*/
public boolean wantsBaseVisitor() { public boolean wantsBaseVisitor() {
return true; return true;
} }
/**
* @since 4.3
*/
public boolean supportsOverloadedMethods() { public boolean supportsOverloadedMethods() {
return true; return true;
} }