Merge branch 'master' into fix-travis-timeouts

This commit is contained in:
Eric Vergnaud 2017-06-28 20:41:32 +08:00
commit c5eb9cbeef
5 changed files with 28 additions and 39 deletions

View File

@ -100,7 +100,7 @@ matrix:
jdk: oraclejdk7 jdk: oraclejdk7
env: TARGET=csharp env: TARGET=csharp
- os: linux - os: linux
jdk: oraclejdk7 jdk: oraclejdk8
dist: trusty dist: trusty
env: TARGET=dotnet env: TARGET=dotnet
- os: linux - os: linux

View File

@ -6,16 +6,5 @@ set -euo pipefail
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update sudo apt-get update
sudo apt-get install dotnet-dev-1.0.3 sudo apt-get install dotnet-dev-1.0.4
# install mvn
wget http://apache.mirrors.lucidnetworks.net/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz && \
wget https://www.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz.md5 && \
echo "$(cat apache-maven-3.3.9-bin.tar.gz.md5) apache-maven-3.3.9-bin.tar.gz" > apache-maven-3.3.9-bin.tar.gz.md5 && \
md5sum -c *.md5
sudo rm -rf /usr/local/maven/ && sudo mkdir -p /usr/local/maven && \
sudo tar xzvf apache-maven-3.3.9-bin.tar.gz -C /usr/local/maven --strip-components=1
mvn -v

View File

@ -12,10 +12,10 @@ ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
# download dotnet core # download dotnet core
curl https://download.microsoft.com/download/1/1/4/114223DE-0AD6-4B8A-A8FB-164E5862AF6E/dotnet-dev-osx-x64.1.0.3.pkg -o /tmp/dotnet-dev-osx-x64.1.0.3.pkg curl https://download.microsoft.com/download/B/9/F/B9F1AF57-C14A-4670-9973-CDF47209B5BF/dotnet-dev-osx-x64.1.0.4.pkg -o /tmp/dotnet-dev-osx-x64.1.0.4.pkg
# install dotnet core # install dotnet core
sudo installer -pkg /tmp/dotnet-dev-osx-x64.1.0.3.pkg -target / sudo installer -pkg /tmp/dotnet-dev-osx-x64.1.0.4.pkg -target /
# make the link # make the link
ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/ ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/

View File

@ -167,16 +167,16 @@ class <parser.name> ( <if(superClass)><superClass><else>Parser<endif> ):
dumpActions(recog, argFuncs, actionFuncs, sempredFuncs) ::= << dumpActions(recog, argFuncs, actionFuncs, sempredFuncs) ::= <<
<if(actionFuncs)> <if(actionFuncs)>
def action(self, localctx, ruleIndex, actionIndex): def action(self, localctx, ruleIndex, actionIndex):
if self._actions is None: if self._actions is None:
actions = dict() actions = dict()
<recog.actionFuncs.values:{f| <recog.actionFuncs.values:{f|
actions[<f.ruleIndex>] = self.<f.name>_action }; separator="\n"> actions[<f.ruleIndex>] = self.<f.name>_action }; separator="\n">
self._actions = actions self._actions = actions
action = self._actions.get(ruleIndex, None) action = self._actions.get(ruleIndex, None)
if action is not None: if action is not None:
action(localctx, actionIndex) action(localctx, actionIndex)
else: else:
raise Exception("No registered action for:" + str(ruleIndex)) raise Exception("No registered action for:" + str(ruleIndex))
<actionFuncs.values; separator="\n"> <actionFuncs.values; separator="\n">
@ -518,7 +518,7 @@ if not <chunks>:
ExceptionClause(e, catchArg, catchAction) ::= << ExceptionClause(e, catchArg, catchAction) ::= <<
catch (<catchArg>) { catch (<catchArg>) {
<catchAction> <catchAction>
} }
>> >>
@ -623,7 +623,7 @@ def <r.name>(self, i=None):
LexerRuleContext() ::= "RuleContext" LexerRuleContext() ::= "RuleContext"
/** The rule context name is the rule followed by a suffix; e.g., /** The rule context name is the rule followed by a suffix; e.g.,
* r becomes rContext. * r becomes rContext.
*/ */
RuleContextNameSuffix() ::= "Context" RuleContextNameSuffix() ::= "Context"
@ -806,7 +806,7 @@ def serializedATN():
>> >>
/** Using a type to init value map, try to init a type; if not in table /** Using a type to init value map, try to init a type; if not in table
* must be an object, default value is "null". * must be an object, default value is "null".
*/ */
initValue(typeName) ::= << initValue(typeName) ::= <<
<javaTypeInitMap.(typeName)> <javaTypeInitMap.(typeName)>

View File

@ -176,16 +176,16 @@ class <parser.name> ( <if(superClass)><superClass><else>Parser<endif> ):
dumpActions(recog, argFuncs, actionFuncs, sempredFuncs) ::= << dumpActions(recog, argFuncs, actionFuncs, sempredFuncs) ::= <<
<if(actionFuncs)> <if(actionFuncs)>
def action(self, localctx:RuleContext, ruleIndex:int, actionIndex:int): def action(self, localctx:RuleContext, ruleIndex:int, actionIndex:int):
if self._actions is None: if self._actions is None:
actions = dict() actions = dict()
<recog.actionFuncs.values:{f| <recog.actionFuncs.values:{f|
actions[<f.ruleIndex>] = self.<f.name>_action }; separator="\n"> actions[<f.ruleIndex>] = self.<f.name>_action }; separator="\n">
self._actions = actions self._actions = actions
action = self._actions.get(ruleIndex, None) action = self._actions.get(ruleIndex, None)
if action is not None: if action is not None:
action(localctx, actionIndex) action(localctx, actionIndex)
else: else:
raise Exception("No registered action for:" + str(ruleIndex)) raise Exception("No registered action for:" + str(ruleIndex))
<actionFuncs.values; separator="\n"> <actionFuncs.values; separator="\n">
@ -527,7 +527,7 @@ if not <chunks>:
ExceptionClause(e, catchArg, catchAction) ::= << ExceptionClause(e, catchArg, catchAction) ::= <<
catch (<catchArg>) { catch (<catchArg>) {
<catchAction> <catchAction>
} }
>> >>
@ -632,7 +632,7 @@ def <r.name>(self, i:int=None):
LexerRuleContext() ::= "RuleContext" LexerRuleContext() ::= "RuleContext"
/** The rule context name is the rule followed by a suffix; e.g., /** The rule context name is the rule followed by a suffix; e.g.,
* r becomes rContext. * r becomes rContext.
*/ */
RuleContextNameSuffix() ::= "Context" RuleContextNameSuffix() ::= "Context"
@ -813,7 +813,7 @@ def serializedATN():
>> >>
/** Using a type to init value map, try to init a type; if not in table /** Using a type to init value map, try to init a type; if not in table
* must be an object, default value is "null". * must be an object, default value is "null".
*/ */
initValue(typeName) ::= << initValue(typeName) ::= <<
<javaTypeInitMap.(typeName)> <javaTypeInitMap.(typeName)>