Merge branch 'master_upstream'

This commit is contained in:
Mike Lischke 2016-11-07 11:19:12 +01:00
commit 92b032820e
29 changed files with 129 additions and 107 deletions

View File

@ -16,7 +16,7 @@ Output() ::= <<
>> >>
Errors() ::= << Errors() ::= <<
line 1:2 mismatched input '~FORCE_ERROR~' expecting ')'<\n> line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}<\n>
>> >>
grammar(grammarName) ::= << grammar(grammarName) ::= <<

View File

@ -2,7 +2,6 @@
package org.antlr.v4.test.runtime.csharp; package org.antlr.v4.test.runtime.csharp;
import org.junit.Test; import org.junit.Test;
import org.junit.Ignore;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class TestParserErrors extends BaseTest { public class TestParserErrors extends BaseTest {
@ -551,7 +550,7 @@ public class TestParserErrors extends BaseTest {
String found = execParser("T.g4", grammar, "TParser", "TLexer", "stat", input, false); String found = execParser("T.g4", grammar, "TParser", "TLexer", "stat", input, false);
assertEquals("", found); assertEquals("", found);
assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting ')'\n", this.stderrDuringParse); assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}\n", this.stderrDuringParse);
} }

View File

@ -1,10 +1,10 @@
/* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */ /* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */
package org.antlr.v4.test.runtime.go; package org.antlr.v4.test.runtime.go;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
public class TestParserErrors extends BaseTest { public class TestParserErrors extends BaseTest {
@ -585,7 +585,7 @@ public class TestParserErrors extends BaseTest {
"TListener", "TVisitor", "stat", input, false); "TListener", "TVisitor", "stat", input, false);
assertEquals("", found); assertEquals("", found);
assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting ')'\n", this.stderrDuringParse); assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}\n", this.stderrDuringParse);
} }

View File

@ -1,10 +1,10 @@
/* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */ /* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */
package org.antlr.v4.test.runtime.java; package org.antlr.v4.test.runtime.java;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
public class TestParserErrors extends BaseTest { public class TestParserErrors extends BaseTest {
@ -679,7 +679,7 @@ public class TestParserErrors extends BaseTest {
String found = execParser("T.g4", grammar, "TParser", "TLexer", "stat", input, false); String found = execParser("T.g4", grammar, "TParser", "TLexer", "stat", input, false);
assertEquals("", found); assertEquals("", found);
assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting ')'\n", this.stderrDuringParse); assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}\n", this.stderrDuringParse);
} }

View File

@ -1,10 +1,10 @@
/* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */ /* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */
package org.antlr.v4.test.runtime.javascript.node; package org.antlr.v4.test.runtime.javascript.node;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class TestParserErrors extends BaseTest { public class TestParserErrors extends BaseTest {
@ -617,7 +617,7 @@ public class TestParserErrors extends BaseTest {
"stat", input, false); "stat", input, false);
assertEquals("", found); assertEquals("", found);
assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting ')'\n", this.stderrDuringParse); assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}\n", this.stderrDuringParse);
} }

View File

@ -1,9 +1,10 @@
/* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */ /* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */
package org.antlr.v4.test.runtime.python2; package org.antlr.v4.test.runtime.python2;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class TestParserErrors extends BasePython2Test { public class TestParserErrors extends BasePython2Test {
@ -710,7 +711,7 @@ public class TestParserErrors extends BasePython2Test {
assertEquals("", found); assertEquals("", found);
assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting ')'\n", this.stderrDuringParse); assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}\n", this.stderrDuringParse);
} }

View File

@ -1,9 +1,10 @@
/* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */ /* This file is generated by TestGenerator, any edits will be overwritten by the next generation. */
package org.antlr.v4.test.runtime.python3; package org.antlr.v4.test.runtime.python3;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class TestParserErrors extends BasePython3Test { public class TestParserErrors extends BasePython3Test {
@ -710,7 +711,7 @@ public class TestParserErrors extends BasePython3Test {
assertEquals("", found); assertEquals("", found);
assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting ')'\n", this.stderrDuringParse); assertEquals("line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}\n", this.stderrDuringParse);
} }

View File

@ -45,7 +45,7 @@ var tokenTypeMapCache = make(map[string]int)
var ruleIndexMapCache = make(map[string]int) var ruleIndexMapCache = make(map[string]int)
func (b *BaseRecognizer) checkVersion(toolVersion string) { func (b *BaseRecognizer) checkVersion(toolVersion string) {
runtimeVersion := "4.5.2" runtimeVersion := "4.6"
if runtimeVersion != toolVersion { if runtimeVersion != toolVersion {
fmt.Println("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion) fmt.Println("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion)
} }

View File

@ -91,7 +91,7 @@ public class RuntimeMetaData {
* omitted.</li> * omitted.</li>
* </ul> * </ul>
*/ */
public static final String VERSION = "4.5.3"; public static final String VERSION = "4.6";
/** /**
* Gets the currently executing version of the ANTLR 4 runtime library. * Gets the currently executing version of the ANTLR 4 runtime library.

View File

@ -45,7 +45,7 @@ Recognizer.ruleIndexMapCache = {};
Recognizer.prototype.checkVersion = function(toolVersion) { Recognizer.prototype.checkVersion = function(toolVersion) {
var runtimeVersion = "4.5.3"; var runtimeVersion = "4.6";
if (runtimeVersion!==toolVersion) { if (runtimeVersion!==toolVersion) {
console.log("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion); console.log("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion);
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "antlr4", "name": "antlr4",
"version": "4.5.3", "version": "4.6",
"description": "JavaScript runtime for ANTLR4", "description": "JavaScript runtime for ANTLR4",
"main": "src/antlr4/index.js", "main": "src/antlr4/index.js",
"repository": "antlr/antlr4.git", "repository": "antlr/antlr4.git",

View File

@ -2,12 +2,12 @@ from distutils.core import setup
setup( setup(
name='antlr4-python2-runtime', name='antlr4-python2-runtime',
version='4.5.3', version='4.6',
packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'], packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'],
package_dir={'': 'src'}, package_dir={'': 'src'},
url='http://www.antlr.org', url='http://www.antlr.org',
license='BSD', license='BSD',
author='Eric Vergnaud, Terence Parr, Sam Harwell', author='Eric Vergnaud, Terence Parr, Sam Harwell',
author_email='eric.vergnaud@wanadoo.fr', author_email='eric.vergnaud@wanadoo.fr',
description='ANTLR 4.5.3 runtime for Python 2.7.6' description='ANTLR 4.6 runtime for Python 2.7.6'
) )

View File

@ -55,7 +55,7 @@ class Recognizer(object):
return major, minor return major, minor
def checkVersion(self, toolVersion): def checkVersion(self, toolVersion):
runtimeVersion = "4.5.3" runtimeVersion = "4.6"
rvmajor, rvminor = self.extractVersion(runtimeVersion) rvmajor, rvminor = self.extractVersion(runtimeVersion)
tvmajor, tvminor = self.extractVersion(toolVersion) tvmajor, tvminor = self.extractVersion(toolVersion)
if rvmajor!=tvmajor or rvminor!=tvminor: if rvmajor!=tvmajor or rvminor!=tvminor:

View File

@ -2,12 +2,12 @@ from distutils.core import setup
setup( setup(
name='antlr4-python3-runtime', name='antlr4-python3-runtime',
version='4.5.3', version='4.6',
packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'], packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'],
package_dir={'': 'src'}, package_dir={'': 'src'},
url='http://www.antlr.org', url='http://www.antlr.org',
license='BSD', license='BSD',
author='Eric Vergnaud, Terence Parr, Sam Harwell', author='Eric Vergnaud, Terence Parr, Sam Harwell',
author_email='eric.vergnaud@wanadoo.fr', author_email='eric.vergnaud@wanadoo.fr',
description='ANTLR 4.5.3 runtime for Python 3.4.0' description='ANTLR 4.6 runtime for Python 3.4.0'
) )

View File

@ -58,7 +58,7 @@ class Recognizer(object):
return major, minor return major, minor
def checkVersion(self, toolVersion): def checkVersion(self, toolVersion):
runtimeVersion = "4.5.3" runtimeVersion = "4.6"
rvmajor, rvminor = self.extractVersion(runtimeVersion) rvmajor, rvminor = self.extractVersion(runtimeVersion)
tvmajor, tvminor = self.extractVersion(toolVersion) tvmajor, tvminor = self.extractVersion(toolVersion)
if rvmajor!=tvmajor or rvminor!=tvminor: if rvmajor!=tvmajor or rvminor!=tvminor:

View File

@ -42,20 +42,19 @@
# <p> # <p>
# Whitespace is not allowed.</p> # Whitespace is not allowed.</p>
# #
from xmlrpc.client import boolean from antlr4 import CommonTokenStream, DFA, PredictionContextCache, Lexer, LexerATNSimulator
from antlr4 import CommonTokenStream, DFA, PredictionContextCache, Lexer, LexerATNSimulator, ParserRuleContext, TerminalNode
from antlr4.InputStream import InputStream from antlr4.InputStream import InputStream
from antlr4.Parser import Parser from antlr4.Parser import Parser
from antlr4.RuleContext import RuleContext from antlr4.RuleContext import RuleContext
from antlr4.Token import Token from antlr4.Token import Token
from antlr4.atn.ATNDeserializer import ATNDeserializer
from antlr4.error.ErrorListener import ErrorListener from antlr4.error.ErrorListener import ErrorListener
from antlr4.error.Errors import LexerNoViableAltException from antlr4.error.Errors import LexerNoViableAltException
from antlr4.tree.Tree import ParseTree from antlr4.tree.Tree import ParseTree
from antlr4.tree.Trees import Trees from antlr4.tree.Trees import Trees
from antlr4.atn.ATNDeserializer import ATNDeserializer
from io import StringIO from io import StringIO
def serializedATN(): def serializedATN():
with StringIO() as buf: with StringIO() as buf:
buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\n") buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\n")
@ -115,7 +114,7 @@ class XPathLexer(Lexer):
def __init__(self, input=None): def __init__(self, input=None):
super().__init__(input) super().__init__(input)
self.checkVersion("4.5") self.checkVersion("4.6")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None self._actions = None
self._predicates = None self._predicates = None

View File

@ -792,7 +792,7 @@ class CLexer(Lexer):
def __init__(self, input=None): def __init__(self, input=None):
super().__init__(input) super().__init__(input)
self.checkVersion("4.5.1") self.checkVersion("4.6")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None self._actions = None
self._predicates = None self._predicates = None

View File

@ -915,7 +915,7 @@ class CParser ( Parser ):
def __init__(self, input:TokenStream): def __init__(self, input:TokenStream):
super().__init__(input) super().__init__(input)
self.checkVersion("4.5.1") self.checkVersion("4.6")
self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
self._predicates = None self._predicates = None

View File

@ -537,6 +537,7 @@ CodeBlockForAlt(currentAltCodeBlock, locals, preamble, ops) ::= <<
LL1AltBlock(choice, preamble, alts, error) ::= << LL1AltBlock(choice, preamble, alts, error) ::= <<
State = <choice.stateNumber>; State = <choice.stateNumber>;
ErrorHandler.Sync(this);
<if(choice.label)><labelref(choice.label)> = TokenStream.Lt(1);<endif> <if(choice.label)><labelref(choice.label)> = TokenStream.Lt(1);<endif>
<preamble; separator="\n"> <preamble; separator="\n">
switch (TokenStream.La(1)) { switch (TokenStream.La(1)) {
@ -550,6 +551,7 @@ default:
LL1OptionalBlock(choice, alts, error) ::= << LL1OptionalBlock(choice, alts, error) ::= <<
State = <choice.stateNumber>; State = <choice.stateNumber>;
ErrorHandler.Sync(this);
switch (TokenStream.La(1)) { switch (TokenStream.La(1)) {
<choice.altLook,alts:{look,alt| <cases(ttypes=look)> <choice.altLook,alts:{look,alt| <cases(ttypes=look)>
<alt> <alt>
@ -561,6 +563,7 @@ default:
LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= << LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
State = <choice.stateNumber>; State = <choice.stateNumber>;
ErrorHandler.Sync(this);
<preamble; separator="\n"> <preamble; separator="\n">
if (<expr>) { if (<expr>) {
<alts; separator="\n"> <alts; separator="\n">

View File

@ -519,6 +519,7 @@ CodeBlockForAlt(currentAltCodeBlock, locals, preamble, ops) ::= <<
LL1AltBlock(choice, preamble, alts, error) ::= << LL1AltBlock(choice, preamble, alts, error) ::= <<
p.SetState(<choice.stateNumber>) p.SetState(<choice.stateNumber>)
p.GetErrorHandler().Sync(p)
<if(choice.label)> <if(choice.label)>
<labelref(choice.label)> = p.GetTokenStream().LT(1) <labelref(choice.label)> = p.GetTokenStream().LT(1)
<endif> <endif>
@ -544,6 +545,7 @@ default:
LL1OptionalBlock(choice, alts, error) ::= << LL1OptionalBlock(choice, alts, error) ::= <<
p.SetState(<choice.stateNumber>) p.SetState(<choice.stateNumber>)
p.GetErrorHandler().Sync(p)
switch p.GetTokenStream().LA(1) { switch p.GetTokenStream().LA(1) {
<if(choice.altLook && alts)> <if(choice.altLook && alts)>
@ -561,6 +563,11 @@ default:
LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= << LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
p.SetState(<choice.stateNumber>) p.SetState(<choice.stateNumber>)
<! TODO: this should not consume anything but does I think;
See TokenMismatch2 test, which fails w/o this sync.
But, see TestLeftRecursion.testJavaExpressions_10, 11 which fails with sync()
!>
p.GetErrorHandler().Sync(p)
<if(preamble)> <if(preamble)>
<preamble; separator="\n"> <preamble; separator="\n">

View File

@ -469,6 +469,7 @@ CodeBlockForAlt(currentAltCodeBlock, locals, preamble, ops) ::= <<
LL1AltBlock(choice, preamble, alts, error) ::= << LL1AltBlock(choice, preamble, alts, error) ::= <<
setState(<choice.stateNumber>); setState(<choice.stateNumber>);
_errHandler.sync(this);
<if(choice.label)><labelref(choice.label)> = _input.LT(1);<endif> <if(choice.label)><labelref(choice.label)> = _input.LT(1);<endif>
<preamble; separator="\n"> <preamble; separator="\n">
switch (_input.LA(1)) { switch (_input.LA(1)) {
@ -482,6 +483,7 @@ default:
LL1OptionalBlock(choice, alts, error) ::= << LL1OptionalBlock(choice, alts, error) ::= <<
setState(<choice.stateNumber>); setState(<choice.stateNumber>);
_errHandler.sync(this);
switch (_input.LA(1)) { switch (_input.LA(1)) {
<choice.altLook,alts:{look,alt| <cases(ttypes=look)> <choice.altLook,alts:{look,alt| <cases(ttypes=look)>
<alt> <alt>
@ -493,6 +495,7 @@ default:
LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= << LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
setState(<choice.stateNumber>); setState(<choice.stateNumber>);
_errHandler.sync(this);
<preamble; separator="\n"> <preamble; separator="\n">
if (<expr>) { if (<expr>) {
<alts; separator="\n"> <alts; separator="\n">

View File

@ -340,6 +340,7 @@ CodeBlockForAlt(currentAltCodeBlock, locals, preamble, ops) ::= <<
LL1AltBlock(choice, preamble, alts, error) ::= << LL1AltBlock(choice, preamble, alts, error) ::= <<
this.state = <choice.stateNumber>; this.state = <choice.stateNumber>;
this._errHandler.sync(this);
<if(choice.label)><labelref(choice.label)> = this._input.LT(1);<endif> <if(choice.label)><labelref(choice.label)> = this._input.LT(1);<endif>
<preamble; separator="\n"> <preamble; separator="\n">
switch(this._input.LA(1)) { switch(this._input.LA(1)) {
@ -353,6 +354,7 @@ default:
LL1OptionalBlock(choice, alts, error) ::= << LL1OptionalBlock(choice, alts, error) ::= <<
this.state = <choice.stateNumber>; this.state = <choice.stateNumber>;
this._errHandler.sync(this);
switch (this._input.LA(1)) { switch (this._input.LA(1)) {
<choice.altLook,alts:{look,alt| <cases(ttypes=look)> <choice.altLook,alts:{look,alt| <cases(ttypes=look)>
<alt> <alt>
@ -364,6 +366,7 @@ default:
LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= << LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
this.state = <choice.stateNumber>; this.state = <choice.stateNumber>;
this._errHandler.sync(this);
<preamble; separator="\n"> <preamble; separator="\n">
if(<expr>) { if(<expr>) {
<alts; separator="\n"> <alts; separator="\n">

View File

@ -314,6 +314,7 @@ CodeBlockForAlt(currentAltCodeBlock, locals, preamble, ops) ::= <<
LL1AltBlock(choice, preamble, alts, error) ::= << LL1AltBlock(choice, preamble, alts, error) ::= <<
self.state = <choice.stateNumber> self.state = <choice.stateNumber>
self._errHandler.sync(self)
<if(choice.label)><labelref(choice.label)> = _input.LT(1)<endif> <if(choice.label)><labelref(choice.label)> = _input.LT(1)<endif>
<preamble; separator="\n"> <preamble; separator="\n">
token = self._input.LA(1) token = self._input.LA(1)
@ -327,6 +328,7 @@ else:
LL1OptionalBlock(choice, alts, error) ::= << LL1OptionalBlock(choice, alts, error) ::= <<
self.state = <choice.stateNumber> self.state = <choice.stateNumber>
self._errHandler.sync(self)
token = self._input.LA(1) token = self._input.LA(1)
<choice.altLook,alts:{look,alt| <cases(ttypes=look)> <choice.altLook,alts:{look,alt| <cases(ttypes=look)>
<alt> <alt>
@ -337,6 +339,7 @@ else:
LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= << LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
self.state = <choice.stateNumber> self.state = <choice.stateNumber>
self._errHandler.sync(self)
<preamble; separator="\n"> <preamble; separator="\n">
if <expr>: if <expr>:
<alts; separator="\n"> <alts; separator="\n">

View File

@ -322,6 +322,7 @@ CodeBlockForAlt(currentAltCodeBlock, locals, preamble, ops) ::= <<
LL1AltBlock(choice, preamble, alts, error) ::= << LL1AltBlock(choice, preamble, alts, error) ::= <<
self.state = <choice.stateNumber> self.state = <choice.stateNumber>
self._errHandler.sync(self)
<if(choice.label)><labelref(choice.label)> = _input.LT(1)<endif> <if(choice.label)><labelref(choice.label)> = _input.LT(1)<endif>
<preamble; separator="\n"> <preamble; separator="\n">
token = self._input.LA(1) token = self._input.LA(1)
@ -335,6 +336,7 @@ else:
LL1OptionalBlock(choice, alts, error) ::= << LL1OptionalBlock(choice, alts, error) ::= <<
self.state = <choice.stateNumber> self.state = <choice.stateNumber>
self._errHandler.sync(self)
token = self._input.LA(1) token = self._input.LA(1)
<choice.altLook,alts:{look,alt| <cases(ttypes=look)> <choice.altLook,alts:{look,alt| <cases(ttypes=look)>
<alt> <alt>
@ -345,6 +347,7 @@ else:
LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= << LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
self.state = <choice.stateNumber> self.state = <choice.stateNumber>
self._errHandler.sync(self)
<preamble; separator="\n"> <preamble; separator="\n">
if <expr>: if <expr>:
<alts; separator="\n"> <alts; separator="\n">

View File

@ -51,7 +51,7 @@ public class CSharpTarget extends Target {
@Override @Override
public String getVersion() { public String getVersion() {
return "4.5.3"; return "4.6";
} }
@Override @Override

View File

@ -54,7 +54,7 @@ public class GoTarget extends Target {
@Override @Override
public String getVersion() { public String getVersion() {
return "4.5.2"; return "4.6";
} }
public Set<String> getBadWords() { public Set<String> getBadWords() {

View File

@ -74,7 +74,7 @@ public class JavaScriptTarget extends Target {
@Override @Override
public String getVersion() { public String getVersion() {
return "4.5.3"; return "4.6";
} }
public Set<String> getBadWords() { public Set<String> getBadWords() {

View File

@ -117,7 +117,7 @@ public class Python2Target extends Target {
@Override @Override
public String getVersion() { public String getVersion() {
return "4.5.3"; return "4.6";
} }
public Set<String> getBadWords() { public Set<String> getBadWords() {

View File

@ -119,7 +119,7 @@ public class Python3Target extends Target {
@Override @Override
public String getVersion() { public String getVersion() {
return "4.5.3"; return "4.6";
} }
/** Avoid grammar symbols in this set to prevent conflicts in gen'd code. */ /** Avoid grammar symbols in this set to prevent conflicts in gen'd code. */