Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
651 changes: 286 additions & 365 deletions packages/kbn-monaco/src/esql/antlr/esql_lexer.g4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic!! 🚀

Large diffs are not rendered by default.

106 changes: 40 additions & 66 deletions packages/kbn-monaco/src/esql/antlr/esql_lexer.interp

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions packages/kbn-monaco/src/esql/antlr/esql_lexer.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,46 @@ SETTING=101
SETTING_LINE_COMMENT=102
SETTTING_MULTILINE_COMMENT=103
SETTING_WS=104
'dissect'=1
'drop'=2
'enrich'=3
'eval'=4
'explain'=5
'from'=6
'grok'=7
'inlinestats'=8
'keep'=9
'limit'=10
'mv_expand'=11
'rename'=12
'row'=13
'show'=14
'sort'=15
'stats'=16
'where'=17
'|'=25
'by'=29
'and'=30
'asc'=31
'='=32
','=33
'desc'=34
'.'=35
'false'=36
'first'=37
'last'=38
'('=39
'in'=40
'is'=41
'like'=42
'not'=43
'null'=44
'nulls'=45
'or'=46
'?'=47
'rlike'=48
')'=49
'true'=50
'=='=51
'=~'=52
'!='=53
Expand All @@ -122,4 +155,10 @@ SETTING_WS=104
'/'=61
'%'=62
']'=64
'metadata'=70
'as'=79
'on'=83
'with'=84
'info'=95
'functions'=96
':'=100
841 changes: 400 additions & 441 deletions packages/kbn-monaco/src/esql/antlr/esql_lexer.ts

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions packages/kbn-monaco/src/esql/antlr/esql_parser.interp
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
token literal names:
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
'dissect'
'drop'
'enrich'
'eval'
'explain'
'from'
'grok'
'inlinestats'
'keep'
'limit'
'mv_expand'
'rename'
'row'
'show'
'sort'
'stats'
'where'
null
null
null
Expand All @@ -28,28 +28,28 @@ null
null
null
null
null
null
null
'by'
'and'
'asc'
'='
','
null
'desc'
'.'
null
null
null
'false'
'first'
'last'
'('
null
null
null
null
null
null
null
'in'
'is'
'like'
'not'
'null'
'nulls'
'or'
'?'
null
'rlike'
')'
null
'true'
'=='
'=~'
'!='
Expand All @@ -69,6 +69,7 @@ null
null
null
null
'metadata'
null
null
null
Expand All @@ -77,9 +78,12 @@ null
null
null
null
'as'
null
null
null
'on'
'with'
null
null
null
Expand All @@ -90,12 +94,8 @@ null
null
null
null
null
null
null
null
null
null
'info'
'functions'
null
null
null
Expand Down
39 changes: 39 additions & 0 deletions packages/kbn-monaco/src/esql/antlr/esql_parser.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,46 @@ SETTING_LINE_COMMENT=102
SETTTING_MULTILINE_COMMENT=103
SETTING_WS=104
UNQUOTED_ID_PATTERN=105
'dissect'=1
'drop'=2
'enrich'=3
'eval'=4
'explain'=5
'from'=6
'grok'=7
'inlinestats'=8
'keep'=9
'limit'=10
'mv_expand'=11
'rename'=12
'row'=13
'show'=14
'sort'=15
'stats'=16
'where'=17
'|'=25
'by'=29
'and'=30
'asc'=31
'='=32
','=33
'desc'=34
'.'=35
'false'=36
'first'=37
'last'=38
'('=39
'in'=40
'is'=41
'like'=42
'not'=43
'null'=44
'nulls'=45
'or'=46
'?'=47
'rlike'=48
')'=49
'true'=50
'=='=51
'=~'=52
'!='=53
Expand All @@ -123,4 +156,10 @@ UNQUOTED_ID_PATTERN=105
'/'=61
'%'=62
']'=64
'metadata'=70
'as'=79
'on'=83
'with'=84
'info'=95
'functions'=96
':'=100
69 changes: 35 additions & 34 deletions packages/kbn-monaco/src/esql/antlr/esql_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,57 +175,58 @@ export default class esql_parser extends Parser {
public static readonly RULE_showCommand = 48;
public static readonly RULE_enrichCommand = 49;
public static readonly RULE_enrichWithClause = 50;
public static readonly literalNames: (string | null)[] = [ null, null,
public static readonly literalNames: (string | null)[] = [ null, "'dissect'",
"'drop'", "'enrich'",
"'eval'", "'explain'",
"'from'", "'grok'",
"'inlinestats'",
"'keep'", "'limit'",
"'mv_expand'",
"'rename'",
"'row'", "'show'",
"'sort'", "'stats'",
"'where'", null,
null, null,
null, null,
null, null,
"'|'", null,
null, null,
"'by'", "'and'",
"'asc'", "'='",
"','", "'desc'",
"'.'", "'false'",
"'first'", "'last'",
"'('", "'in'",
"'is'", "'like'",
"'not'", "'null'",
"'nulls'", "'or'",
"'?'", "'rlike'",
"')'", "'true'",
"'=='", "'=~'",
"'!='", "'<'",
"'<='", "'>'",
"'>='", "'+'",
"'-'", "'*'",
"'/'", "'%'",
null, "']'",
null, null,
null, null,
null, "'metadata'",
null, null,
null, null,
null, null,
null, null,
"'as'", null,
null, null,
null, "'|'",
"'on'", "'with'",
null, null,
null, null,
null, null,
"'='", "','",
null, "'.'",
null, null,
null, "'('",
null, null,
"'info'", "'functions'",
null, null,
null, null,
null, "'?'",
null, "')'",
null, "'=='",
"'=~'", "'!='",
"'<'", "'<='",
"'>'", "'>='",
"'+'", "'-'",
"'*'", "'/'",
"'%'", null,
"']'", null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
"':'" ];
null, "':'" ];
public static readonly symbolicNames: (string | null)[] = [ null, "DISSECT",
"DROP", "ENRICH",
"EVAL", "EXPLAIN",
Expand Down
Loading