[#75] Update antlr4 version to 4.13.0

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-06-01 10:26:07 +03:00 committed by Evgenii Stratonikov
parent e6b662cfa6
commit 0f7455ff7a
7 changed files with 481 additions and 380 deletions

2
go.mod
View file

@ -7,7 +7,7 @@ require (
git.frostfs.info/TrueCloudLab/frostfs-contract v0.0.0-20230307110621-19a8ef2d02fb git.frostfs.info/TrueCloudLab/frostfs-contract v0.0.0-20230307110621-19a8ef2d02fb
git.frostfs.info/TrueCloudLab/hrw v1.2.0 git.frostfs.info/TrueCloudLab/hrw v1.2.0
git.frostfs.info/TrueCloudLab/tzhash v1.8.0 git.frostfs.info/TrueCloudLab/tzhash v1.8.0
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 github.com/antlr4-go/antlr/v4 v4.13.0
github.com/google/uuid v1.3.0 github.com/google/uuid v1.3.0
github.com/hashicorp/golang-lru/v2 v2.0.2 github.com/hashicorp/golang-lru/v2 v2.0.2
github.com/mr-tron/base58 v1.2.0 github.com/mr-tron/base58 v1.2.0

BIN
go.sum

Binary file not shown.

View file

@ -1,8 +1,8 @@
// Code generated from Query.g4 by ANTLR 4.12.0. DO NOT EDIT. // Code generated from /work/netmap/parser/Query.g4 by ANTLR 4.13.0. DO NOT EDIT.
package parser // Query package parser // Query
import "github.com/antlr/antlr4/runtime/Go/antlr/v4" import "github.com/antlr4-go/antlr/v4"
type BaseQueryVisitor struct { type BaseQueryVisitor struct {
*antlr.BaseParseTreeVisitor *antlr.BaseParseTreeVisitor

View file

@ -1,13 +1,12 @@
// Code generated from QueryLexer.g4 by ANTLR 4.12.0. DO NOT EDIT. // Code generated from /work/netmap/parser/QueryLexer.g4 by ANTLR 4.13.0. DO NOT EDIT.
package parser package parser
import ( import (
"fmt" "fmt"
"github.com/antlr4-go/antlr/v4"
"sync" "sync"
"unicode" "unicode"
"github.com/antlr/antlr4/runtime/Go/antlr/v4"
) )
// Suppress unused import error // Suppress unused import error
@ -22,45 +21,45 @@ type QueryLexer struct {
// TODO: EOF string // TODO: EOF string
} }
var querylexerLexerStaticData struct { var QueryLexerLexerStaticData struct {
once sync.Once once sync.Once
serializedATN []int32 serializedATN []int32
channelNames []string ChannelNames []string
modeNames []string ModeNames []string
literalNames []string LiteralNames []string
symbolicNames []string SymbolicNames []string
ruleNames []string RuleNames []string
predictionContextCache *antlr.PredictionContextCache PredictionContextCache *antlr.PredictionContextCache
atn *antlr.ATN atn *antlr.ATN
decisionToDFA []*antlr.DFA decisionToDFA []*antlr.DFA
} }
func querylexerLexerInit() { func querylexerLexerInit() {
staticData := &querylexerLexerStaticData staticData := &QueryLexerLexerStaticData
staticData.channelNames = []string{ staticData.ChannelNames = []string{
"DEFAULT_TOKEN_CHANNEL", "HIDDEN", "DEFAULT_TOKEN_CHANNEL", "HIDDEN",
} }
staticData.modeNames = []string{ staticData.ModeNames = []string{
"DEFAULT_MODE", "DEFAULT_MODE",
} }
staticData.literalNames = []string{ staticData.LiteralNames = []string{
"", "'AND'", "'OR'", "", "'REP'", "'IN'", "'AS'", "'CBF'", "'SELECT'", "", "'AND'", "'OR'", "", "'REP'", "'IN'", "'AS'", "'CBF'", "'SELECT'",
"'FROM'", "'FILTER'", "'*'", "'SAME'", "'DISTINCT'", "'('", "')'", "'@'", "'FROM'", "'FILTER'", "'*'", "'SAME'", "'DISTINCT'", "'('", "')'", "'@'",
"", "", "'0'", "", "", "'0'",
} }
staticData.symbolicNames = []string{ staticData.SymbolicNames = []string{
"", "AND_OP", "OR_OP", "SIMPLE_OP", "REP", "IN", "AS", "CBF", "SELECT", "", "AND_OP", "OR_OP", "SIMPLE_OP", "REP", "IN", "AS", "CBF", "SELECT",
"FROM", "FILTER", "WILDCARD", "CLAUSE_SAME", "CLAUSE_DISTINCT", "L_PAREN", "FROM", "FILTER", "WILDCARD", "CLAUSE_SAME", "CLAUSE_DISTINCT", "L_PAREN",
"R_PAREN", "AT", "IDENT", "NUMBER1", "ZERO", "STRING", "WS", "R_PAREN", "AT", "IDENT", "NUMBER1", "ZERO", "STRING", "WS",
} }
staticData.ruleNames = []string{ staticData.RuleNames = []string{
"AND_OP", "OR_OP", "SIMPLE_OP", "REP", "IN", "AS", "CBF", "SELECT", "AND_OP", "OR_OP", "SIMPLE_OP", "REP", "IN", "AS", "CBF", "SELECT",
"FROM", "FILTER", "WILDCARD", "CLAUSE_SAME", "CLAUSE_DISTINCT", "L_PAREN", "FROM", "FILTER", "WILDCARD", "CLAUSE_SAME", "CLAUSE_DISTINCT", "L_PAREN",
"R_PAREN", "AT", "IDENT", "Digit", "Nondigit", "NUMBER1", "ZERO", "STRING", "R_PAREN", "AT", "IDENT", "Digit", "Nondigit", "NUMBER1", "ZERO", "STRING",
"ESC", "UNICODE", "HEX", "SAFECODEPOINTSINGLE", "SAFECODEPOINTDOUBLE", "ESC", "UNICODE", "HEX", "SAFECODEPOINTSINGLE", "SAFECODEPOINTDOUBLE",
"WS", "WS",
} }
staticData.predictionContextCache = antlr.NewPredictionContextCache() staticData.PredictionContextCache = antlr.NewPredictionContextCache()
staticData.serializedATN = []int32{ staticData.serializedATN = []int32{
4, 0, 21, 198, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 0, 21, 198, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2,
4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2,
@ -166,7 +165,7 @@ func querylexerLexerInit() {
// NewQueryLexer(). You can call this function if you wish to initialize the static state ahead // NewQueryLexer(). You can call this function if you wish to initialize the static state ahead
// of time. // of time.
func QueryLexerInit() { func QueryLexerInit() {
staticData := &querylexerLexerStaticData staticData := &QueryLexerLexerStaticData
staticData.once.Do(querylexerLexerInit) staticData.once.Do(querylexerLexerInit)
} }
@ -175,13 +174,13 @@ func NewQueryLexer(input antlr.CharStream) *QueryLexer {
QueryLexerInit() QueryLexerInit()
l := new(QueryLexer) l := new(QueryLexer)
l.BaseLexer = antlr.NewBaseLexer(input) l.BaseLexer = antlr.NewBaseLexer(input)
staticData := &querylexerLexerStaticData staticData := &QueryLexerLexerStaticData
l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.predictionContextCache) l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache)
l.channelNames = staticData.channelNames l.channelNames = staticData.ChannelNames
l.modeNames = staticData.modeNames l.modeNames = staticData.ModeNames
l.RuleNames = staticData.ruleNames l.RuleNames = staticData.RuleNames
l.LiteralNames = staticData.literalNames l.LiteralNames = staticData.LiteralNames
l.SymbolicNames = staticData.symbolicNames l.SymbolicNames = staticData.SymbolicNames
l.GrammarFileName = "QueryLexer.g4" l.GrammarFileName = "QueryLexer.g4"
// TODO: l.EOF = antlr.TokenEOF // TODO: l.EOF = antlr.TokenEOF

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
// Code generated from Query.g4 by ANTLR 4.12.0. DO NOT EDIT. // Code generated from /work/netmap/parser/Query.g4 by ANTLR 4.13.0. DO NOT EDIT.
package parser // Query package parser // Query
import "github.com/antlr/antlr4/runtime/Go/antlr/v4" import "github.com/antlr4-go/antlr/v4"
// A complete Visitor for a parse tree produced by Query. // A complete Visitor for a parse tree produced by Query.
type QueryVisitor interface { type QueryVisitor interface {

View file

@ -9,7 +9,7 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap" "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/netmap/parser" "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/netmap/parser"
"github.com/antlr/antlr4/runtime/Go/antlr/v4" "github.com/antlr4-go/antlr/v4"
) )
// PlacementPolicy declares policy to store objects in the FrostFS container. // PlacementPolicy declares policy to store objects in the FrostFS container.