Merge branch 'master' of github.com:antlr/antlr4
This commit is contained in:
commit
a072f59a87
|
@ -82,3 +82,4 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2015/10/08, fedotovalex, Alex Fedotov, me@alexfedotov.com
|
||||
2015/10/21, martin-probst, Martin Probst, martin-probst@web.de
|
||||
2015/10/21, hkff, Walid Benghabrit, walid.benghabrit@mines-nantes.fr
|
||||
2015/11/25, abego, Udo Borkowski, ub@abego.org
|
||||
|
|
|
@ -14,7 +14,7 @@ Creating a new target involves the following key elements:
|
|||
## Getting started
|
||||
|
||||
1. Fork the `antlr/antlr4` repository at github to your own user so that you have repository `username/antlr4`.
|
||||
2. Clone `username/antlr4`, forked repository, to your local disk. Your `origin` will be the forked repository and `upstream` will be the original `antlr/antlr4` repository. Changes that you would like to contribute back to the project are done with [pull requests](https://help.github.com/articles/using-pull-requests/).
|
||||
2. Clone `username/antlr4`, forked repository, to your local disk. Your remote `origin` will be the forked repository on GitHub. Add a remote `upstream` to the original `antlr/antlr4` repository (URL `https://github.com/antlr/antlr4.git`). Changes that you would like to contribute back to the project are done with [pull requests](https://help.github.com/articles/using-pull-requests/).
|
||||
3. Try to build it before doing anything
|
||||
```bash
|
||||
$ mvn compile
|
||||
|
|
|
@ -158,8 +158,10 @@ public class ActionTranslator implements ActionSplitterListener {
|
|||
translator.rf = rf;
|
||||
factory.getGrammar().tool.log("action-translator", "translate " + action);
|
||||
String altLabel = node.getAltLabel();
|
||||
if ( rf!=null ) translator.nodeContext = rf.ruleCtx;
|
||||
if ( altLabel!=null ) translator.nodeContext = rf.altLabelCtxs.get(altLabel);
|
||||
if ( rf!=null ) {
|
||||
translator.nodeContext = rf.ruleCtx;
|
||||
if ( altLabel!=null ) translator.nodeContext = rf.altLabelCtxs.get(altLabel);
|
||||
}
|
||||
ANTLRStringStream in = new ANTLRStringStream(action);
|
||||
in.setLine(tokenWithinAction.getLine());
|
||||
in.setCharPositionInLine(tokenWithinAction.getCharPositionInLine());
|
||||
|
|
|
@ -172,9 +172,6 @@ public class TestRig {
|
|||
if ( !startRuleName.equals(LEXER_START_RULE_NAME) ) {
|
||||
String parserName = grammarName+"Parser";
|
||||
parserClass = cl.loadClass(parserName).asSubclass(Parser.class);
|
||||
if ( parserClass==null ) {
|
||||
System.err.println("Can't load "+parserName);
|
||||
}
|
||||
Constructor<? extends Parser> parserCtor = parserClass.getConstructor(TokenStream.class);
|
||||
parser = parserCtor.newInstance((TokenStream)null);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue