Browse Source

Use custom antlr4 build for visitor pattern

master
champii 1 year ago
parent
commit
228c5a04bf

+ 1
- 1
docs/README.md View File

@@ -29,7 +29,7 @@ See the [Build](/build.md) section for more details
29 29
 
30 30
 Go to the [./lib](https://github.com/champii/og/tree/master/lib) folder on github for both Oglang and compiled Golang sources.  
31 31
 
32
-Built with [Antlr4](https://github.com/antlr/antlr4) from their Golang grammar.
32
+Built with [Antlr4](https://github.com/champii/antlr4) from their Golang grammar.
33 33
 
34 34
 ### Goal
35 35
 ---

+ 1
- 1
lib/common/node.go View File

@@ -1,7 +1,7 @@
1 1
 package common
2 2
 
3 3
 import (
4
-	"github.com/antlr/antlr4/runtime/Go/antlr"
4
+	"github.com/champii/antlr4/runtime/Go/antlr"
5 5
 )
6 6
 
7 7
 type INode interface {

+ 1
- 1
lib/common/node.og View File

@@ -1,7 +1,7 @@
1 1
 !common
2 2
 
3 3
 import
4
-	"github.com/antlr/antlr4/runtime/Go/antlr"
4
+	"github.com/champii/antlr4/runtime/Go/antlr"
5 5
 
6 6
 interface INode
7 7
 	Eval: string

+ 4
- 3
lib/og/parse.go View File

@@ -2,14 +2,15 @@ package og
2 2
 
3 3
 import (
4 4
 	"errors"
5
-	"github.com/antlr/antlr4/runtime/Go/antlr"
5
+	"os"
6
+	"strings"
7
+
8
+	"github.com/champii/antlr4/runtime/Go/antlr"
6 9
 	"github.com/champii/og/lib/ast"
7 10
 	"github.com/champii/og/lib/ast/walker"
8 11
 	"github.com/champii/og/lib/common"
9 12
 	"github.com/champii/og/lib/translator"
10 13
 	"github.com/champii/og/parser"
11
-	"os"
12
-	"strings"
13 14
 )
14 15
 
15 16
 type ErrorHandler struct {

+ 1
- 1
lib/og/parse.og View File

@@ -9,7 +9,7 @@ import
9 9
   "github.com/champii/og/lib/common"
10 10
   "github.com/champii/og/lib/ast/walker"
11 11
   "github.com/champii/og/lib/translator"
12
-  "github.com/antlr/antlr4/runtime/Go/antlr"
12
+  "github.com/champii/antlr4/runtime/Go/antlr"
13 13
 
14 14
 struct ErrorHandler
15 15
   *antlr.DefaultErrorStrategy

+ 3
- 2
lib/translator/translator.go View File

@@ -1,11 +1,12 @@
1 1
 package translator
2 2
 
3 3
 import (
4
-	"github.com/antlr/antlr4/runtime/Go/antlr"
4
+	"strings"
5
+
6
+	"github.com/champii/antlr4/runtime/Go/antlr"
5 7
 	. "github.com/champii/og/lib/ast"
6 8
 	"github.com/champii/og/lib/common"
7 9
 	"github.com/champii/og/parser"
8
-	"strings"
9 10
 )
10 11
 
11 12
 type OgVisitor struct {

+ 1
- 1
lib/translator/translator.og View File

@@ -4,7 +4,7 @@ import
4 4
   strings
5 5
   "github.com/champii/og/lib/ast": .
6 6
   "github.com/champii/og/parser"
7
-  "github.com/antlr/antlr4/runtime/Go/antlr"
7
+  "github.com/champii/antlr4/runtime/Go/antlr"
8 8
   "github.com/champii/og/lib/common"
9 9
 
10 10
 // type Scope map[string]string

+ 1
- 1
parser/og_base_listener.go View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 package parser // Og
4 4
 
5
-import "github.com/antlr/antlr4/runtime/Go/antlr"
5
+import "github.com/champii/antlr4/runtime/Go/antlr"
6 6
 
7 7
 // BaseOgListener is a complete listener for a parse tree produced by OgParser.
8 8
 type BaseOgListener struct{}

+ 1
- 1
parser/og_base_visitor.go View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 package parser // Og
4 4
 
5
-//import "github.com/antlr/antlr4/runtime/Go/antlr"
5
+//import "github.com/champii/antlr4/runtime/Go/antlr"
6 6
 
7 7
 //type OgVisitor struct {
8 8
 //    *antlr.BaseParseTreeVisitor

+ 1
- 1
parser/og_lexer.go View File

@@ -6,7 +6,7 @@ import (
6 6
 	"fmt"
7 7
 	"unicode"
8 8
 
9
-	"github.com/antlr/antlr4/runtime/Go/antlr"
9
+	"github.com/champii/antlr4/runtime/Go/antlr"
10 10
 )
11 11
 
12 12
 // Suppress unused import error

+ 1
- 1
parser/og_listener.go View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 package parser // Og
4 4
 
5
-import "github.com/antlr/antlr4/runtime/Go/antlr"
5
+import "github.com/champii/antlr4/runtime/Go/antlr"
6 6
 
7 7
 // OgListener is a complete listener for a parse tree produced by OgParser.
8 8
 type OgListener interface {

+ 1
- 1
parser/og_parser.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	"strconv"
9 9
 	"strings"
10 10
 
11
-	"github.com/antlr/antlr4/runtime/Go/antlr"
11
+	"github.com/champii/antlr4/runtime/Go/antlr"
12 12
 )
13 13
 
14 14
 // Suppress unused import errors

+ 1
- 1
parser/og_visitor.go View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 package parser // Og
4 4
 
5
-import "github.com/antlr/antlr4/runtime/Go/antlr"
5
+import "github.com/champii/antlr4/runtime/Go/antlr"
6 6
 
7 7
 // A complete Visitor for a parse tree produced by OgParser.
8 8
 type OgVisitor interface {

Loading…
Cancel
Save