@@ -5,8 +5,8 @@ synchronize_lexer_grammar () {
55 license_header=" $1 "
66 source_file=" $PARENT_DIR /elasticsearch/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4"
77 source_lib_dir=" $PARENT_DIR /elasticsearch/x-pack/plugin/esql/src/main/antlr/lexer"
8- destination_file=" ./src/platform/packages/shared/kbn-esql-ast/src/antlr/esql_lexer.g4"
9- destination_lib_parent_dir=" ./src/platform/packages/shared/kbn-esql-ast/src/antlr"
8+ destination_file=" ./src/platform/packages/shared/kbn-esql-ast/src/parser/ antlr/esql_lexer.g4"
9+ destination_lib_parent_dir=" ./src/platform/packages/shared/kbn-esql-ast/src/parser/ antlr"
1010 destination_lib_dir=" $destination_lib_parent_dir /lexer"
1111
1212
@@ -35,7 +35,7 @@ synchronize_lexer_grammar () {
3535synchronize_promql_lexer_grammar () {
3636 license_header=" $1 "
3737 source_file=" $PARENT_DIR /elasticsearch/x-pack/plugin/esql/src/main/antlr/PromqlBaseLexer.g4"
38- destination_file=" ./src/platform/packages/shared/kbn-esql-ast/src/antlr/promql_lexer.g4"
38+ destination_file=" ./src/platform/packages/shared/kbn-esql-ast/src/parser/ antlr/promql_lexer.g4"
3939
4040 # Copy the file
4141 echo " Copying PromQL base lexer file..."
@@ -59,8 +59,8 @@ synchronize_parser_grammar () {
5959 license_header=" $1 "
6060 source_file=" $PARENT_DIR /elasticsearch/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4"
6161 source_lib_dir=" $PARENT_DIR /elasticsearch/x-pack/plugin/esql/src/main/antlr/parser"
62- destination_file=" ./src/platform/packages/shared/kbn-esql-ast/src/antlr/esql_parser.g4"
63- destination_lib_parent_dir=" ./src/platform/packages/shared/kbn-esql-ast/src/antlr"
62+ destination_file=" ./src/platform/packages/shared/kbn-esql-ast/src/parser/ antlr/esql_parser.g4"
63+ destination_lib_parent_dir=" ./src/platform/packages/shared/kbn-esql-ast/src/parser/ antlr"
6464 destination_lib_dir=" $destination_lib_parent_dir /parser"
6565
6666 # Copy the files
@@ -90,7 +90,7 @@ synchronize_parser_grammar () {
9090synchronize_promql_parser_grammar () {
9191 license_header=" $1 "
9292 source_file=" $PARENT_DIR /elasticsearch/x-pack/plugin/esql/src/main/antlr/PromqlBaseParser.g4"
93- destination_file=" ./src/platform/packages/shared/kbn-esql-ast/src/antlr/promql_parser.g4"
93+ destination_file=" ./src/platform/packages/shared/kbn-esql-ast/src/parser/ antlr/promql_parser.g4"
9494
9595 # Copy the file
9696 echo " Copying PromQL base parser file..."
@@ -142,7 +142,7 @@ main () {
142142 synchronize_promql_parser_grammar " $license_header "
143143
144144 # Check for differences in grammar files
145- antlr_dir=" ./src/platform/packages/shared/kbn-esql-ast/src/antlr"
145+ antlr_dir=" ./src/platform/packages/shared/kbn-esql-ast/src/parser/ antlr"
146146 set +e
147147 git diff --exit-code --quiet \
148148 " $antlr_dir /esql_lexer.g4" \
@@ -192,7 +192,7 @@ main () {
192192
193193 git checkout -b " $BRANCH_NAME "
194194
195- git add src/antlr/*
195+ git add src/parser/ antlr/*
196196 git commit -m " Update ES|QL grammars"
197197
198198 report_main_step " Changes committed. Creating pull request."
0 commit comments