1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-11-06 08:39:09 +02:00

add CaseChangingStream

This commit is contained in:
Владимир Фетисов
2019-10-09 20:45:53 +03:00
parent 09a7c584eb
commit 56c840228d
3 changed files with 28 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ package parser
import (
"github.com/MontFerret/ferret/pkg/parser/fql"
resources "github.com/antlr/antlr4/doc/resources"
"github.com/antlr/antlr4/runtime/Go/antlr"
)
@@ -12,7 +13,9 @@ type Parser struct {
func New(query string) *Parser {
input := antlr.NewInputStream(query)
lexer := fql.NewFqlLexer(input)
upper := resources.NewCaseChangingStream(input, true)
lexer := fql.NewFqlLexer(upper)
stream := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel)
p := fql.NewFqlParser(stream)