Skip to content

Commit 612dbcc

Browse files
committed
Reranker grammar.
1 parent 091ea9a commit 612dbcc

File tree

12 files changed

+2786
-2483
lines changed

12 files changed

+2786
-2483
lines changed

x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ DEV_INLINESTATS : {this.isDevVersion()}? 'inlinestats' -> pushMode(EXPRESSION
9090
DEV_INSIST : {this.isDevVersion()}? 'insist_🐔' -> pushMode(PROJECT_MODE);
9191
DEV_LOOKUP : {this.isDevVersion()}? 'lookup_🐔' -> pushMode(LOOKUP_MODE);
9292
DEV_METRICS : {this.isDevVersion()}? 'metrics' -> pushMode(METRICS_MODE);
93+
DEV_RERANK : {this.isDevVersion()}? 'rerank' -> pushMode(EXPRESSION_MODE);
9394
// list of all JOIN commands
9495
DEV_JOIN_FULL : {this.isDevVersion()}? 'full' -> pushMode(JOIN_MODE);
9596
DEV_JOIN_LEFT : {this.isDevVersion()}? 'left' -> pushMode(JOIN_MODE);
@@ -180,6 +181,9 @@ DECIMAL_LITERAL
180181
;
181182

182183
BY : 'by';
184+
ON: 'on';
185+
WITH: 'with';
186+
AS: 'as';
183187

184188
AND : 'and';
185189
ASC : 'asc';
@@ -359,7 +363,7 @@ RENAME_DOT: DOT -> type(DOT);
359363
RENAME_PARAM : PARAM -> type(PARAM);
360364
RENAME_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
361365
362-
AS : 'as';
366+
RENAME_AS : AS -> type(AS);
363367
364368
RENAME_ID_PATTERN
365369
: ID_PATTERN -> type(ID_PATTERN)
@@ -382,8 +386,8 @@ mode ENRICH_MODE;
382386
ENRICH_PIPE : PIPE -> type(PIPE), popMode;
383387
ENRICH_OPENING_BRACKET : OPENING_BRACKET -> type(OPENING_BRACKET), pushMode(SETTING_MODE);
384388
385-
ON : 'on' -> pushMode(ENRICH_FIELD_MODE);
386-
WITH : 'with' -> pushMode(ENRICH_FIELD_MODE);
389+
ENRICH_ON : ON -> type(ON), pushMode(ENRICH_FIELD_MODE);
390+
ENRICH_WITH : WITH -> type(WITH), pushMode(ENRICH_FIELD_MODE);
387391
388392
// similar to that of an index
389393
// see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params

x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens

Lines changed: 168 additions & 167 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)