Skip to content

Commit 7280b0c

Browse files
fix: Update grammars (#75)
This PR updates the ES|QL grammars (lexer and parser) and PromQL grammars to match the latest version in Elasticsearch. Co-authored-by: Grammar Sync Bot <elasticmachine@users.noreply.github.com>
1 parent 9f0e7dd commit 7280b0c

9 files changed

Lines changed: 2899 additions & 2788 deletions

File tree

src/parser/antlr/esql_lexer.interp

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.

src/parser/antlr/esql_lexer.tokens

Lines changed: 215 additions & 213 deletions
Large diffs are not rendered by default.

src/parser/antlr/esql_lexer.ts

Lines changed: 967 additions & 959 deletions
Large diffs are not rendered by default.

src/parser/antlr/esql_parser.g4

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ processingCommand
7575
| metricsInfoCommand
7676
| registeredDomainCommand
7777
| tsInfoCommand
78+
| userAgentCommand
7879
| mmrCommand
7980
// in development
8081
| {this.isDevVersion()}? lookupCommand
@@ -119,7 +120,7 @@ indexPatternAndMetadataFields
119120

120121
indexPatternOrSubquery
121122
: indexPattern
122-
| {this.isDevVersion()}? subquery
123+
| subquery
123124
;
124125

125126
subquery
@@ -395,6 +396,10 @@ registeredDomainCommand
395396
: REGISTERED_DOMAIN qualifiedName ASSIGN primaryExpression
396397
;
397398

399+
userAgentCommand
400+
: USER_AGENT qualifiedName ASSIGN primaryExpression commandNamedParameters
401+
;
402+
398403
setCommand
399404
: SET setField SEMICOLON
400405
;

src/parser/antlr/esql_parser.interp

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)