[#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 483 additions and 382 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

4
go.sum
View file

@ -64,8 +64,8 @@ github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGn
github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521073959-f0d4d129b7f1/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521073959-f0d4d129b7f1/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY=
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 h1:goHVqTbFX3AIo0tzGr14pgfAW2ZfPChKO21Z9MGf/gk= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=

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.