Skip to content

Commit

Permalink
Merge pull request #7 from ermites-io/fix_antlr4
Browse files Browse the repository at this point in the history
Update antlr4
  • Loading branch information
eau-u4f authored Oct 13, 2024
2 parents 9e6b548 + c206939 commit 3c7e387
Show file tree
Hide file tree
Showing 10 changed files with 750 additions and 412 deletions.
3 changes: 3 additions & 0 deletions config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pksc.interp
pksc.tokens
pkscLexer.*
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"io/ioutil"

"github.com/antlr/antlr4/runtime/Go/antlr"
"github.com/antlr4-go/antlr/v4"
)

// [name]:Options
Expand Down
6 changes: 3 additions & 3 deletions config/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package config

import (
"fmt"
"github.com/antlr/antlr4/runtime/Go/antlr"

"ermites.io/pkisauce/policy"
"github.com/antlr4-go/antlr/v4"
)

type Parser struct {
Expand All @@ -22,7 +22,7 @@ func (pr *Parser) Config() Config {
return pr.config
}

//func NewParser(key []byte) *Parser {
// func NewParser(key []byte) *Parser {
func NewParser() *Parser {
// random key for the hmac'ing of rules.
return &Parser{
Expand Down Expand Up @@ -106,7 +106,7 @@ func parseNameBlock(nbr IName_blockContext) (names []string, err error) {
return
}

//func parsePassBlock(pbr IPass_blockContext) (rules []*Rule, err error) {
// func parsePassBlock(pbr IPass_blockContext) (rules []*Rule, err error) {
func (pr *Parser) parsePassBlock(pbr IPass_blockContext) (p *policy.Policy, debug bool, err error) {
//var rules []*Rule

Expand Down
2 changes: 1 addition & 1 deletion config/parser_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package config
import (
"fmt"

"github.com/antlr/antlr4/runtime/Go/antlr"
"github.com/antlr4-go/antlr/v4"
)

func (pr *Parser) VisitErrorNode(node antlr.ErrorNode) {
Expand Down
4 changes: 2 additions & 2 deletions config/pksc_base_listener.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

303 changes: 161 additions & 142 deletions config/pksc_lexer.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions config/pksc_listener.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3c7e387

Please sign in to comment.