Change generated Go code to import Go runtime from github.com

This commit is contained in:
Will Faught 2016-05-25 20:10:32 -07:00
parent 90ac6c0f63
commit a20b1abb97
1 changed files with 8 additions and 6 deletions

View File

@ -7,10 +7,11 @@ ParserFile(file, parser, namedActions) ::= <<
package parser // <file.grammarName>
import (
"antlr4"
"reflect"
"fmt"
"strconv"
"github.com/pboyer/antlr4/runtime/Go/antlr"
)
// Stopgap to suppress unused import error. We aren't certain
@ -30,7 +31,7 @@ ListenerFile(file, header) ::= <<
<fileHeader(file.grammarFileName, file.ANTLRVersion)>
package parser // <file.grammarName>
import "antlr4"
import "github.com/pboyer/antlr4/runtime/Go/antlr"
// A complete listener for a parse tree produced by <file.parserName>
@ -49,7 +50,7 @@ BaseListenerFile(file, header) ::= <<
<fileHeader(file.grammarFileName, file.ANTLRVersion)>
package parser // <file.grammarName>
import "antlr4"
import "github.com/pboyer/antlr4/runtime/Go/antlr"
// A complete base listener for a parse tree produced by <file.parserName>
@ -77,7 +78,7 @@ VisitorFile(file, header) ::= <<
<fileHeader(file.grammarFileName, file.ANTLRVersion)>
package parser // <file.grammarName>
import "antlr4"
import "github.com/pboyer/antlr4/runtime/Go/antlr"
<header>
@ -97,7 +98,7 @@ BaseVisitorFile(file, header) ::= <<
<fileHeader(file.grammarFileName, file.ANTLRVersion)>
package parser // <file.grammarName>
import "antlr4"
import "github.com/pboyer/antlr4/runtime/Go/antlr"
type Base<file.grammarName>Visitor struct {
*antlr4.BaseParseTreeVisitor
@ -894,8 +895,9 @@ LexerFile(lexerFile, lexer, namedActions) ::= <<
package parser
import (
"antlr4"
"fmt"
"github.com/pboyer/antlr4/runtime/Go/antlr"
)
// suppress unused import error, many tests