tweak to compile. strange

This commit is contained in:
Terence Parr 2012-11-18 14:59:56 -08:00
parent 3e91065824
commit 44cfedc5e6
1 changed files with 2 additions and 2 deletions

View File

@ -279,7 +279,7 @@ public class GrammarTransformPipeline {
GrammarRootAST combinedAST = combinedGrammar.ast;
//tool.log("grammar", "before="+combinedAST.toStringTree());
GrammarASTAdaptor adaptor = new GrammarASTAdaptor(combinedAST.token.getInputStream());
GrammarAST[] elements = combinedAST.getChildren().toArray(new GrammarAST[0]);
GrammarAST[] elements = (GrammarAST[])combinedAST.getChildren().toArray();
// MAKE A GRAMMAR ROOT and ID
String lexerName = combinedAST.getChild(0).getText()+"Lexer";
@ -295,7 +295,7 @@ public class GrammarTransformPipeline {
if ( optionsRoot!=null ) {
GrammarAST lexerOptionsRoot = (GrammarAST)adaptor.dupNode(optionsRoot);
lexerAST.addChild(lexerOptionsRoot);
GrammarAST[] options = optionsRoot.getChildren().toArray(new GrammarAST[0]);
GrammarAST[] options = (GrammarAST[])optionsRoot.getChildren().toArray();
for (GrammarAST o : options) {
String optionName = o.getChild(0).getText();
if ( Grammar.lexerOptions.contains(optionName) &&