[ES|QL] use lexer from elasticsearch (#178257)

## Summary

Up till now, we had to define our own lexer rules for our client-side
ES|QL validation. This was because we were using an unofficial ANTLR
package (before the official ANTLR had typescript support).

Now that we are using the official ANTLR library (as of
https://github.com/elastic/kibana/pull/177211), we no longer have to
encode case insensitivity into the lexer rules themselves because the
[`caseInsensitive` option](https://github.com/antlr/antlr4/pull/3399) is
now available to us.

This means we can adopt the very [same
definitions](343b1ae1ba/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4)
that Elasticsearch uses as long as we set `caseInsensitive`
(Elasticsearch handles case insensitivity at runtime).

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
This commit is contained in:
Drew Tate 2024-03-08 15:47:29 +01:00 committed by GitHub
parent b0170e59a7
commit 05dfb28dcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 905 additions and 972 deletions

View file

@ -1,436 +1,357 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor
* license agreements. Licensed under the Elastic License 2.0; you may not use this file except in
* compliance with the Elastic License 2.0.
*/
lexer grammar esql_lexer;
options { }
DISSECT : D I S S E C T -> pushMode(EXPRESSION_MODE);
DROP : D R O P -> pushMode(PROJECT_MODE);
ENRICH : E N R I C H -> pushMode(ENRICH_MODE);
EVAL : E V A L -> pushMode(EXPRESSION_MODE);
EXPLAIN : E X P L A I N -> pushMode(EXPLAIN_MODE);
FROM : F R O M -> pushMode(FROM_MODE);
GROK : G R O K -> pushMode(EXPRESSION_MODE);
INLINESTATS : I N L I N E S T A T S -> pushMode(EXPRESSION_MODE);
KEEP : K E E P -> pushMode(PROJECT_MODE);
LIMIT : L I M I T -> pushMode(EXPRESSION_MODE);
MV_EXPAND : M V UNDERSCORE E X P A N D -> pushMode(MVEXPAND_MODE);
RENAME : R E N A M E -> pushMode(RENAME_MODE);
ROW : R O W -> pushMode(EXPRESSION_MODE);
SHOW : S H O W -> pushMode(SHOW_MODE);
SORT : S O R T -> pushMode(EXPRESSION_MODE);
STATS : S T A T S -> pushMode(EXPRESSION_MODE);
WHERE : W H E R E -> pushMode(EXPRESSION_MODE);
UNKNOWN_CMD : ~[ \r\n\t[\]/]+ -> pushMode(EXPRESSION_MODE);
options {
caseInsensitive = true;
}
LINE_COMMENT
: '//' ~[\r\n]* '\r'? '\n'? -> channel(HIDDEN)
;
DISSECT: 'dissect' -> pushMode(EXPRESSION_MODE);
DROP: 'drop' -> pushMode(PROJECT_MODE);
ENRICH: 'enrich' -> pushMode(ENRICH_MODE);
EVAL: 'eval' -> pushMode(EXPRESSION_MODE);
EXPLAIN: 'explain' -> pushMode(EXPLAIN_MODE);
FROM: 'from' -> pushMode(FROM_MODE);
GROK: 'grok' -> pushMode(EXPRESSION_MODE);
INLINESTATS: 'inlinestats' -> pushMode(EXPRESSION_MODE);
KEEP: 'keep' -> pushMode(PROJECT_MODE);
LIMIT: 'limit' -> pushMode(EXPRESSION_MODE);
MV_EXPAND: 'mv_expand' -> pushMode(MVEXPAND_MODE);
RENAME: 'rename' -> pushMode(RENAME_MODE);
ROW: 'row' -> pushMode(EXPRESSION_MODE);
SHOW: 'show' -> pushMode(SHOW_MODE);
SORT: 'sort' -> pushMode(EXPRESSION_MODE);
STATS: 'stats' -> pushMode(EXPRESSION_MODE);
WHERE: 'where' -> pushMode(EXPRESSION_MODE);
UNKNOWN_CMD: ~[ \r\n\t[\]/]+ -> pushMode(EXPRESSION_MODE);
MULTILINE_COMMENT
: '/*' (MULTILINE_COMMENT|.)*? '*/' -> channel(HIDDEN)
;
LINE_COMMENT: '//' ~[\r\n]* '\r'? '\n'? -> channel(HIDDEN);
WS
: [ \r\n\t]+ -> channel(HIDDEN)
;
MULTILINE_COMMENT:
'/*' (MULTILINE_COMMENT | .)*? '*/' -> channel(HIDDEN);
WS: [ \r\n\t]+ -> channel(HIDDEN);
//
// Explain
//
//
//
//
//
//
//
//
mode EXPLAIN_MODE;
EXPLAIN_OPENING_BRACKET : OPENING_BRACKET -> type(OPENING_BRACKET), pushMode(DEFAULT_MODE);
EXPLAIN_PIPE : PIPE -> type(PIPE), popMode;
EXPLAIN_WS : WS -> channel(HIDDEN);
EXPLAIN_LINE_COMMENT : LINE_COMMENT -> channel(HIDDEN);
EXPLAIN_MULTILINE_COMMENT : MULTILINE_COMMENT -> channel(HIDDEN);
EXPLAIN_OPENING_BRACKET:
OPENING_BRACKET -> type(OPENING_BRACKET), pushMode(DEFAULT_MODE);
EXPLAIN_PIPE: PIPE -> type(PIPE), popMode;
EXPLAIN_WS: WS -> channel(HIDDEN);
EXPLAIN_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
EXPLAIN_MULTILINE_COMMENT:
MULTILINE_COMMENT -> channel(HIDDEN);
//
// Expression - used by most command
//
//
//
//
//
//
//
//
mode EXPRESSION_MODE;
PIPE : '|' -> popMode;
PIPE: '|' -> popMode;
fragment DIGIT
: [0-9]
;
fragment DIGIT: [0-9];
fragment LETTER
: [A-Za-z]
;
fragment LETTER: [A-Za-z];
fragment ESCAPE_SEQUENCE
: '\\' [tnr"\\]
;
fragment ESCAPE_SEQUENCE: '\\' [tnr"\\];
fragment UNESCAPED_CHARS
: ~[\r\n"\\]
;
fragment UNESCAPED_CHARS: ~[\r\n"\\];
fragment EXPONENT
: [Ee] [+-]? DIGIT+
;
fragment EXPONENT: [Ee] [+-]? DIGIT+;
fragment ASPERAND
: '@'
;
fragment ASPERAND: '@';
fragment BACKQUOTE
: '`'
;
fragment BACKQUOTE: '`';
fragment BACKQUOTE_BLOCK
: ~'`'
| '``'
;
fragment BACKQUOTE_BLOCK: ~'`' | '``';
fragment UNDERSCORE
: '_'
;
fragment UNDERSCORE: '_';
fragment UNQUOTED_ID_BODY
: (LETTER | DIGIT | UNDERSCORE)
;
fragment UNQUOTED_ID_BODY: (LETTER | DIGIT | UNDERSCORE);
STRING
: '"' (ESCAPE_SEQUENCE | UNESCAPED_CHARS)* '"'
| '"""' (~[\r\n])*? '"""' '"'? '"'?
;
STRING:
'"' (ESCAPE_SEQUENCE | UNESCAPED_CHARS)* '"'
| '"""' (~[\r\n])*? '"""' '"'? '"'?;
INTEGER_LITERAL
: DIGIT+
;
INTEGER_LITERAL: DIGIT+;
DECIMAL_LITERAL
: DIGIT+ DOT DIGIT*
| DOT DIGIT+
| DIGIT+ (DOT DIGIT*)? EXPONENT
| DOT DIGIT+ EXPONENT
;
DECIMAL_LITERAL:
DIGIT+ DOT DIGIT*
| DOT DIGIT+
| DIGIT+ (DOT DIGIT*)? EXPONENT
| DOT DIGIT+ EXPONENT;
BY : B Y;
BY: 'by';
AND : A N D;
ASC : A S C;
ASSIGN : '=';
COMMA : ',';
DESC : D E S C;
DOT : '.';
FALSE : F A L S E;
FIRST : F I R S T;
LAST : L A S T;
LP : '(';
IN: I N;
IS: I S;
LIKE: L I K E;
NOT : N O T;
NULL : N U L L;
NULLS : N U L L S;
OR : O R;
AND: 'and';
ASC: 'asc';
ASSIGN: '=';
COMMA: ',';
DESC: 'desc';
DOT: '.';
FALSE: 'false';
FIRST: 'first';
LAST: 'last';
LP: '(';
IN: 'in';
IS: 'is';
LIKE: 'like';
NOT: 'not';
NULL: 'null';
NULLS: 'nulls';
OR: 'or';
PARAM: '?';
RLIKE: R L I K E;
RP : ')';
TRUE : T R U E;
RLIKE: 'rlike';
RP: ')';
TRUE: 'true';
EQ : '==';
CIEQ : '=~';
NEQ : '!=';
LT : '<';
LTE : '<=';
GT : '>';
GTE : '>=';
EQ: '==';
CIEQ: '=~';
NEQ: '!=';
LT: '<';
LTE: '<=';
GT: '>';
GTE: '>=';
PLUS : '+';
MINUS : '-';
ASTERISK : '*';
SLASH : '/';
PERCENT : '%';
PLUS: '+';
MINUS: '-';
ASTERISK: '*';
SLASH: '/';
PERCENT: '%';
// Brackets are funny. We can happen upon a CLOSING_BRACKET in two ways - one
// way is to start in an explain command which then shifts us to expression
// mode. Thus, the two popModes on CLOSING_BRACKET. The other way could as
// the start of a multivalued field constant. To line up with the double pop
// the explain mode needs, we double push when we see that.
OPENING_BRACKET : '[' -> pushMode(EXPRESSION_MODE), pushMode(EXPRESSION_MODE);
CLOSING_BRACKET : ']' -> popMode, popMode;
// Brackets are funny. We can happen upon a CLOSING_BRACKET in two ways - one way is to start in an
// explain command which then shifts us to expression mode. Thus, the two popModes on
// CLOSING_BRACKET. The other way could as the start of a multivalued field constant. To line up
// with the double pop the explain mode needs, we double push when we see that.
OPENING_BRACKET:
'[' -> pushMode(EXPRESSION_MODE), pushMode(EXPRESSION_MODE);
CLOSING_BRACKET: ']' -> popMode, popMode;
UNQUOTED_IDENTIFIER
: LETTER UNQUOTED_ID_BODY*
// only allow @ at beginning of identifier to keep the option to allow @ as infix operator in the future
// also, single `_` and `@` characters are not valid identifiers
| (UNDERSCORE | ASPERAND) UNQUOTED_ID_BODY+
;
UNQUOTED_IDENTIFIER:
LETTER UNQUOTED_ID_BODY*
// only allow @ at beginning of identifier to keep the option to allow @ as infix operator in
// the future also, single `_` and `@` characters are not valid identifiers
| (UNDERSCORE | ASPERAND) UNQUOTED_ID_BODY+;
fragment QUOTED_ID
: BACKQUOTE BACKQUOTE_BLOCK+ BACKQUOTE
;
fragment QUOTED_ID: BACKQUOTE BACKQUOTE_BLOCK+ BACKQUOTE;
QUOTED_IDENTIFIER
: QUOTED_ID
;
QUOTED_IDENTIFIER: QUOTED_ID;
EXPR_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
EXPR_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
EXPR_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
EXPR_MULTILINE_COMMENT: MULTILINE_COMMENT -> channel(HIDDEN);
EXPR_WS
: WS -> channel(HIDDEN)
;
EXPR_WS: WS -> channel(HIDDEN);
//
// FROM command
//
//
//
//
//
//
//
//
mode FROM_MODE;
FROM_PIPE : PIPE -> type(PIPE), popMode;
FROM_OPENING_BRACKET : OPENING_BRACKET -> type(OPENING_BRACKET);
FROM_CLOSING_BRACKET : CLOSING_BRACKET -> type(CLOSING_BRACKET);
FROM_COMMA : COMMA -> type(COMMA);
FROM_ASSIGN : ASSIGN -> type(ASSIGN);
FROM_PIPE: PIPE -> type(PIPE), popMode;
FROM_OPENING_BRACKET: OPENING_BRACKET -> type(OPENING_BRACKET);
FROM_CLOSING_BRACKET: CLOSING_BRACKET -> type(CLOSING_BRACKET);
FROM_COMMA: COMMA -> type(COMMA);
FROM_ASSIGN: ASSIGN -> type(ASSIGN);
METADATA: M E T A D A T A;
METADATA: 'metadata';
fragment FROM_UNQUOTED_IDENTIFIER_PART
: ~[=`|,[\]/ \t\r\n]
| '/' ~[*/] // allow single / but not followed by another / or * which would start a comment
;
fragment FROM_UNQUOTED_IDENTIFIER_PART:
~[=`|,[\]/ \t\r\n]
| '/' ~[*/]; // allow single / but not followed by another / or * which would start a comment
FROM_UNQUOTED_IDENTIFIER
: FROM_UNQUOTED_IDENTIFIER_PART+
;
FROM_UNQUOTED_IDENTIFIER: FROM_UNQUOTED_IDENTIFIER_PART+;
FROM_QUOTED_IDENTIFIER
: QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER)
;
FROM_QUOTED_IDENTIFIER:
QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER);
FROM_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
FROM_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
FROM_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
FROM_MULTILINE_COMMENT: MULTILINE_COMMENT -> channel(HIDDEN);
FROM_WS
: WS -> channel(HIDDEN)
;
FROM_WS: WS -> channel(HIDDEN);
//
// DROP, KEEP
//
//
//
//
//
//
//
//
mode PROJECT_MODE;
PROJECT_PIPE : PIPE -> type(PIPE), popMode;
PROJECT_PIPE: PIPE -> type(PIPE), popMode;
PROJECT_DOT: DOT -> type(DOT);
PROJECT_COMMA : COMMA -> type(COMMA);
PROJECT_COMMA: COMMA -> type(COMMA);
fragment UNQUOTED_ID_BODY_WITH_PATTERN
: (LETTER | DIGIT | UNDERSCORE | ASTERISK)
;
fragment UNQUOTED_ID_BODY_WITH_PATTERN: (
LETTER
| DIGIT
| UNDERSCORE
| ASTERISK
);
fragment UNQUOTED_ID_PATTERN
: (LETTER | ASTERISK) UNQUOTED_ID_BODY_WITH_PATTERN*
| (UNDERSCORE | ASPERAND) UNQUOTED_ID_BODY_WITH_PATTERN+
;
fragment UNQUOTED_ID_PATTERN: (LETTER | ASTERISK) UNQUOTED_ID_BODY_WITH_PATTERN*
| (UNDERSCORE | ASPERAND) UNQUOTED_ID_BODY_WITH_PATTERN+;
ID_PATTERN
: (UNQUOTED_ID_PATTERN | QUOTED_ID)+
;
ID_PATTERN: (UNQUOTED_ID_PATTERN | QUOTED_ID)+;
PROJECT_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
PROJECT_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
PROJECT_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
PROJECT_MULTILINE_COMMENT:
MULTILINE_COMMENT -> channel(HIDDEN);
PROJECT_WS
: WS -> channel(HIDDEN)
;
PROJECT_WS: WS -> channel(HIDDEN);
//
// | RENAME a.b AS x, c AS y
//
//
//
//
//
//
//
//
mode RENAME_MODE;
RENAME_PIPE : PIPE -> type(PIPE), popMode;
RENAME_ASSIGN : ASSIGN -> type(ASSIGN);
RENAME_COMMA : COMMA -> type(COMMA);
RENAME_PIPE: PIPE -> type(PIPE), popMode;
RENAME_ASSIGN: ASSIGN -> type(ASSIGN);
RENAME_COMMA: COMMA -> type(COMMA);
RENAME_DOT: DOT -> type(DOT);
AS : A S;
AS: 'as';
RENAME_ID_PATTERN
: ID_PATTERN -> type(ID_PATTERN)
;
RENAME_ID_PATTERN: ID_PATTERN -> type(ID_PATTERN);
RENAME_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
RENAME_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
RENAME_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
RENAME_MULTILINE_COMMENT: MULTILINE_COMMENT -> channel(HIDDEN);
RENAME_WS
: WS -> channel(HIDDEN)
;
RENAME_WS: WS -> channel(HIDDEN);
// | ENRICH ON key WITH fields
mode ENRICH_MODE;
ENRICH_PIPE : PIPE -> type(PIPE), popMode;
ENRICH_OPENING_BRACKET : OPENING_BRACKET -> type(OPENING_BRACKET), pushMode(SETTING_MODE);
ENRICH_PIPE: PIPE -> type(PIPE), popMode;
ENRICH_OPENING_BRACKET:
OPENING_BRACKET -> type(OPENING_BRACKET), pushMode(SETTING_MODE);
ON : O N -> pushMode(ENRICH_FIELD_MODE);
WITH : W I T H -> pushMode(ENRICH_FIELD_MODE);
ON: 'on' -> pushMode(ENRICH_FIELD_MODE);
WITH: 'with' -> pushMode(ENRICH_FIELD_MODE);
// similar to that of an index
// see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params
fragment ENRICH_POLICY_NAME_BODY
: ~[\\/?"<>| ,#\t\r\n:]
;
ENRICH_POLICY_NAME
// allow prefix for the policy to specify its resolution
: (ENRICH_POLICY_NAME_BODY+ COLON)? ENRICH_POLICY_NAME_BODY+
;
// similar to that of an index see
// https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params
fragment ENRICH_POLICY_NAME_BODY: ~[\\/?"<>| ,#\t\r\n:];
ENRICH_QUOTED_IDENTIFIER
: QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER)
;
ENRICH_POLICY_NAME: (ENRICH_POLICY_NAME_BODY+ COLON)? ENRICH_POLICY_NAME_BODY+;
// allow prefix for the policy to specify its resolution
ENRICH_MODE_UNQUOTED_VALUE
: ENRICH_POLICY_NAME -> type(ENRICH_POLICY_NAME)
;
ENRICH_QUOTED_IDENTIFIER:
QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER);
ENRICH_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
ENRICH_MODE_UNQUOTED_VALUE:
ENRICH_POLICY_NAME -> type(ENRICH_POLICY_NAME);
ENRICH_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
ENRICH_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
ENRICH_WS
: WS -> channel(HIDDEN)
;
ENRICH_MULTILINE_COMMENT: MULTILINE_COMMENT -> channel(HIDDEN);
ENRICH_WS: WS -> channel(HIDDEN);
// submode for Enrich to allow different lexing between policy identifier (loose) and field identifiers
mode ENRICH_FIELD_MODE;
ENRICH_FIELD_PIPE : PIPE -> type(PIPE), popMode, popMode;
ENRICH_FIELD_ASSIGN : ASSIGN -> type(ASSIGN);
ENRICH_FIELD_COMMA : COMMA -> type(COMMA);
ENRICH_FIELD_PIPE: PIPE -> type(PIPE), popMode, popMode;
ENRICH_FIELD_ASSIGN: ASSIGN -> type(ASSIGN);
ENRICH_FIELD_COMMA: COMMA -> type(COMMA);
ENRICH_FIELD_DOT: DOT -> type(DOT);
ENRICH_FIELD_WITH : WITH -> type(WITH) ;
ENRICH_FIELD_WITH: WITH -> type(WITH);
ENRICH_FIELD_ID_PATTERN
: ID_PATTERN -> type(ID_PATTERN)
;
ENRICH_FIELD_ID_PATTERN: ID_PATTERN -> type(ID_PATTERN);
ENRICH_FIELD_QUOTED_IDENTIFIER
: QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER)
;
ENRICH_FIELD_QUOTED_IDENTIFIER:
QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER);
ENRICH_FIELD_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
ENRICH_FIELD_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
ENRICH_FIELD_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
ENRICH_FIELD_MULTILINE_COMMENT:
MULTILINE_COMMENT -> channel(HIDDEN);
ENRICH_FIELD_WS
: WS -> channel(HIDDEN)
;
ENRICH_FIELD_WS: WS -> channel(HIDDEN);
mode MVEXPAND_MODE;
MVEXPAND_PIPE : PIPE -> type(PIPE), popMode;
MVEXPAND_PIPE: PIPE -> type(PIPE), popMode;
MVEXPAND_DOT: DOT -> type(DOT);
MVEXPAND_QUOTED_IDENTIFIER
: QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER)
;
MVEXPAND_QUOTED_IDENTIFIER:
QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER);
MVEXPAND_UNQUOTED_IDENTIFIER
: UNQUOTED_IDENTIFIER -> type(UNQUOTED_IDENTIFIER)
;
MVEXPAND_UNQUOTED_IDENTIFIER:
UNQUOTED_IDENTIFIER -> type(UNQUOTED_IDENTIFIER);
MVEXPAND_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
MVEXPAND_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
MVEXPAND_MULTILINE_COMMENT:
MULTILINE_COMMENT -> channel(HIDDEN);
MVEXPAND_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
MVEXPAND_WS
: WS -> channel(HIDDEN)
;
MVEXPAND_WS: WS -> channel(HIDDEN);
//
// SHOW INFO
//
//
//
//
//
//
//
//
mode SHOW_MODE;
SHOW_PIPE : PIPE -> type(PIPE), popMode;
SHOW_PIPE: PIPE -> type(PIPE), popMode;
INFO : I N F O;
FUNCTIONS : F U N C T I O N S;
INFO: 'info';
FUNCTIONS: 'functions';
SHOW_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
SHOW_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
SHOW_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
SHOW_MULTILINE_COMMENT: MULTILINE_COMMENT -> channel(HIDDEN);
SHOW_WS
: WS -> channel(HIDDEN)
;
SHOW_WS: WS -> channel(HIDDEN);
mode SETTING_MODE;
SETTING_CLOSING_BRACKET : CLOSING_BRACKET -> type(CLOSING_BRACKET), popMode;
COLON : ':';
SETTING
: (ASPERAND | DIGIT| DOT | LETTER | UNDERSCORE)+
;
SETTING_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
;
SETTTING_MULTILINE_COMMENT
: MULTILINE_COMMENT -> channel(HIDDEN)
;
SETTING_WS
: WS -> channel(HIDDEN)
;
SETTING_CLOSING_BRACKET:
CLOSING_BRACKET -> type(CLOSING_BRACKET), popMode;
fragment A : [aA]; // match either an 'a' or 'A'
fragment B : [bB];
fragment C : [cC];
fragment D : [dD];
fragment E : [eE];
fragment F : [fF];
fragment G : [gG];
fragment H : [hH];
fragment I : [iI];
fragment J : [jJ];
fragment K : [kK];
fragment L : [lL];
fragment M : [mM];
fragment N : [nN];
fragment O : [oO];
fragment P : [pP];
fragment Q : [qQ];
fragment R : [rR];
fragment S : [sS];
fragment T : [tT];
fragment U : [uU];
fragment V : [vV];
fragment W : [wW];
fragment X : [xX];
fragment Y : [yY];
fragment Z : [zZ];
COLON: ':';
SETTING: (ASPERAND | DIGIT | DOT | LETTER | UNDERSCORE)+;
SETTING_LINE_COMMENT: LINE_COMMENT -> channel(HIDDEN);
SETTTING_MULTILINE_COMMENT:
MULTILINE_COMMENT -> channel(HIDDEN);
SETTING_WS: WS -> channel(HIDDEN);

File diff suppressed because one or more lines are too long

View file

@ -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
@ -122,4 +155,10 @@ SETTING_WS=104
'/'=61
'%'=62
']'=64
'metadata'=70
'as'=79
'on'=83
'with'=84
'info'=95
'functions'=96
':'=100

View file

@ -130,57 +130,58 @@ export default class esql_lexer extends Lexer {
public static readonly SETTING_MODE = 10;
public static readonly channelNames: string[] = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ];
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,
"'on'", "'with'",
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,
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",
@ -292,9 +293,7 @@ export default class esql_lexer extends Lexer {
"MVEXPAND_UNQUOTED_IDENTIFIER", "MVEXPAND_LINE_COMMENT", "MVEXPAND_MULTILINE_COMMENT",
"MVEXPAND_WS", "SHOW_PIPE", "INFO", "FUNCTIONS", "SHOW_LINE_COMMENT",
"SHOW_MULTILINE_COMMENT", "SHOW_WS", "SETTING_CLOSING_BRACKET", "COLON",
"SETTING", "SETTING_LINE_COMMENT", "SETTTING_MULTILINE_COMMENT", "SETTING_WS",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"SETTING", "SETTING_LINE_COMMENT", "SETTTING_MULTILINE_COMMENT", "SETTING_WS",
];
@ -315,7 +314,7 @@ export default class esql_lexer extends Lexer {
public get modeNames(): string[] { return esql_lexer.modeNames; }
public static readonly _serializedATN: number[] = [4,0,104,1251,6,-1,6,
public static readonly _serializedATN: number[] = [4,0,104,1147,6,-1,6,
-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,
2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,
7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,
@ -338,409 +337,369 @@ export default class esql_lexer extends Lexer {
128,2,129,7,129,2,130,7,130,2,131,7,131,2,132,7,132,2,133,7,133,2,134,7,
134,2,135,7,135,2,136,7,136,2,137,7,137,2,138,7,138,2,139,7,139,2,140,7,
140,2,141,7,141,2,142,7,142,2,143,7,143,2,144,7,144,2,145,7,145,2,146,7,
146,2,147,7,147,2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,2,152,7,
152,2,153,7,153,2,154,7,154,2,155,7,155,2,156,7,156,2,157,7,157,2,158,7,
158,2,159,7,159,2,160,7,160,2,161,7,161,2,162,7,162,2,163,7,163,2,164,7,
164,2,165,7,165,2,166,7,166,2,167,7,167,2,168,7,168,2,169,7,169,2,170,7,
170,2,171,7,171,2,172,7,172,2,173,7,173,2,174,7,174,2,175,7,175,2,176,7,
176,2,177,7,177,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,
1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,
1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,
1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,
1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,
11,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,
1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,
15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,17,
4,17,512,8,17,11,17,12,17,513,1,17,1,17,1,18,1,18,1,18,1,18,5,18,522,8,
18,10,18,12,18,525,9,18,1,18,3,18,528,8,18,1,18,3,18,531,8,18,1,18,1,18,
1,19,1,19,1,19,1,19,1,19,5,19,540,8,19,10,19,12,19,543,9,19,1,19,1,19,1,
19,1,19,1,19,1,20,4,20,551,8,20,11,20,12,20,552,1,20,1,20,1,21,1,21,1,21,
1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,
24,1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,27,1,27,1,28,1,28,1,29,1,29,
1,29,1,30,1,30,1,31,1,31,3,31,594,8,31,1,31,4,31,597,8,31,11,31,12,31,598,
1,32,1,32,1,33,1,33,1,34,1,34,1,34,3,34,608,8,34,1,35,1,35,1,36,1,36,1,
36,3,36,615,8,36,1,37,1,37,1,37,5,37,620,8,37,10,37,12,37,623,9,37,1,37,
1,37,1,37,1,37,1,37,1,37,5,37,631,8,37,10,37,12,37,634,9,37,1,37,1,37,1,
37,1,37,1,37,3,37,641,8,37,1,37,3,37,644,8,37,3,37,646,8,37,1,38,4,38,649,
8,38,11,38,12,38,650,1,39,4,39,654,8,39,11,39,12,39,655,1,39,1,39,5,39,
660,8,39,10,39,12,39,663,9,39,1,39,1,39,4,39,667,8,39,11,39,12,39,668,1,
39,4,39,672,8,39,11,39,12,39,673,1,39,1,39,5,39,678,8,39,10,39,12,39,681,
9,39,3,39,683,8,39,1,39,1,39,1,39,1,39,4,39,689,8,39,11,39,12,39,690,1,
39,1,39,3,39,695,8,39,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,42,1,42,1,42,
1,42,1,43,1,43,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,46,1,46,1,47,1,47,1,
47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,
1,50,1,50,1,51,1,51,1,51,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,54,1,
54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,56,1,57,
1,57,1,57,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,61,1,61,1,
61,1,61,1,61,1,62,1,62,1,62,1,63,1,63,1,63,1,64,1,64,1,64,1,65,1,65,1,66,
1,66,1,66,1,67,1,67,1,68,1,68,1,68,1,69,1,69,1,70,1,70,1,71,1,71,1,72,1,
72,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75,1,76,1,76,
5,76,823,8,76,10,76,12,76,826,9,76,1,76,1,76,3,76,830,8,76,1,76,4,76,833,
8,76,11,76,12,76,834,3,76,837,8,76,1,77,1,77,4,77,841,8,77,11,77,12,77,
842,1,77,1,77,1,78,1,78,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1,81,1,
81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,83,1,83,1,83,1,83,1,84,1,84,1,84,
1,84,1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,
87,1,87,1,87,1,87,1,88,1,88,1,88,3,88,894,8,88,1,89,4,89,897,8,89,11,89,
12,89,898,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,92,1,92,1,92,1,92,1,
93,1,93,1,93,1,93,1,94,1,94,1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,96,1,96,
1,96,1,96,1,97,1,97,1,97,1,97,3,97,934,8,97,1,98,1,98,3,98,938,8,98,1,98,
5,98,941,8,98,10,98,12,98,944,9,98,1,98,1,98,3,98,948,8,98,1,98,4,98,951,
8,98,11,98,12,98,952,3,98,955,8,98,1,99,1,99,4,99,959,8,99,11,99,12,99,
960,1,100,1,100,1,100,1,100,1,101,1,101,1,101,1,101,1,102,1,102,1,102,1,
102,1,103,1,103,1,103,1,103,1,103,1,104,1,104,1,104,1,104,1,105,1,105,1,
105,1,105,1,106,1,106,1,106,1,106,1,107,1,107,1,107,1,108,1,108,1,108,1,
108,1,109,1,109,1,109,1,109,1,110,1,110,1,110,1,110,1,111,1,111,1,111,1,
111,1,112,1,112,1,112,1,112,1,112,1,113,1,113,1,113,1,113,1,113,1,114,1,
114,1,114,1,114,1,114,1,115,1,115,1,115,1,115,1,115,1,115,1,115,1,116,1,
116,1,117,4,117,1036,8,117,11,117,12,117,1037,1,117,1,117,3,117,1042,8,
117,1,117,4,117,1045,8,117,11,117,12,117,1046,1,118,1,118,1,118,1,118,1,
119,1,119,1,119,1,119,1,120,1,120,1,120,1,120,1,121,1,121,1,121,1,121,1,
122,1,122,1,122,1,122,1,123,1,123,1,123,1,123,1,123,1,123,1,124,1,124,1,
124,1,124,1,125,1,125,1,125,1,125,1,126,1,126,1,126,1,126,1,127,1,127,1,
127,1,127,1,128,1,128,1,128,1,128,1,129,1,129,1,129,1,129,1,130,1,130,1,
130,1,130,1,131,1,131,1,131,1,131,1,132,1,132,1,132,1,132,1,133,1,133,1,
133,1,133,1,133,1,134,1,134,1,134,1,134,1,135,1,135,1,135,1,135,1,136,1,
136,1,136,1,136,1,137,1,137,1,137,1,137,1,138,1,138,1,138,1,138,1,139,1,
139,1,139,1,139,1,140,1,140,1,140,1,140,1,140,1,141,1,141,1,141,1,141,1,
141,1,142,1,142,1,142,1,142,1,142,1,142,1,142,1,142,1,142,1,142,1,143,1,
143,1,143,1,143,1,144,1,144,1,144,1,144,1,145,1,145,1,145,1,145,1,146,1,
146,1,146,1,146,1,146,1,147,1,147,1,148,1,148,1,148,1,148,1,148,4,148,1184,
8,148,11,148,12,148,1185,1,149,1,149,1,149,1,149,1,150,1,150,1,150,1,150,
1,151,1,151,1,151,1,151,1,152,1,152,1,153,1,153,1,154,1,154,1,155,1,155,
1,156,1,156,1,157,1,157,1,158,1,158,1,159,1,159,1,160,1,160,1,161,1,161,
1,162,1,162,1,163,1,163,1,164,1,164,1,165,1,165,1,166,1,166,1,167,1,167,
1,168,1,168,1,169,1,169,1,170,1,170,1,171,1,171,1,172,1,172,1,173,1,173,
1,174,1,174,1,175,1,175,1,176,1,176,1,177,1,177,2,541,632,0,178,11,1,13,
2,15,3,17,4,19,5,21,6,23,7,25,8,27,9,29,10,31,11,33,12,35,13,37,14,39,15,
41,16,43,17,45,18,47,19,49,20,51,21,53,0,55,0,57,22,59,23,61,24,63,25,65,
0,67,0,69,0,71,0,73,0,75,0,77,0,79,0,81,0,83,0,85,26,87,27,89,28,91,29,
93,30,95,31,97,32,99,33,101,34,103,35,105,36,107,37,109,38,111,39,113,40,
115,41,117,42,119,43,121,44,123,45,125,46,127,47,129,48,131,49,133,50,135,
51,137,52,139,53,141,54,143,55,145,56,147,57,149,58,151,59,153,60,155,61,
157,62,159,63,161,64,163,65,165,0,167,66,169,67,171,68,173,69,175,0,177,
0,179,0,181,0,183,0,185,70,187,0,189,71,191,0,193,72,195,73,197,74,199,
0,201,0,203,0,205,0,207,0,209,75,211,76,213,77,215,78,217,0,219,0,221,0,
223,0,225,79,227,0,229,80,231,81,233,82,235,0,237,0,239,83,241,84,243,0,
245,85,247,0,249,0,251,86,253,87,255,88,257,0,259,0,261,0,263,0,265,0,267,
0,269,0,271,89,273,90,275,91,277,0,279,0,281,0,283,0,285,92,287,93,289,
94,291,0,293,95,295,96,297,97,299,98,301,99,303,0,305,100,307,101,309,102,
311,103,313,104,315,0,317,0,319,0,321,0,323,0,325,0,327,0,329,0,331,0,333,
0,335,0,337,0,339,0,341,0,343,0,345,0,347,0,349,0,351,0,353,0,355,0,357,
0,359,0,361,0,363,0,365,0,11,0,1,2,3,4,5,6,7,8,9,10,38,6,0,9,10,13,13,32,
32,47,47,91,91,93,93,2,0,10,10,13,13,3,0,9,10,13,13,32,32,1,0,48,57,2,0,
65,90,97,122,5,0,34,34,92,92,110,110,114,114,116,116,4,0,10,10,13,13,34,
34,92,92,2,0,69,69,101,101,2,0,43,43,45,45,1,0,96,96,10,0,9,10,13,13,32,
32,44,44,47,47,61,61,91,91,93,93,96,96,124,124,2,0,42,42,47,47,11,0,9,10,
13,13,32,32,34,35,44,44,47,47,58,58,60,60,62,63,92,92,124,124,2,0,65,65,
97,97,2,0,66,66,98,98,2,0,67,67,99,99,2,0,68,68,100,100,2,0,70,70,102,102,
2,0,71,71,103,103,2,0,72,72,104,104,2,0,73,73,105,105,2,0,74,74,106,106,
2,0,75,75,107,107,2,0,76,76,108,108,2,0,77,77,109,109,2,0,78,78,110,110,
2,0,79,79,111,111,2,0,80,80,112,112,2,0,81,81,113,113,2,0,82,82,114,114,
2,0,83,83,115,115,2,0,84,84,116,116,2,0,85,85,117,117,2,0,86,86,118,118,
2,0,87,87,119,119,2,0,88,88,120,120,2,0,89,89,121,121,2,0,90,90,122,122,
1253,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,
21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,
0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,
43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,1,53,1,0,
0,0,1,55,1,0,0,0,1,57,1,0,0,0,1,59,1,0,0,0,1,61,1,0,0,0,2,63,1,0,0,0,2,
85,1,0,0,0,2,87,1,0,0,0,2,89,1,0,0,0,2,91,1,0,0,0,2,93,1,0,0,0,2,95,1,0,
0,0,2,97,1,0,0,0,2,99,1,0,0,0,2,101,1,0,0,0,2,103,1,0,0,0,2,105,1,0,0,0,
2,107,1,0,0,0,2,109,1,0,0,0,2,111,1,0,0,0,2,113,1,0,0,0,2,115,1,0,0,0,2,
117,1,0,0,0,2,119,1,0,0,0,2,121,1,0,0,0,2,123,1,0,0,0,2,125,1,0,0,0,2,127,
1,0,0,0,2,129,1,0,0,0,2,131,1,0,0,0,2,133,1,0,0,0,2,135,1,0,0,0,2,137,1,
0,0,0,2,139,1,0,0,0,2,141,1,0,0,0,2,143,1,0,0,0,2,145,1,0,0,0,2,147,1,0,
0,0,2,149,1,0,0,0,2,151,1,0,0,0,2,153,1,0,0,0,2,155,1,0,0,0,2,157,1,0,0,
0,2,159,1,0,0,0,2,161,1,0,0,0,2,163,1,0,0,0,2,167,1,0,0,0,2,169,1,0,0,0,
2,171,1,0,0,0,2,173,1,0,0,0,3,175,1,0,0,0,3,177,1,0,0,0,3,179,1,0,0,0,3,
181,1,0,0,0,3,183,1,0,0,0,3,185,1,0,0,0,3,189,1,0,0,0,3,191,1,0,0,0,3,193,
1,0,0,0,3,195,1,0,0,0,3,197,1,0,0,0,4,199,1,0,0,0,4,201,1,0,0,0,4,203,1,
0,0,0,4,209,1,0,0,0,4,211,1,0,0,0,4,213,1,0,0,0,4,215,1,0,0,0,5,217,1,0,
0,0,5,219,1,0,0,0,5,221,1,0,0,0,5,223,1,0,0,0,5,225,1,0,0,0,5,227,1,0,0,
0,5,229,1,0,0,0,5,231,1,0,0,0,5,233,1,0,0,0,6,235,1,0,0,0,6,237,1,0,0,0,
6,239,1,0,0,0,6,241,1,0,0,0,6,245,1,0,0,0,6,247,1,0,0,0,6,249,1,0,0,0,6,
251,1,0,0,0,6,253,1,0,0,0,6,255,1,0,0,0,7,257,1,0,0,0,7,259,1,0,0,0,7,261,
1,0,0,0,7,263,1,0,0,0,7,265,1,0,0,0,7,267,1,0,0,0,7,269,1,0,0,0,7,271,1,
0,0,0,7,273,1,0,0,0,7,275,1,0,0,0,8,277,1,0,0,0,8,279,1,0,0,0,8,281,1,0,
0,0,8,283,1,0,0,0,8,285,1,0,0,0,8,287,1,0,0,0,8,289,1,0,0,0,9,291,1,0,0,
0,9,293,1,0,0,0,9,295,1,0,0,0,9,297,1,0,0,0,9,299,1,0,0,0,9,301,1,0,0,0,
10,303,1,0,0,0,10,305,1,0,0,0,10,307,1,0,0,0,10,309,1,0,0,0,10,311,1,0,
0,0,10,313,1,0,0,0,11,367,1,0,0,0,13,377,1,0,0,0,15,384,1,0,0,0,17,393,
1,0,0,0,19,400,1,0,0,0,21,410,1,0,0,0,23,417,1,0,0,0,25,424,1,0,0,0,27,
438,1,0,0,0,29,445,1,0,0,0,31,453,1,0,0,0,33,465,1,0,0,0,35,474,1,0,0,0,
37,480,1,0,0,0,39,487,1,0,0,0,41,494,1,0,0,0,43,502,1,0,0,0,45,511,1,0,
0,0,47,517,1,0,0,0,49,534,1,0,0,0,51,550,1,0,0,0,53,556,1,0,0,0,55,561,
1,0,0,0,57,566,1,0,0,0,59,570,1,0,0,0,61,574,1,0,0,0,63,578,1,0,0,0,65,
582,1,0,0,0,67,584,1,0,0,0,69,586,1,0,0,0,71,589,1,0,0,0,73,591,1,0,0,0,
75,600,1,0,0,0,77,602,1,0,0,0,79,607,1,0,0,0,81,609,1,0,0,0,83,614,1,0,
0,0,85,645,1,0,0,0,87,648,1,0,0,0,89,694,1,0,0,0,91,696,1,0,0,0,93,699,
1,0,0,0,95,703,1,0,0,0,97,707,1,0,0,0,99,709,1,0,0,0,101,711,1,0,0,0,103,
716,1,0,0,0,105,718,1,0,0,0,107,724,1,0,0,0,109,730,1,0,0,0,111,735,1,0,
0,0,113,737,1,0,0,0,115,740,1,0,0,0,117,743,1,0,0,0,119,748,1,0,0,0,121,
752,1,0,0,0,123,757,1,0,0,0,125,763,1,0,0,0,127,766,1,0,0,0,129,768,1,0,
0,0,131,774,1,0,0,0,133,776,1,0,0,0,135,781,1,0,0,0,137,784,1,0,0,0,139,
787,1,0,0,0,141,790,1,0,0,0,143,792,1,0,0,0,145,795,1,0,0,0,147,797,1,0,
0,0,149,800,1,0,0,0,151,802,1,0,0,0,153,804,1,0,0,0,155,806,1,0,0,0,157,
808,1,0,0,0,159,810,1,0,0,0,161,815,1,0,0,0,163,836,1,0,0,0,165,838,1,0,
0,0,167,846,1,0,0,0,169,848,1,0,0,0,171,852,1,0,0,0,173,856,1,0,0,0,175,
860,1,0,0,0,177,865,1,0,0,0,179,869,1,0,0,0,181,873,1,0,0,0,183,877,1,0,
0,0,185,881,1,0,0,0,187,893,1,0,0,0,189,896,1,0,0,0,191,900,1,0,0,0,193,
904,1,0,0,0,195,908,1,0,0,0,197,912,1,0,0,0,199,916,1,0,0,0,201,921,1,0,
0,0,203,925,1,0,0,0,205,933,1,0,0,0,207,954,1,0,0,0,209,958,1,0,0,0,211,
962,1,0,0,0,213,966,1,0,0,0,215,970,1,0,0,0,217,974,1,0,0,0,219,979,1,0,
0,0,221,983,1,0,0,0,223,987,1,0,0,0,225,991,1,0,0,0,227,994,1,0,0,0,229,
998,1,0,0,0,231,1002,1,0,0,0,233,1006,1,0,0,0,235,1010,1,0,0,0,237,1015,
1,0,0,0,239,1020,1,0,0,0,241,1025,1,0,0,0,243,1032,1,0,0,0,245,1041,1,0,
0,0,247,1048,1,0,0,0,249,1052,1,0,0,0,251,1056,1,0,0,0,253,1060,1,0,0,0,
255,1064,1,0,0,0,257,1068,1,0,0,0,259,1074,1,0,0,0,261,1078,1,0,0,0,263,
1082,1,0,0,0,265,1086,1,0,0,0,267,1090,1,0,0,0,269,1094,1,0,0,0,271,1098,
1,0,0,0,273,1102,1,0,0,0,275,1106,1,0,0,0,277,1110,1,0,0,0,279,1115,1,0,
0,0,281,1119,1,0,0,0,283,1123,1,0,0,0,285,1127,1,0,0,0,287,1131,1,0,0,0,
289,1135,1,0,0,0,291,1139,1,0,0,0,293,1144,1,0,0,0,295,1149,1,0,0,0,297,
1159,1,0,0,0,299,1163,1,0,0,0,301,1167,1,0,0,0,303,1171,1,0,0,0,305,1176,
1,0,0,0,307,1183,1,0,0,0,309,1187,1,0,0,0,311,1191,1,0,0,0,313,1195,1,0,
0,0,315,1199,1,0,0,0,317,1201,1,0,0,0,319,1203,1,0,0,0,321,1205,1,0,0,0,
323,1207,1,0,0,0,325,1209,1,0,0,0,327,1211,1,0,0,0,329,1213,1,0,0,0,331,
1215,1,0,0,0,333,1217,1,0,0,0,335,1219,1,0,0,0,337,1221,1,0,0,0,339,1223,
1,0,0,0,341,1225,1,0,0,0,343,1227,1,0,0,0,345,1229,1,0,0,0,347,1231,1,0,
0,0,349,1233,1,0,0,0,351,1235,1,0,0,0,353,1237,1,0,0,0,355,1239,1,0,0,0,
357,1241,1,0,0,0,359,1243,1,0,0,0,361,1245,1,0,0,0,363,1247,1,0,0,0,365,
1249,1,0,0,0,367,368,3,321,155,0,368,369,3,331,160,0,369,370,3,351,170,
0,370,371,3,351,170,0,371,372,3,323,156,0,372,373,3,319,154,0,373,374,3,
353,171,0,374,375,1,0,0,0,375,376,6,0,0,0,376,12,1,0,0,0,377,378,3,321,
155,0,378,379,3,349,169,0,379,380,3,343,166,0,380,381,3,345,167,0,381,382,
1,0,0,0,382,383,6,1,1,0,383,14,1,0,0,0,384,385,3,323,156,0,385,386,3,341,
165,0,386,387,3,349,169,0,387,388,3,331,160,0,388,389,3,319,154,0,389,390,
3,329,159,0,390,391,1,0,0,0,391,392,6,2,2,0,392,16,1,0,0,0,393,394,3,323,
156,0,394,395,3,357,173,0,395,396,3,315,152,0,396,397,3,337,163,0,397,398,
1,0,0,0,398,399,6,3,0,0,399,18,1,0,0,0,400,401,3,323,156,0,401,402,3,361,
175,0,402,403,3,345,167,0,403,404,3,337,163,0,404,405,3,315,152,0,405,406,
3,331,160,0,406,407,3,341,165,0,407,408,1,0,0,0,408,409,6,4,3,0,409,20,
1,0,0,0,410,411,3,325,157,0,411,412,3,349,169,0,412,413,3,343,166,0,413,
414,3,339,164,0,414,415,1,0,0,0,415,416,6,5,4,0,416,22,1,0,0,0,417,418,
3,327,158,0,418,419,3,349,169,0,419,420,3,343,166,0,420,421,3,335,162,0,
421,422,1,0,0,0,422,423,6,6,0,0,423,24,1,0,0,0,424,425,3,331,160,0,425,
426,3,341,165,0,426,427,3,337,163,0,427,428,3,331,160,0,428,429,3,341,165,
0,429,430,3,323,156,0,430,431,3,351,170,0,431,432,3,353,171,0,432,433,3,
315,152,0,433,434,3,353,171,0,434,435,3,351,170,0,435,436,1,0,0,0,436,437,
6,7,0,0,437,26,1,0,0,0,438,439,3,335,162,0,439,440,3,323,156,0,440,441,
3,323,156,0,441,442,3,345,167,0,442,443,1,0,0,0,443,444,6,8,1,0,444,28,
1,0,0,0,445,446,3,337,163,0,446,447,3,331,160,0,447,448,3,339,164,0,448,
449,3,331,160,0,449,450,3,353,171,0,450,451,1,0,0,0,451,452,6,9,0,0,452,
30,1,0,0,0,453,454,3,339,164,0,454,455,3,357,173,0,455,456,3,81,35,0,456,
457,3,323,156,0,457,458,3,361,175,0,458,459,3,345,167,0,459,460,3,315,152,
0,460,461,3,341,165,0,461,462,3,321,155,0,462,463,1,0,0,0,463,464,6,10,
5,0,464,32,1,0,0,0,465,466,3,349,169,0,466,467,3,323,156,0,467,468,3,341,
165,0,468,469,3,315,152,0,469,470,3,339,164,0,470,471,3,323,156,0,471,472,
1,0,0,0,472,473,6,11,6,0,473,34,1,0,0,0,474,475,3,349,169,0,475,476,3,343,
166,0,476,477,3,359,174,0,477,478,1,0,0,0,478,479,6,12,0,0,479,36,1,0,0,
0,480,481,3,351,170,0,481,482,3,329,159,0,482,483,3,343,166,0,483,484,3,
359,174,0,484,485,1,0,0,0,485,486,6,13,7,0,486,38,1,0,0,0,487,488,3,351,
170,0,488,489,3,343,166,0,489,490,3,349,169,0,490,491,3,353,171,0,491,492,
1,0,0,0,492,493,6,14,0,0,493,40,1,0,0,0,494,495,3,351,170,0,495,496,3,353,
171,0,496,497,3,315,152,0,497,498,3,353,171,0,498,499,3,351,170,0,499,500,
1,0,0,0,500,501,6,15,0,0,501,42,1,0,0,0,502,503,3,359,174,0,503,504,3,329,
159,0,504,505,3,323,156,0,505,506,3,349,169,0,506,507,3,323,156,0,507,508,
1,0,0,0,508,509,6,16,0,0,509,44,1,0,0,0,510,512,8,0,0,0,511,510,1,0,0,0,
512,513,1,0,0,0,513,511,1,0,0,0,513,514,1,0,0,0,514,515,1,0,0,0,515,516,
6,17,0,0,516,46,1,0,0,0,517,518,5,47,0,0,518,519,5,47,0,0,519,523,1,0,0,
0,520,522,8,1,0,0,521,520,1,0,0,0,522,525,1,0,0,0,523,521,1,0,0,0,523,524,
1,0,0,0,524,527,1,0,0,0,525,523,1,0,0,0,526,528,5,13,0,0,527,526,1,0,0,
0,527,528,1,0,0,0,528,530,1,0,0,0,529,531,5,10,0,0,530,529,1,0,0,0,530,
531,1,0,0,0,531,532,1,0,0,0,532,533,6,18,8,0,533,48,1,0,0,0,534,535,5,47,
0,0,535,536,5,42,0,0,536,541,1,0,0,0,537,540,3,49,19,0,538,540,9,0,0,0,
539,537,1,0,0,0,539,538,1,0,0,0,540,543,1,0,0,0,541,542,1,0,0,0,541,539,
1,0,0,0,542,544,1,0,0,0,543,541,1,0,0,0,544,545,5,42,0,0,545,546,5,47,0,
0,546,547,1,0,0,0,547,548,6,19,8,0,548,50,1,0,0,0,549,551,7,2,0,0,550,549,
1,0,0,0,551,552,1,0,0,0,552,550,1,0,0,0,552,553,1,0,0,0,553,554,1,0,0,0,
554,555,6,20,8,0,555,52,1,0,0,0,556,557,3,159,74,0,557,558,1,0,0,0,558,
559,6,21,9,0,559,560,6,21,10,0,560,54,1,0,0,0,561,562,3,63,26,0,562,563,
1,0,0,0,563,564,6,22,11,0,564,565,6,22,12,0,565,56,1,0,0,0,566,567,3,51,
20,0,567,568,1,0,0,0,568,569,6,23,8,0,569,58,1,0,0,0,570,571,3,47,18,0,
571,572,1,0,0,0,572,573,6,24,8,0,573,60,1,0,0,0,574,575,3,49,19,0,575,576,
1,0,0,0,576,577,6,25,8,0,577,62,1,0,0,0,578,579,5,124,0,0,579,580,1,0,0,
0,580,581,6,26,12,0,581,64,1,0,0,0,582,583,7,3,0,0,583,66,1,0,0,0,584,585,
7,4,0,0,585,68,1,0,0,0,586,587,5,92,0,0,587,588,7,5,0,0,588,70,1,0,0,0,
589,590,8,6,0,0,590,72,1,0,0,0,591,593,7,7,0,0,592,594,7,8,0,0,593,592,
1,0,0,0,593,594,1,0,0,0,594,596,1,0,0,0,595,597,3,65,27,0,596,595,1,0,0,
0,597,598,1,0,0,0,598,596,1,0,0,0,598,599,1,0,0,0,599,74,1,0,0,0,600,601,
5,64,0,0,601,76,1,0,0,0,602,603,5,96,0,0,603,78,1,0,0,0,604,608,8,9,0,0,
605,606,5,96,0,0,606,608,5,96,0,0,607,604,1,0,0,0,607,605,1,0,0,0,608,80,
1,0,0,0,609,610,5,95,0,0,610,82,1,0,0,0,611,615,3,67,28,0,612,615,3,65,
27,0,613,615,3,81,35,0,614,611,1,0,0,0,614,612,1,0,0,0,614,613,1,0,0,0,
615,84,1,0,0,0,616,621,5,34,0,0,617,620,3,69,29,0,618,620,3,71,30,0,619,
617,1,0,0,0,619,618,1,0,0,0,620,623,1,0,0,0,621,619,1,0,0,0,621,622,1,0,
0,0,622,624,1,0,0,0,623,621,1,0,0,0,624,646,5,34,0,0,625,626,5,34,0,0,626,
627,5,34,0,0,627,628,5,34,0,0,628,632,1,0,0,0,629,631,8,1,0,0,630,629,1,
0,0,0,631,634,1,0,0,0,632,633,1,0,0,0,632,630,1,0,0,0,633,635,1,0,0,0,634,
632,1,0,0,0,635,636,5,34,0,0,636,637,5,34,0,0,637,638,5,34,0,0,638,640,
1,0,0,0,639,641,5,34,0,0,640,639,1,0,0,0,640,641,1,0,0,0,641,643,1,0,0,
0,642,644,5,34,0,0,643,642,1,0,0,0,643,644,1,0,0,0,644,646,1,0,0,0,645,
616,1,0,0,0,645,625,1,0,0,0,646,86,1,0,0,0,647,649,3,65,27,0,648,647,1,
0,0,0,649,650,1,0,0,0,650,648,1,0,0,0,650,651,1,0,0,0,651,88,1,0,0,0,652,
654,3,65,27,0,653,652,1,0,0,0,654,655,1,0,0,0,655,653,1,0,0,0,655,656,1,
0,0,0,656,657,1,0,0,0,657,661,3,103,46,0,658,660,3,65,27,0,659,658,1,0,
0,0,660,663,1,0,0,0,661,659,1,0,0,0,661,662,1,0,0,0,662,695,1,0,0,0,663,
661,1,0,0,0,664,666,3,103,46,0,665,667,3,65,27,0,666,665,1,0,0,0,667,668,
1,0,0,0,668,666,1,0,0,0,668,669,1,0,0,0,669,695,1,0,0,0,670,672,3,65,27,
0,671,670,1,0,0,0,672,673,1,0,0,0,673,671,1,0,0,0,673,674,1,0,0,0,674,682,
1,0,0,0,675,679,3,103,46,0,676,678,3,65,27,0,677,676,1,0,0,0,678,681,1,
0,0,0,679,677,1,0,0,0,679,680,1,0,0,0,680,683,1,0,0,0,681,679,1,0,0,0,682,
675,1,0,0,0,682,683,1,0,0,0,683,684,1,0,0,0,684,685,3,73,31,0,685,695,1,
0,0,0,686,688,3,103,46,0,687,689,3,65,27,0,688,687,1,0,0,0,689,690,1,0,
0,0,690,688,1,0,0,0,690,691,1,0,0,0,691,692,1,0,0,0,692,693,3,73,31,0,693,
695,1,0,0,0,694,653,1,0,0,0,694,664,1,0,0,0,694,671,1,0,0,0,694,686,1,0,
0,0,695,90,1,0,0,0,696,697,3,317,153,0,697,698,3,363,176,0,698,92,1,0,0,
0,699,700,3,315,152,0,700,701,3,341,165,0,701,702,3,321,155,0,702,94,1,
0,0,0,703,704,3,315,152,0,704,705,3,351,170,0,705,706,3,319,154,0,706,96,
1,0,0,0,707,708,5,61,0,0,708,98,1,0,0,0,709,710,5,44,0,0,710,100,1,0,0,
0,711,712,3,321,155,0,712,713,3,323,156,0,713,714,3,351,170,0,714,715,3,
319,154,0,715,102,1,0,0,0,716,717,5,46,0,0,717,104,1,0,0,0,718,719,3,325,
157,0,719,720,3,315,152,0,720,721,3,337,163,0,721,722,3,351,170,0,722,723,
3,323,156,0,723,106,1,0,0,0,724,725,3,325,157,0,725,726,3,331,160,0,726,
727,3,349,169,0,727,728,3,351,170,0,728,729,3,353,171,0,729,108,1,0,0,0,
730,731,3,337,163,0,731,732,3,315,152,0,732,733,3,351,170,0,733,734,3,353,
171,0,734,110,1,0,0,0,735,736,5,40,0,0,736,112,1,0,0,0,737,738,3,331,160,
0,738,739,3,341,165,0,739,114,1,0,0,0,740,741,3,331,160,0,741,742,3,351,
170,0,742,116,1,0,0,0,743,744,3,337,163,0,744,745,3,331,160,0,745,746,3,
335,162,0,746,747,3,323,156,0,747,118,1,0,0,0,748,749,3,341,165,0,749,750,
3,343,166,0,750,751,3,353,171,0,751,120,1,0,0,0,752,753,3,341,165,0,753,
754,3,355,172,0,754,755,3,337,163,0,755,756,3,337,163,0,756,122,1,0,0,0,
757,758,3,341,165,0,758,759,3,355,172,0,759,760,3,337,163,0,760,761,3,337,
163,0,761,762,3,351,170,0,762,124,1,0,0,0,763,764,3,343,166,0,764,765,3,
349,169,0,765,126,1,0,0,0,766,767,5,63,0,0,767,128,1,0,0,0,768,769,3,349,
169,0,769,770,3,337,163,0,770,771,3,331,160,0,771,772,3,335,162,0,772,773,
3,323,156,0,773,130,1,0,0,0,774,775,5,41,0,0,775,132,1,0,0,0,776,777,3,
353,171,0,777,778,3,349,169,0,778,779,3,355,172,0,779,780,3,323,156,0,780,
134,1,0,0,0,781,782,5,61,0,0,782,783,5,61,0,0,783,136,1,0,0,0,784,785,5,
61,0,0,785,786,5,126,0,0,786,138,1,0,0,0,787,788,5,33,0,0,788,789,5,61,
0,0,789,140,1,0,0,0,790,791,5,60,0,0,791,142,1,0,0,0,792,793,5,60,0,0,793,
794,5,61,0,0,794,144,1,0,0,0,795,796,5,62,0,0,796,146,1,0,0,0,797,798,5,
62,0,0,798,799,5,61,0,0,799,148,1,0,0,0,800,801,5,43,0,0,801,150,1,0,0,
0,802,803,5,45,0,0,803,152,1,0,0,0,804,805,5,42,0,0,805,154,1,0,0,0,806,
807,5,47,0,0,807,156,1,0,0,0,808,809,5,37,0,0,809,158,1,0,0,0,810,811,5,
91,0,0,811,812,1,0,0,0,812,813,6,74,0,0,813,814,6,74,0,0,814,160,1,0,0,
0,815,816,5,93,0,0,816,817,1,0,0,0,817,818,6,75,12,0,818,819,6,75,12,0,
819,162,1,0,0,0,820,824,3,67,28,0,821,823,3,83,36,0,822,821,1,0,0,0,823,
826,1,0,0,0,824,822,1,0,0,0,824,825,1,0,0,0,825,837,1,0,0,0,826,824,1,0,
0,0,827,830,3,81,35,0,828,830,3,75,32,0,829,827,1,0,0,0,829,828,1,0,0,0,
830,832,1,0,0,0,831,833,3,83,36,0,832,831,1,0,0,0,833,834,1,0,0,0,834,832,
1,0,0,0,834,835,1,0,0,0,835,837,1,0,0,0,836,820,1,0,0,0,836,829,1,0,0,0,
837,164,1,0,0,0,838,840,3,77,33,0,839,841,3,79,34,0,840,839,1,0,0,0,841,
842,1,0,0,0,842,840,1,0,0,0,842,843,1,0,0,0,843,844,1,0,0,0,844,845,3,77,
33,0,845,166,1,0,0,0,846,847,3,165,77,0,847,168,1,0,0,0,848,849,3,47,18,
0,849,850,1,0,0,0,850,851,6,79,8,0,851,170,1,0,0,0,852,853,3,49,19,0,853,
854,1,0,0,0,854,855,6,80,8,0,855,172,1,0,0,0,856,857,3,51,20,0,857,858,
1,0,0,0,858,859,6,81,8,0,859,174,1,0,0,0,860,861,3,63,26,0,861,862,1,0,
0,0,862,863,6,82,11,0,863,864,6,82,12,0,864,176,1,0,0,0,865,866,3,159,74,
0,866,867,1,0,0,0,867,868,6,83,9,0,868,178,1,0,0,0,869,870,3,161,75,0,870,
871,1,0,0,0,871,872,6,84,13,0,872,180,1,0,0,0,873,874,3,99,44,0,874,875,
1,0,0,0,875,876,6,85,14,0,876,182,1,0,0,0,877,878,3,97,43,0,878,879,1,0,
0,0,879,880,6,86,15,0,880,184,1,0,0,0,881,882,3,339,164,0,882,883,3,323,
156,0,883,884,3,353,171,0,884,885,3,315,152,0,885,886,3,321,155,0,886,887,
3,315,152,0,887,888,3,353,171,0,888,889,3,315,152,0,889,186,1,0,0,0,890,
894,8,10,0,0,891,892,5,47,0,0,892,894,8,11,0,0,893,890,1,0,0,0,893,891,
1,0,0,0,894,188,1,0,0,0,895,897,3,187,88,0,896,895,1,0,0,0,897,898,1,0,
0,0,898,896,1,0,0,0,898,899,1,0,0,0,899,190,1,0,0,0,900,901,3,167,78,0,
901,902,1,0,0,0,902,903,6,90,16,0,903,192,1,0,0,0,904,905,3,47,18,0,905,
906,1,0,0,0,906,907,6,91,8,0,907,194,1,0,0,0,908,909,3,49,19,0,909,910,
1,0,0,0,910,911,6,92,8,0,911,196,1,0,0,0,912,913,3,51,20,0,913,914,1,0,
0,0,914,915,6,93,8,0,915,198,1,0,0,0,916,917,3,63,26,0,917,918,1,0,0,0,
918,919,6,94,11,0,919,920,6,94,12,0,920,200,1,0,0,0,921,922,3,103,46,0,
922,923,1,0,0,0,923,924,6,95,17,0,924,202,1,0,0,0,925,926,3,99,44,0,926,
927,1,0,0,0,927,928,6,96,14,0,928,204,1,0,0,0,929,934,3,67,28,0,930,934,
3,65,27,0,931,934,3,81,35,0,932,934,3,153,71,0,933,929,1,0,0,0,933,930,
1,0,0,0,933,931,1,0,0,0,933,932,1,0,0,0,934,206,1,0,0,0,935,938,3,67,28,
0,936,938,3,153,71,0,937,935,1,0,0,0,937,936,1,0,0,0,938,942,1,0,0,0,939,
941,3,205,97,0,940,939,1,0,0,0,941,944,1,0,0,0,942,940,1,0,0,0,942,943,
1,0,0,0,943,955,1,0,0,0,944,942,1,0,0,0,945,948,3,81,35,0,946,948,3,75,
32,0,947,945,1,0,0,0,947,946,1,0,0,0,948,950,1,0,0,0,949,951,3,205,97,0,
950,949,1,0,0,0,951,952,1,0,0,0,952,950,1,0,0,0,952,953,1,0,0,0,953,955,
1,0,0,0,954,937,1,0,0,0,954,947,1,0,0,0,955,208,1,0,0,0,956,959,3,207,98,
0,957,959,3,165,77,0,958,956,1,0,0,0,958,957,1,0,0,0,959,960,1,0,0,0,960,
958,1,0,0,0,960,961,1,0,0,0,961,210,1,0,0,0,962,963,3,47,18,0,963,964,1,
0,0,0,964,965,6,100,8,0,965,212,1,0,0,0,966,967,3,49,19,0,967,968,1,0,0,
0,968,969,6,101,8,0,969,214,1,0,0,0,970,971,3,51,20,0,971,972,1,0,0,0,972,
973,6,102,8,0,973,216,1,0,0,0,974,975,3,63,26,0,975,976,1,0,0,0,976,977,
6,103,11,0,977,978,6,103,12,0,978,218,1,0,0,0,979,980,3,97,43,0,980,981,
1,0,0,0,981,982,6,104,15,0,982,220,1,0,0,0,983,984,3,99,44,0,984,985,1,
0,0,0,985,986,6,105,14,0,986,222,1,0,0,0,987,988,3,103,46,0,988,989,1,0,
0,0,989,990,6,106,17,0,990,224,1,0,0,0,991,992,3,315,152,0,992,993,3,351,
170,0,993,226,1,0,0,0,994,995,3,209,99,0,995,996,1,0,0,0,996,997,6,108,
18,0,997,228,1,0,0,0,998,999,3,47,18,0,999,1000,1,0,0,0,1000,1001,6,109,
8,0,1001,230,1,0,0,0,1002,1003,3,49,19,0,1003,1004,1,0,0,0,1004,1005,6,
110,8,0,1005,232,1,0,0,0,1006,1007,3,51,20,0,1007,1008,1,0,0,0,1008,1009,
6,111,8,0,1009,234,1,0,0,0,1010,1011,3,63,26,0,1011,1012,1,0,0,0,1012,1013,
6,112,11,0,1013,1014,6,112,12,0,1014,236,1,0,0,0,1015,1016,3,159,74,0,1016,
1017,1,0,0,0,1017,1018,6,113,9,0,1018,1019,6,113,19,0,1019,238,1,0,0,0,
1020,1021,3,343,166,0,1021,1022,3,341,165,0,1022,1023,1,0,0,0,1023,1024,
6,114,20,0,1024,240,1,0,0,0,1025,1026,3,359,174,0,1026,1027,3,331,160,0,
1027,1028,3,353,171,0,1028,1029,3,329,159,0,1029,1030,1,0,0,0,1030,1031,
6,115,20,0,1031,242,1,0,0,0,1032,1033,8,12,0,0,1033,244,1,0,0,0,1034,1036,
3,243,116,0,1035,1034,1,0,0,0,1036,1037,1,0,0,0,1037,1035,1,0,0,0,1037,
1038,1,0,0,0,1038,1039,1,0,0,0,1039,1040,3,305,147,0,1040,1042,1,0,0,0,
1041,1035,1,0,0,0,1041,1042,1,0,0,0,1042,1044,1,0,0,0,1043,1045,3,243,116,
0,1044,1043,1,0,0,0,1045,1046,1,0,0,0,1046,1044,1,0,0,0,1046,1047,1,0,0,
0,1047,246,1,0,0,0,1048,1049,3,167,78,0,1049,1050,1,0,0,0,1050,1051,6,118,
16,0,1051,248,1,0,0,0,1052,1053,3,245,117,0,1053,1054,1,0,0,0,1054,1055,
6,119,21,0,1055,250,1,0,0,0,1056,1057,3,47,18,0,1057,1058,1,0,0,0,1058,
1059,6,120,8,0,1059,252,1,0,0,0,1060,1061,3,49,19,0,1061,1062,1,0,0,0,1062,
1063,6,121,8,0,1063,254,1,0,0,0,1064,1065,3,51,20,0,1065,1066,1,0,0,0,1066,
1067,6,122,8,0,1067,256,1,0,0,0,1068,1069,3,63,26,0,1069,1070,1,0,0,0,1070,
1071,6,123,11,0,1071,1072,6,123,12,0,1072,1073,6,123,12,0,1073,258,1,0,
0,0,1074,1075,3,97,43,0,1075,1076,1,0,0,0,1076,1077,6,124,15,0,1077,260,
1,0,0,0,1078,1079,3,99,44,0,1079,1080,1,0,0,0,1080,1081,6,125,14,0,1081,
262,1,0,0,0,1082,1083,3,103,46,0,1083,1084,1,0,0,0,1084,1085,6,126,17,0,
1085,264,1,0,0,0,1086,1087,3,241,115,0,1087,1088,1,0,0,0,1088,1089,6,127,
22,0,1089,266,1,0,0,0,1090,1091,3,209,99,0,1091,1092,1,0,0,0,1092,1093,
6,128,18,0,1093,268,1,0,0,0,1094,1095,3,167,78,0,1095,1096,1,0,0,0,1096,
1097,6,129,16,0,1097,270,1,0,0,0,1098,1099,3,47,18,0,1099,1100,1,0,0,0,
1100,1101,6,130,8,0,1101,272,1,0,0,0,1102,1103,3,49,19,0,1103,1104,1,0,
0,0,1104,1105,6,131,8,0,1105,274,1,0,0,0,1106,1107,3,51,20,0,1107,1108,
1,0,0,0,1108,1109,6,132,8,0,1109,276,1,0,0,0,1110,1111,3,63,26,0,1111,1112,
1,0,0,0,1112,1113,6,133,11,0,1113,1114,6,133,12,0,1114,278,1,0,0,0,1115,
1116,3,103,46,0,1116,1117,1,0,0,0,1117,1118,6,134,17,0,1118,280,1,0,0,0,
1119,1120,3,167,78,0,1120,1121,1,0,0,0,1121,1122,6,135,16,0,1122,282,1,
0,0,0,1123,1124,3,163,76,0,1124,1125,1,0,0,0,1125,1126,6,136,23,0,1126,
284,1,0,0,0,1127,1128,3,47,18,0,1128,1129,1,0,0,0,1129,1130,6,137,8,0,1130,
286,1,0,0,0,1131,1132,3,49,19,0,1132,1133,1,0,0,0,1133,1134,6,138,8,0,1134,
288,1,0,0,0,1135,1136,3,51,20,0,1136,1137,1,0,0,0,1137,1138,6,139,8,0,1138,
290,1,0,0,0,1139,1140,3,63,26,0,1140,1141,1,0,0,0,1141,1142,6,140,11,0,
1142,1143,6,140,12,0,1143,292,1,0,0,0,1144,1145,3,331,160,0,1145,1146,3,
341,165,0,1146,1147,3,325,157,0,1147,1148,3,343,166,0,1148,294,1,0,0,0,
1149,1150,3,325,157,0,1150,1151,3,355,172,0,1151,1152,3,341,165,0,1152,
1153,3,319,154,0,1153,1154,3,353,171,0,1154,1155,3,331,160,0,1155,1156,
3,343,166,0,1156,1157,3,341,165,0,1157,1158,3,351,170,0,1158,296,1,0,0,
0,1159,1160,3,47,18,0,1160,1161,1,0,0,0,1161,1162,6,143,8,0,1162,298,1,
0,0,0,1163,1164,3,49,19,0,1164,1165,1,0,0,0,1165,1166,6,144,8,0,1166,300,
1,0,0,0,1167,1168,3,51,20,0,1168,1169,1,0,0,0,1169,1170,6,145,8,0,1170,
302,1,0,0,0,1171,1172,3,161,75,0,1172,1173,1,0,0,0,1173,1174,6,146,13,0,
1174,1175,6,146,12,0,1175,304,1,0,0,0,1176,1177,5,58,0,0,1177,306,1,0,0,
0,1178,1184,3,75,32,0,1179,1184,3,65,27,0,1180,1184,3,103,46,0,1181,1184,
3,67,28,0,1182,1184,3,81,35,0,1183,1178,1,0,0,0,1183,1179,1,0,0,0,1183,
1180,1,0,0,0,1183,1181,1,0,0,0,1183,1182,1,0,0,0,1184,1185,1,0,0,0,1185,
1183,1,0,0,0,1185,1186,1,0,0,0,1186,308,1,0,0,0,1187,1188,3,47,18,0,1188,
1189,1,0,0,0,1189,1190,6,149,8,0,1190,310,1,0,0,0,1191,1192,3,49,19,0,1192,
1193,1,0,0,0,1193,1194,6,150,8,0,1194,312,1,0,0,0,1195,1196,3,51,20,0,1196,
1197,1,0,0,0,1197,1198,6,151,8,0,1198,314,1,0,0,0,1199,1200,7,13,0,0,1200,
316,1,0,0,0,1201,1202,7,14,0,0,1202,318,1,0,0,0,1203,1204,7,15,0,0,1204,
320,1,0,0,0,1205,1206,7,16,0,0,1206,322,1,0,0,0,1207,1208,7,7,0,0,1208,
324,1,0,0,0,1209,1210,7,17,0,0,1210,326,1,0,0,0,1211,1212,7,18,0,0,1212,
328,1,0,0,0,1213,1214,7,19,0,0,1214,330,1,0,0,0,1215,1216,7,20,0,0,1216,
332,1,0,0,0,1217,1218,7,21,0,0,1218,334,1,0,0,0,1219,1220,7,22,0,0,1220,
336,1,0,0,0,1221,1222,7,23,0,0,1222,338,1,0,0,0,1223,1224,7,24,0,0,1224,
340,1,0,0,0,1225,1226,7,25,0,0,1226,342,1,0,0,0,1227,1228,7,26,0,0,1228,
344,1,0,0,0,1229,1230,7,27,0,0,1230,346,1,0,0,0,1231,1232,7,28,0,0,1232,
348,1,0,0,0,1233,1234,7,29,0,0,1234,350,1,0,0,0,1235,1236,7,30,0,0,1236,
352,1,0,0,0,1237,1238,7,31,0,0,1238,354,1,0,0,0,1239,1240,7,32,0,0,1240,
356,1,0,0,0,1241,1242,7,33,0,0,1242,358,1,0,0,0,1243,1244,7,34,0,0,1244,
360,1,0,0,0,1245,1246,7,35,0,0,1246,362,1,0,0,0,1247,1248,7,36,0,0,1248,
364,1,0,0,0,1249,1250,7,37,0,0,1250,366,1,0,0,0,57,0,1,2,3,4,5,6,7,8,9,
10,513,523,527,530,539,541,552,593,598,607,614,619,621,632,640,643,645,
650,655,661,668,673,679,682,690,694,824,829,834,836,842,893,898,933,937,
942,947,952,954,958,960,1037,1041,1046,1183,1185,24,5,2,0,5,4,0,5,6,0,5,
1,0,5,3,0,5,8,0,5,5,0,5,9,0,0,1,0,7,63,0,5,0,0,7,25,0,4,0,0,7,64,0,7,33,
0,7,32,0,7,66,0,7,35,0,7,75,0,5,10,0,5,7,0,7,85,0,7,84,0,7,65,0];
146,2,147,7,147,2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,
1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,
1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,
1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,
1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,
11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,
1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,
15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,17,4,17,460,8,17,11,17,12,
17,461,1,17,1,17,1,18,1,18,1,18,1,18,5,18,470,8,18,10,18,12,18,473,9,18,
1,18,3,18,476,8,18,1,18,3,18,479,8,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,
5,19,488,8,19,10,19,12,19,491,9,19,1,19,1,19,1,19,1,19,1,19,1,20,4,20,499,
8,20,11,20,12,20,500,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,
1,22,1,22,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,
26,1,26,1,26,1,26,1,27,1,27,1,28,1,28,1,29,1,29,1,29,1,30,1,30,1,31,1,31,
3,31,542,8,31,1,31,4,31,545,8,31,11,31,12,31,546,1,32,1,32,1,33,1,33,1,
34,1,34,1,34,3,34,556,8,34,1,35,1,35,1,36,1,36,1,36,3,36,563,8,36,1,37,
1,37,1,37,5,37,568,8,37,10,37,12,37,571,9,37,1,37,1,37,1,37,1,37,1,37,1,
37,5,37,579,8,37,10,37,12,37,582,9,37,1,37,1,37,1,37,1,37,1,37,3,37,589,
8,37,1,37,3,37,592,8,37,3,37,594,8,37,1,38,4,38,597,8,38,11,38,12,38,598,
1,39,4,39,602,8,39,11,39,12,39,603,1,39,1,39,5,39,608,8,39,10,39,12,39,
611,9,39,1,39,1,39,4,39,615,8,39,11,39,12,39,616,1,39,4,39,620,8,39,11,
39,12,39,621,1,39,1,39,5,39,626,8,39,10,39,12,39,629,9,39,3,39,631,8,39,
1,39,1,39,1,39,1,39,4,39,637,8,39,11,39,12,39,638,1,39,1,39,3,39,643,8,
39,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,42,1,43,1,43,1,44,
1,44,1,45,1,45,1,45,1,45,1,45,1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,
48,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,51,1,51,
1,51,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,55,1,
55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,58,1,58,
1,59,1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,61,1,61,1,61,1,61,1,61,1,62,1,
62,1,62,1,63,1,63,1,63,1,64,1,64,1,64,1,65,1,65,1,66,1,66,1,66,1,67,1,67,
1,68,1,68,1,68,1,69,1,69,1,70,1,70,1,71,1,71,1,72,1,72,1,73,1,73,1,74,1,
74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75,1,76,1,76,5,76,771,8,76,10,76,
12,76,774,9,76,1,76,1,76,3,76,778,8,76,1,76,4,76,781,8,76,11,76,12,76,782,
3,76,785,8,76,1,77,1,77,4,77,789,8,77,11,77,12,77,790,1,77,1,77,1,78,1,
78,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1,81,1,81,1,81,1,81,1,82,1,82,
1,82,1,82,1,82,1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,
85,1,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,87,1,87,1,87,1,87,1,88,
1,88,1,88,3,88,842,8,88,1,89,4,89,845,8,89,11,89,12,89,846,1,90,1,90,1,
90,1,90,1,91,1,91,1,91,1,91,1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,94,
1,94,1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,97,1,97,1,
97,1,97,3,97,882,8,97,1,98,1,98,3,98,886,8,98,1,98,5,98,889,8,98,10,98,
12,98,892,9,98,1,98,1,98,3,98,896,8,98,1,98,4,98,899,8,98,11,98,12,98,900,
3,98,903,8,98,1,99,1,99,4,99,907,8,99,11,99,12,99,908,1,100,1,100,1,100,
1,100,1,101,1,101,1,101,1,101,1,102,1,102,1,102,1,102,1,103,1,103,1,103,
1,103,1,103,1,104,1,104,1,104,1,104,1,105,1,105,1,105,1,105,1,106,1,106,
1,106,1,106,1,107,1,107,1,107,1,108,1,108,1,108,1,108,1,109,1,109,1,109,
1,109,1,110,1,110,1,110,1,110,1,111,1,111,1,111,1,111,1,112,1,112,1,112,
1,112,1,112,1,113,1,113,1,113,1,113,1,113,1,114,1,114,1,114,1,114,1,114,
1,115,1,115,1,115,1,115,1,115,1,115,1,115,1,116,1,116,1,117,4,117,984,8,
117,11,117,12,117,985,1,117,1,117,3,117,990,8,117,1,117,4,117,993,8,117,
11,117,12,117,994,1,118,1,118,1,118,1,118,1,119,1,119,1,119,1,119,1,120,
1,120,1,120,1,120,1,121,1,121,1,121,1,121,1,122,1,122,1,122,1,122,1,123,
1,123,1,123,1,123,1,123,1,123,1,124,1,124,1,124,1,124,1,125,1,125,1,125,
1,125,1,126,1,126,1,126,1,126,1,127,1,127,1,127,1,127,1,128,1,128,1,128,
1,128,1,129,1,129,1,129,1,129,1,130,1,130,1,130,1,130,1,131,1,131,1,131,
1,131,1,132,1,132,1,132,1,132,1,133,1,133,1,133,1,133,1,133,1,134,1,134,
1,134,1,134,1,135,1,135,1,135,1,135,1,136,1,136,1,136,1,136,1,137,1,137,
1,137,1,137,1,138,1,138,1,138,1,138,1,139,1,139,1,139,1,139,1,140,1,140,
1,140,1,140,1,140,1,141,1,141,1,141,1,141,1,141,1,142,1,142,1,142,1,142,
1,142,1,142,1,142,1,142,1,142,1,142,1,143,1,143,1,143,1,143,1,144,1,144,
1,144,1,144,1,145,1,145,1,145,1,145,1,146,1,146,1,146,1,146,1,146,1,147,
1,147,1,148,1,148,1,148,1,148,1,148,4,148,1132,8,148,11,148,12,148,1133,
1,149,1,149,1,149,1,149,1,150,1,150,1,150,1,150,1,151,1,151,1,151,1,151,
2,489,580,0,152,11,1,13,2,15,3,17,4,19,5,21,6,23,7,25,8,27,9,29,10,31,11,
33,12,35,13,37,14,39,15,41,16,43,17,45,18,47,19,49,20,51,21,53,0,55,0,57,
22,59,23,61,24,63,25,65,0,67,0,69,0,71,0,73,0,75,0,77,0,79,0,81,0,83,0,
85,26,87,27,89,28,91,29,93,30,95,31,97,32,99,33,101,34,103,35,105,36,107,
37,109,38,111,39,113,40,115,41,117,42,119,43,121,44,123,45,125,46,127,47,
129,48,131,49,133,50,135,51,137,52,139,53,141,54,143,55,145,56,147,57,149,
58,151,59,153,60,155,61,157,62,159,63,161,64,163,65,165,0,167,66,169,67,
171,68,173,69,175,0,177,0,179,0,181,0,183,0,185,70,187,0,189,71,191,0,193,
72,195,73,197,74,199,0,201,0,203,0,205,0,207,0,209,75,211,76,213,77,215,
78,217,0,219,0,221,0,223,0,225,79,227,0,229,80,231,81,233,82,235,0,237,
0,239,83,241,84,243,0,245,85,247,0,249,0,251,86,253,87,255,88,257,0,259,
0,261,0,263,0,265,0,267,0,269,0,271,89,273,90,275,91,277,0,279,0,281,0,
283,0,285,92,287,93,289,94,291,0,293,95,295,96,297,97,299,98,301,99,303,
0,305,100,307,101,309,102,311,103,313,104,11,0,1,2,3,4,5,6,7,8,9,10,35,
2,0,68,68,100,100,2,0,73,73,105,105,2,0,83,83,115,115,2,0,69,69,101,101,
2,0,67,67,99,99,2,0,84,84,116,116,2,0,82,82,114,114,2,0,79,79,111,111,2,
0,80,80,112,112,2,0,78,78,110,110,2,0,72,72,104,104,2,0,86,86,118,118,2,
0,65,65,97,97,2,0,76,76,108,108,2,0,88,88,120,120,2,0,70,70,102,102,2,0,
77,77,109,109,2,0,71,71,103,103,2,0,75,75,107,107,2,0,87,87,119,119,6,0,
9,10,13,13,32,32,47,47,91,91,93,93,2,0,10,10,13,13,3,0,9,10,13,13,32,32,
1,0,48,57,2,0,65,90,97,122,8,0,34,34,78,78,82,82,84,84,92,92,110,110,114,
114,116,116,4,0,10,10,13,13,34,34,92,92,2,0,43,43,45,45,1,0,96,96,2,0,66,
66,98,98,2,0,89,89,121,121,2,0,85,85,117,117,10,0,9,10,13,13,32,32,44,44,
47,47,61,61,91,91,93,93,96,96,124,124,2,0,42,42,47,47,11,0,9,10,13,13,32,
32,34,35,44,44,47,47,58,58,60,60,62,63,92,92,124,124,1175,0,11,1,0,0,0,
0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,
0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,
0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,
0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,1,53,1,0,0,0,1,55,1,0,0,0,
1,57,1,0,0,0,1,59,1,0,0,0,1,61,1,0,0,0,2,63,1,0,0,0,2,85,1,0,0,0,2,87,1,
0,0,0,2,89,1,0,0,0,2,91,1,0,0,0,2,93,1,0,0,0,2,95,1,0,0,0,2,97,1,0,0,0,
2,99,1,0,0,0,2,101,1,0,0,0,2,103,1,0,0,0,2,105,1,0,0,0,2,107,1,0,0,0,2,
109,1,0,0,0,2,111,1,0,0,0,2,113,1,0,0,0,2,115,1,0,0,0,2,117,1,0,0,0,2,119,
1,0,0,0,2,121,1,0,0,0,2,123,1,0,0,0,2,125,1,0,0,0,2,127,1,0,0,0,2,129,1,
0,0,0,2,131,1,0,0,0,2,133,1,0,0,0,2,135,1,0,0,0,2,137,1,0,0,0,2,139,1,0,
0,0,2,141,1,0,0,0,2,143,1,0,0,0,2,145,1,0,0,0,2,147,1,0,0,0,2,149,1,0,0,
0,2,151,1,0,0,0,2,153,1,0,0,0,2,155,1,0,0,0,2,157,1,0,0,0,2,159,1,0,0,0,
2,161,1,0,0,0,2,163,1,0,0,0,2,167,1,0,0,0,2,169,1,0,0,0,2,171,1,0,0,0,2,
173,1,0,0,0,3,175,1,0,0,0,3,177,1,0,0,0,3,179,1,0,0,0,3,181,1,0,0,0,3,183,
1,0,0,0,3,185,1,0,0,0,3,189,1,0,0,0,3,191,1,0,0,0,3,193,1,0,0,0,3,195,1,
0,0,0,3,197,1,0,0,0,4,199,1,0,0,0,4,201,1,0,0,0,4,203,1,0,0,0,4,209,1,0,
0,0,4,211,1,0,0,0,4,213,1,0,0,0,4,215,1,0,0,0,5,217,1,0,0,0,5,219,1,0,0,
0,5,221,1,0,0,0,5,223,1,0,0,0,5,225,1,0,0,0,5,227,1,0,0,0,5,229,1,0,0,0,
5,231,1,0,0,0,5,233,1,0,0,0,6,235,1,0,0,0,6,237,1,0,0,0,6,239,1,0,0,0,6,
241,1,0,0,0,6,245,1,0,0,0,6,247,1,0,0,0,6,249,1,0,0,0,6,251,1,0,0,0,6,253,
1,0,0,0,6,255,1,0,0,0,7,257,1,0,0,0,7,259,1,0,0,0,7,261,1,0,0,0,7,263,1,
0,0,0,7,265,1,0,0,0,7,267,1,0,0,0,7,269,1,0,0,0,7,271,1,0,0,0,7,273,1,0,
0,0,7,275,1,0,0,0,8,277,1,0,0,0,8,279,1,0,0,0,8,281,1,0,0,0,8,283,1,0,0,
0,8,285,1,0,0,0,8,287,1,0,0,0,8,289,1,0,0,0,9,291,1,0,0,0,9,293,1,0,0,0,
9,295,1,0,0,0,9,297,1,0,0,0,9,299,1,0,0,0,9,301,1,0,0,0,10,303,1,0,0,0,
10,305,1,0,0,0,10,307,1,0,0,0,10,309,1,0,0,0,10,311,1,0,0,0,10,313,1,0,
0,0,11,315,1,0,0,0,13,325,1,0,0,0,15,332,1,0,0,0,17,341,1,0,0,0,19,348,
1,0,0,0,21,358,1,0,0,0,23,365,1,0,0,0,25,372,1,0,0,0,27,386,1,0,0,0,29,
393,1,0,0,0,31,401,1,0,0,0,33,413,1,0,0,0,35,422,1,0,0,0,37,428,1,0,0,0,
39,435,1,0,0,0,41,442,1,0,0,0,43,450,1,0,0,0,45,459,1,0,0,0,47,465,1,0,
0,0,49,482,1,0,0,0,51,498,1,0,0,0,53,504,1,0,0,0,55,509,1,0,0,0,57,514,
1,0,0,0,59,518,1,0,0,0,61,522,1,0,0,0,63,526,1,0,0,0,65,530,1,0,0,0,67,
532,1,0,0,0,69,534,1,0,0,0,71,537,1,0,0,0,73,539,1,0,0,0,75,548,1,0,0,0,
77,550,1,0,0,0,79,555,1,0,0,0,81,557,1,0,0,0,83,562,1,0,0,0,85,593,1,0,
0,0,87,596,1,0,0,0,89,642,1,0,0,0,91,644,1,0,0,0,93,647,1,0,0,0,95,651,
1,0,0,0,97,655,1,0,0,0,99,657,1,0,0,0,101,659,1,0,0,0,103,664,1,0,0,0,105,
666,1,0,0,0,107,672,1,0,0,0,109,678,1,0,0,0,111,683,1,0,0,0,113,685,1,0,
0,0,115,688,1,0,0,0,117,691,1,0,0,0,119,696,1,0,0,0,121,700,1,0,0,0,123,
705,1,0,0,0,125,711,1,0,0,0,127,714,1,0,0,0,129,716,1,0,0,0,131,722,1,0,
0,0,133,724,1,0,0,0,135,729,1,0,0,0,137,732,1,0,0,0,139,735,1,0,0,0,141,
738,1,0,0,0,143,740,1,0,0,0,145,743,1,0,0,0,147,745,1,0,0,0,149,748,1,0,
0,0,151,750,1,0,0,0,153,752,1,0,0,0,155,754,1,0,0,0,157,756,1,0,0,0,159,
758,1,0,0,0,161,763,1,0,0,0,163,784,1,0,0,0,165,786,1,0,0,0,167,794,1,0,
0,0,169,796,1,0,0,0,171,800,1,0,0,0,173,804,1,0,0,0,175,808,1,0,0,0,177,
813,1,0,0,0,179,817,1,0,0,0,181,821,1,0,0,0,183,825,1,0,0,0,185,829,1,0,
0,0,187,841,1,0,0,0,189,844,1,0,0,0,191,848,1,0,0,0,193,852,1,0,0,0,195,
856,1,0,0,0,197,860,1,0,0,0,199,864,1,0,0,0,201,869,1,0,0,0,203,873,1,0,
0,0,205,881,1,0,0,0,207,902,1,0,0,0,209,906,1,0,0,0,211,910,1,0,0,0,213,
914,1,0,0,0,215,918,1,0,0,0,217,922,1,0,0,0,219,927,1,0,0,0,221,931,1,0,
0,0,223,935,1,0,0,0,225,939,1,0,0,0,227,942,1,0,0,0,229,946,1,0,0,0,231,
950,1,0,0,0,233,954,1,0,0,0,235,958,1,0,0,0,237,963,1,0,0,0,239,968,1,0,
0,0,241,973,1,0,0,0,243,980,1,0,0,0,245,989,1,0,0,0,247,996,1,0,0,0,249,
1000,1,0,0,0,251,1004,1,0,0,0,253,1008,1,0,0,0,255,1012,1,0,0,0,257,1016,
1,0,0,0,259,1022,1,0,0,0,261,1026,1,0,0,0,263,1030,1,0,0,0,265,1034,1,0,
0,0,267,1038,1,0,0,0,269,1042,1,0,0,0,271,1046,1,0,0,0,273,1050,1,0,0,0,
275,1054,1,0,0,0,277,1058,1,0,0,0,279,1063,1,0,0,0,281,1067,1,0,0,0,283,
1071,1,0,0,0,285,1075,1,0,0,0,287,1079,1,0,0,0,289,1083,1,0,0,0,291,1087,
1,0,0,0,293,1092,1,0,0,0,295,1097,1,0,0,0,297,1107,1,0,0,0,299,1111,1,0,
0,0,301,1115,1,0,0,0,303,1119,1,0,0,0,305,1124,1,0,0,0,307,1131,1,0,0,0,
309,1135,1,0,0,0,311,1139,1,0,0,0,313,1143,1,0,0,0,315,316,7,0,0,0,316,
317,7,1,0,0,317,318,7,2,0,0,318,319,7,2,0,0,319,320,7,3,0,0,320,321,7,4,
0,0,321,322,7,5,0,0,322,323,1,0,0,0,323,324,6,0,0,0,324,12,1,0,0,0,325,
326,7,0,0,0,326,327,7,6,0,0,327,328,7,7,0,0,328,329,7,8,0,0,329,330,1,0,
0,0,330,331,6,1,1,0,331,14,1,0,0,0,332,333,7,3,0,0,333,334,7,9,0,0,334,
335,7,6,0,0,335,336,7,1,0,0,336,337,7,4,0,0,337,338,7,10,0,0,338,339,1,
0,0,0,339,340,6,2,2,0,340,16,1,0,0,0,341,342,7,3,0,0,342,343,7,11,0,0,343,
344,7,12,0,0,344,345,7,13,0,0,345,346,1,0,0,0,346,347,6,3,0,0,347,18,1,
0,0,0,348,349,7,3,0,0,349,350,7,14,0,0,350,351,7,8,0,0,351,352,7,13,0,0,
352,353,7,12,0,0,353,354,7,1,0,0,354,355,7,9,0,0,355,356,1,0,0,0,356,357,
6,4,3,0,357,20,1,0,0,0,358,359,7,15,0,0,359,360,7,6,0,0,360,361,7,7,0,0,
361,362,7,16,0,0,362,363,1,0,0,0,363,364,6,5,4,0,364,22,1,0,0,0,365,366,
7,17,0,0,366,367,7,6,0,0,367,368,7,7,0,0,368,369,7,18,0,0,369,370,1,0,0,
0,370,371,6,6,0,0,371,24,1,0,0,0,372,373,7,1,0,0,373,374,7,9,0,0,374,375,
7,13,0,0,375,376,7,1,0,0,376,377,7,9,0,0,377,378,7,3,0,0,378,379,7,2,0,
0,379,380,7,5,0,0,380,381,7,12,0,0,381,382,7,5,0,0,382,383,7,2,0,0,383,
384,1,0,0,0,384,385,6,7,0,0,385,26,1,0,0,0,386,387,7,18,0,0,387,388,7,3,
0,0,388,389,7,3,0,0,389,390,7,8,0,0,390,391,1,0,0,0,391,392,6,8,1,0,392,
28,1,0,0,0,393,394,7,13,0,0,394,395,7,1,0,0,395,396,7,16,0,0,396,397,7,
1,0,0,397,398,7,5,0,0,398,399,1,0,0,0,399,400,6,9,0,0,400,30,1,0,0,0,401,
402,7,16,0,0,402,403,7,11,0,0,403,404,5,95,0,0,404,405,7,3,0,0,405,406,
7,14,0,0,406,407,7,8,0,0,407,408,7,12,0,0,408,409,7,9,0,0,409,410,7,0,0,
0,410,411,1,0,0,0,411,412,6,10,5,0,412,32,1,0,0,0,413,414,7,6,0,0,414,415,
7,3,0,0,415,416,7,9,0,0,416,417,7,12,0,0,417,418,7,16,0,0,418,419,7,3,0,
0,419,420,1,0,0,0,420,421,6,11,6,0,421,34,1,0,0,0,422,423,7,6,0,0,423,424,
7,7,0,0,424,425,7,19,0,0,425,426,1,0,0,0,426,427,6,12,0,0,427,36,1,0,0,
0,428,429,7,2,0,0,429,430,7,10,0,0,430,431,7,7,0,0,431,432,7,19,0,0,432,
433,1,0,0,0,433,434,6,13,7,0,434,38,1,0,0,0,435,436,7,2,0,0,436,437,7,7,
0,0,437,438,7,6,0,0,438,439,7,5,0,0,439,440,1,0,0,0,440,441,6,14,0,0,441,
40,1,0,0,0,442,443,7,2,0,0,443,444,7,5,0,0,444,445,7,12,0,0,445,446,7,5,
0,0,446,447,7,2,0,0,447,448,1,0,0,0,448,449,6,15,0,0,449,42,1,0,0,0,450,
451,7,19,0,0,451,452,7,10,0,0,452,453,7,3,0,0,453,454,7,6,0,0,454,455,7,
3,0,0,455,456,1,0,0,0,456,457,6,16,0,0,457,44,1,0,0,0,458,460,8,20,0,0,
459,458,1,0,0,0,460,461,1,0,0,0,461,459,1,0,0,0,461,462,1,0,0,0,462,463,
1,0,0,0,463,464,6,17,0,0,464,46,1,0,0,0,465,466,5,47,0,0,466,467,5,47,0,
0,467,471,1,0,0,0,468,470,8,21,0,0,469,468,1,0,0,0,470,473,1,0,0,0,471,
469,1,0,0,0,471,472,1,0,0,0,472,475,1,0,0,0,473,471,1,0,0,0,474,476,5,13,
0,0,475,474,1,0,0,0,475,476,1,0,0,0,476,478,1,0,0,0,477,479,5,10,0,0,478,
477,1,0,0,0,478,479,1,0,0,0,479,480,1,0,0,0,480,481,6,18,8,0,481,48,1,0,
0,0,482,483,5,47,0,0,483,484,5,42,0,0,484,489,1,0,0,0,485,488,3,49,19,0,
486,488,9,0,0,0,487,485,1,0,0,0,487,486,1,0,0,0,488,491,1,0,0,0,489,490,
1,0,0,0,489,487,1,0,0,0,490,492,1,0,0,0,491,489,1,0,0,0,492,493,5,42,0,
0,493,494,5,47,0,0,494,495,1,0,0,0,495,496,6,19,8,0,496,50,1,0,0,0,497,
499,7,22,0,0,498,497,1,0,0,0,499,500,1,0,0,0,500,498,1,0,0,0,500,501,1,
0,0,0,501,502,1,0,0,0,502,503,6,20,8,0,503,52,1,0,0,0,504,505,3,159,74,
0,505,506,1,0,0,0,506,507,6,21,9,0,507,508,6,21,10,0,508,54,1,0,0,0,509,
510,3,63,26,0,510,511,1,0,0,0,511,512,6,22,11,0,512,513,6,22,12,0,513,56,
1,0,0,0,514,515,3,51,20,0,515,516,1,0,0,0,516,517,6,23,8,0,517,58,1,0,0,
0,518,519,3,47,18,0,519,520,1,0,0,0,520,521,6,24,8,0,521,60,1,0,0,0,522,
523,3,49,19,0,523,524,1,0,0,0,524,525,6,25,8,0,525,62,1,0,0,0,526,527,5,
124,0,0,527,528,1,0,0,0,528,529,6,26,12,0,529,64,1,0,0,0,530,531,7,23,0,
0,531,66,1,0,0,0,532,533,7,24,0,0,533,68,1,0,0,0,534,535,5,92,0,0,535,536,
7,25,0,0,536,70,1,0,0,0,537,538,8,26,0,0,538,72,1,0,0,0,539,541,7,3,0,0,
540,542,7,27,0,0,541,540,1,0,0,0,541,542,1,0,0,0,542,544,1,0,0,0,543,545,
3,65,27,0,544,543,1,0,0,0,545,546,1,0,0,0,546,544,1,0,0,0,546,547,1,0,0,
0,547,74,1,0,0,0,548,549,5,64,0,0,549,76,1,0,0,0,550,551,5,96,0,0,551,78,
1,0,0,0,552,556,8,28,0,0,553,554,5,96,0,0,554,556,5,96,0,0,555,552,1,0,
0,0,555,553,1,0,0,0,556,80,1,0,0,0,557,558,5,95,0,0,558,82,1,0,0,0,559,
563,3,67,28,0,560,563,3,65,27,0,561,563,3,81,35,0,562,559,1,0,0,0,562,560,
1,0,0,0,562,561,1,0,0,0,563,84,1,0,0,0,564,569,5,34,0,0,565,568,3,69,29,
0,566,568,3,71,30,0,567,565,1,0,0,0,567,566,1,0,0,0,568,571,1,0,0,0,569,
567,1,0,0,0,569,570,1,0,0,0,570,572,1,0,0,0,571,569,1,0,0,0,572,594,5,34,
0,0,573,574,5,34,0,0,574,575,5,34,0,0,575,576,5,34,0,0,576,580,1,0,0,0,
577,579,8,21,0,0,578,577,1,0,0,0,579,582,1,0,0,0,580,581,1,0,0,0,580,578,
1,0,0,0,581,583,1,0,0,0,582,580,1,0,0,0,583,584,5,34,0,0,584,585,5,34,0,
0,585,586,5,34,0,0,586,588,1,0,0,0,587,589,5,34,0,0,588,587,1,0,0,0,588,
589,1,0,0,0,589,591,1,0,0,0,590,592,5,34,0,0,591,590,1,0,0,0,591,592,1,
0,0,0,592,594,1,0,0,0,593,564,1,0,0,0,593,573,1,0,0,0,594,86,1,0,0,0,595,
597,3,65,27,0,596,595,1,0,0,0,597,598,1,0,0,0,598,596,1,0,0,0,598,599,1,
0,0,0,599,88,1,0,0,0,600,602,3,65,27,0,601,600,1,0,0,0,602,603,1,0,0,0,
603,601,1,0,0,0,603,604,1,0,0,0,604,605,1,0,0,0,605,609,3,103,46,0,606,
608,3,65,27,0,607,606,1,0,0,0,608,611,1,0,0,0,609,607,1,0,0,0,609,610,1,
0,0,0,610,643,1,0,0,0,611,609,1,0,0,0,612,614,3,103,46,0,613,615,3,65,27,
0,614,613,1,0,0,0,615,616,1,0,0,0,616,614,1,0,0,0,616,617,1,0,0,0,617,643,
1,0,0,0,618,620,3,65,27,0,619,618,1,0,0,0,620,621,1,0,0,0,621,619,1,0,0,
0,621,622,1,0,0,0,622,630,1,0,0,0,623,627,3,103,46,0,624,626,3,65,27,0,
625,624,1,0,0,0,626,629,1,0,0,0,627,625,1,0,0,0,627,628,1,0,0,0,628,631,
1,0,0,0,629,627,1,0,0,0,630,623,1,0,0,0,630,631,1,0,0,0,631,632,1,0,0,0,
632,633,3,73,31,0,633,643,1,0,0,0,634,636,3,103,46,0,635,637,3,65,27,0,
636,635,1,0,0,0,637,638,1,0,0,0,638,636,1,0,0,0,638,639,1,0,0,0,639,640,
1,0,0,0,640,641,3,73,31,0,641,643,1,0,0,0,642,601,1,0,0,0,642,612,1,0,0,
0,642,619,1,0,0,0,642,634,1,0,0,0,643,90,1,0,0,0,644,645,7,29,0,0,645,646,
7,30,0,0,646,92,1,0,0,0,647,648,7,12,0,0,648,649,7,9,0,0,649,650,7,0,0,
0,650,94,1,0,0,0,651,652,7,12,0,0,652,653,7,2,0,0,653,654,7,4,0,0,654,96,
1,0,0,0,655,656,5,61,0,0,656,98,1,0,0,0,657,658,5,44,0,0,658,100,1,0,0,
0,659,660,7,0,0,0,660,661,7,3,0,0,661,662,7,2,0,0,662,663,7,4,0,0,663,102,
1,0,0,0,664,665,5,46,0,0,665,104,1,0,0,0,666,667,7,15,0,0,667,668,7,12,
0,0,668,669,7,13,0,0,669,670,7,2,0,0,670,671,7,3,0,0,671,106,1,0,0,0,672,
673,7,15,0,0,673,674,7,1,0,0,674,675,7,6,0,0,675,676,7,2,0,0,676,677,7,
5,0,0,677,108,1,0,0,0,678,679,7,13,0,0,679,680,7,12,0,0,680,681,7,2,0,0,
681,682,7,5,0,0,682,110,1,0,0,0,683,684,5,40,0,0,684,112,1,0,0,0,685,686,
7,1,0,0,686,687,7,9,0,0,687,114,1,0,0,0,688,689,7,1,0,0,689,690,7,2,0,0,
690,116,1,0,0,0,691,692,7,13,0,0,692,693,7,1,0,0,693,694,7,18,0,0,694,695,
7,3,0,0,695,118,1,0,0,0,696,697,7,9,0,0,697,698,7,7,0,0,698,699,7,5,0,0,
699,120,1,0,0,0,700,701,7,9,0,0,701,702,7,31,0,0,702,703,7,13,0,0,703,704,
7,13,0,0,704,122,1,0,0,0,705,706,7,9,0,0,706,707,7,31,0,0,707,708,7,13,
0,0,708,709,7,13,0,0,709,710,7,2,0,0,710,124,1,0,0,0,711,712,7,7,0,0,712,
713,7,6,0,0,713,126,1,0,0,0,714,715,5,63,0,0,715,128,1,0,0,0,716,717,7,
6,0,0,717,718,7,13,0,0,718,719,7,1,0,0,719,720,7,18,0,0,720,721,7,3,0,0,
721,130,1,0,0,0,722,723,5,41,0,0,723,132,1,0,0,0,724,725,7,5,0,0,725,726,
7,6,0,0,726,727,7,31,0,0,727,728,7,3,0,0,728,134,1,0,0,0,729,730,5,61,0,
0,730,731,5,61,0,0,731,136,1,0,0,0,732,733,5,61,0,0,733,734,5,126,0,0,734,
138,1,0,0,0,735,736,5,33,0,0,736,737,5,61,0,0,737,140,1,0,0,0,738,739,5,
60,0,0,739,142,1,0,0,0,740,741,5,60,0,0,741,742,5,61,0,0,742,144,1,0,0,
0,743,744,5,62,0,0,744,146,1,0,0,0,745,746,5,62,0,0,746,747,5,61,0,0,747,
148,1,0,0,0,748,749,5,43,0,0,749,150,1,0,0,0,750,751,5,45,0,0,751,152,1,
0,0,0,752,753,5,42,0,0,753,154,1,0,0,0,754,755,5,47,0,0,755,156,1,0,0,0,
756,757,5,37,0,0,757,158,1,0,0,0,758,759,5,91,0,0,759,760,1,0,0,0,760,761,
6,74,0,0,761,762,6,74,0,0,762,160,1,0,0,0,763,764,5,93,0,0,764,765,1,0,
0,0,765,766,6,75,12,0,766,767,6,75,12,0,767,162,1,0,0,0,768,772,3,67,28,
0,769,771,3,83,36,0,770,769,1,0,0,0,771,774,1,0,0,0,772,770,1,0,0,0,772,
773,1,0,0,0,773,785,1,0,0,0,774,772,1,0,0,0,775,778,3,81,35,0,776,778,3,
75,32,0,777,775,1,0,0,0,777,776,1,0,0,0,778,780,1,0,0,0,779,781,3,83,36,
0,780,779,1,0,0,0,781,782,1,0,0,0,782,780,1,0,0,0,782,783,1,0,0,0,783,785,
1,0,0,0,784,768,1,0,0,0,784,777,1,0,0,0,785,164,1,0,0,0,786,788,3,77,33,
0,787,789,3,79,34,0,788,787,1,0,0,0,789,790,1,0,0,0,790,788,1,0,0,0,790,
791,1,0,0,0,791,792,1,0,0,0,792,793,3,77,33,0,793,166,1,0,0,0,794,795,3,
165,77,0,795,168,1,0,0,0,796,797,3,47,18,0,797,798,1,0,0,0,798,799,6,79,
8,0,799,170,1,0,0,0,800,801,3,49,19,0,801,802,1,0,0,0,802,803,6,80,8,0,
803,172,1,0,0,0,804,805,3,51,20,0,805,806,1,0,0,0,806,807,6,81,8,0,807,
174,1,0,0,0,808,809,3,63,26,0,809,810,1,0,0,0,810,811,6,82,11,0,811,812,
6,82,12,0,812,176,1,0,0,0,813,814,3,159,74,0,814,815,1,0,0,0,815,816,6,
83,9,0,816,178,1,0,0,0,817,818,3,161,75,0,818,819,1,0,0,0,819,820,6,84,
13,0,820,180,1,0,0,0,821,822,3,99,44,0,822,823,1,0,0,0,823,824,6,85,14,
0,824,182,1,0,0,0,825,826,3,97,43,0,826,827,1,0,0,0,827,828,6,86,15,0,828,
184,1,0,0,0,829,830,7,16,0,0,830,831,7,3,0,0,831,832,7,5,0,0,832,833,7,
12,0,0,833,834,7,0,0,0,834,835,7,12,0,0,835,836,7,5,0,0,836,837,7,12,0,
0,837,186,1,0,0,0,838,842,8,32,0,0,839,840,5,47,0,0,840,842,8,33,0,0,841,
838,1,0,0,0,841,839,1,0,0,0,842,188,1,0,0,0,843,845,3,187,88,0,844,843,
1,0,0,0,845,846,1,0,0,0,846,844,1,0,0,0,846,847,1,0,0,0,847,190,1,0,0,0,
848,849,3,167,78,0,849,850,1,0,0,0,850,851,6,90,16,0,851,192,1,0,0,0,852,
853,3,47,18,0,853,854,1,0,0,0,854,855,6,91,8,0,855,194,1,0,0,0,856,857,
3,49,19,0,857,858,1,0,0,0,858,859,6,92,8,0,859,196,1,0,0,0,860,861,3,51,
20,0,861,862,1,0,0,0,862,863,6,93,8,0,863,198,1,0,0,0,864,865,3,63,26,0,
865,866,1,0,0,0,866,867,6,94,11,0,867,868,6,94,12,0,868,200,1,0,0,0,869,
870,3,103,46,0,870,871,1,0,0,0,871,872,6,95,17,0,872,202,1,0,0,0,873,874,
3,99,44,0,874,875,1,0,0,0,875,876,6,96,14,0,876,204,1,0,0,0,877,882,3,67,
28,0,878,882,3,65,27,0,879,882,3,81,35,0,880,882,3,153,71,0,881,877,1,0,
0,0,881,878,1,0,0,0,881,879,1,0,0,0,881,880,1,0,0,0,882,206,1,0,0,0,883,
886,3,67,28,0,884,886,3,153,71,0,885,883,1,0,0,0,885,884,1,0,0,0,886,890,
1,0,0,0,887,889,3,205,97,0,888,887,1,0,0,0,889,892,1,0,0,0,890,888,1,0,
0,0,890,891,1,0,0,0,891,903,1,0,0,0,892,890,1,0,0,0,893,896,3,81,35,0,894,
896,3,75,32,0,895,893,1,0,0,0,895,894,1,0,0,0,896,898,1,0,0,0,897,899,3,
205,97,0,898,897,1,0,0,0,899,900,1,0,0,0,900,898,1,0,0,0,900,901,1,0,0,
0,901,903,1,0,0,0,902,885,1,0,0,0,902,895,1,0,0,0,903,208,1,0,0,0,904,907,
3,207,98,0,905,907,3,165,77,0,906,904,1,0,0,0,906,905,1,0,0,0,907,908,1,
0,0,0,908,906,1,0,0,0,908,909,1,0,0,0,909,210,1,0,0,0,910,911,3,47,18,0,
911,912,1,0,0,0,912,913,6,100,8,0,913,212,1,0,0,0,914,915,3,49,19,0,915,
916,1,0,0,0,916,917,6,101,8,0,917,214,1,0,0,0,918,919,3,51,20,0,919,920,
1,0,0,0,920,921,6,102,8,0,921,216,1,0,0,0,922,923,3,63,26,0,923,924,1,0,
0,0,924,925,6,103,11,0,925,926,6,103,12,0,926,218,1,0,0,0,927,928,3,97,
43,0,928,929,1,0,0,0,929,930,6,104,15,0,930,220,1,0,0,0,931,932,3,99,44,
0,932,933,1,0,0,0,933,934,6,105,14,0,934,222,1,0,0,0,935,936,3,103,46,0,
936,937,1,0,0,0,937,938,6,106,17,0,938,224,1,0,0,0,939,940,7,12,0,0,940,
941,7,2,0,0,941,226,1,0,0,0,942,943,3,209,99,0,943,944,1,0,0,0,944,945,
6,108,18,0,945,228,1,0,0,0,946,947,3,47,18,0,947,948,1,0,0,0,948,949,6,
109,8,0,949,230,1,0,0,0,950,951,3,49,19,0,951,952,1,0,0,0,952,953,6,110,
8,0,953,232,1,0,0,0,954,955,3,51,20,0,955,956,1,0,0,0,956,957,6,111,8,0,
957,234,1,0,0,0,958,959,3,63,26,0,959,960,1,0,0,0,960,961,6,112,11,0,961,
962,6,112,12,0,962,236,1,0,0,0,963,964,3,159,74,0,964,965,1,0,0,0,965,966,
6,113,9,0,966,967,6,113,19,0,967,238,1,0,0,0,968,969,7,7,0,0,969,970,7,
9,0,0,970,971,1,0,0,0,971,972,6,114,20,0,972,240,1,0,0,0,973,974,7,19,0,
0,974,975,7,1,0,0,975,976,7,5,0,0,976,977,7,10,0,0,977,978,1,0,0,0,978,
979,6,115,20,0,979,242,1,0,0,0,980,981,8,34,0,0,981,244,1,0,0,0,982,984,
3,243,116,0,983,982,1,0,0,0,984,985,1,0,0,0,985,983,1,0,0,0,985,986,1,0,
0,0,986,987,1,0,0,0,987,988,3,305,147,0,988,990,1,0,0,0,989,983,1,0,0,0,
989,990,1,0,0,0,990,992,1,0,0,0,991,993,3,243,116,0,992,991,1,0,0,0,993,
994,1,0,0,0,994,992,1,0,0,0,994,995,1,0,0,0,995,246,1,0,0,0,996,997,3,167,
78,0,997,998,1,0,0,0,998,999,6,118,16,0,999,248,1,0,0,0,1000,1001,3,245,
117,0,1001,1002,1,0,0,0,1002,1003,6,119,21,0,1003,250,1,0,0,0,1004,1005,
3,47,18,0,1005,1006,1,0,0,0,1006,1007,6,120,8,0,1007,252,1,0,0,0,1008,1009,
3,49,19,0,1009,1010,1,0,0,0,1010,1011,6,121,8,0,1011,254,1,0,0,0,1012,1013,
3,51,20,0,1013,1014,1,0,0,0,1014,1015,6,122,8,0,1015,256,1,0,0,0,1016,1017,
3,63,26,0,1017,1018,1,0,0,0,1018,1019,6,123,11,0,1019,1020,6,123,12,0,1020,
1021,6,123,12,0,1021,258,1,0,0,0,1022,1023,3,97,43,0,1023,1024,1,0,0,0,
1024,1025,6,124,15,0,1025,260,1,0,0,0,1026,1027,3,99,44,0,1027,1028,1,0,
0,0,1028,1029,6,125,14,0,1029,262,1,0,0,0,1030,1031,3,103,46,0,1031,1032,
1,0,0,0,1032,1033,6,126,17,0,1033,264,1,0,0,0,1034,1035,3,241,115,0,1035,
1036,1,0,0,0,1036,1037,6,127,22,0,1037,266,1,0,0,0,1038,1039,3,209,99,0,
1039,1040,1,0,0,0,1040,1041,6,128,18,0,1041,268,1,0,0,0,1042,1043,3,167,
78,0,1043,1044,1,0,0,0,1044,1045,6,129,16,0,1045,270,1,0,0,0,1046,1047,
3,47,18,0,1047,1048,1,0,0,0,1048,1049,6,130,8,0,1049,272,1,0,0,0,1050,1051,
3,49,19,0,1051,1052,1,0,0,0,1052,1053,6,131,8,0,1053,274,1,0,0,0,1054,1055,
3,51,20,0,1055,1056,1,0,0,0,1056,1057,6,132,8,0,1057,276,1,0,0,0,1058,1059,
3,63,26,0,1059,1060,1,0,0,0,1060,1061,6,133,11,0,1061,1062,6,133,12,0,1062,
278,1,0,0,0,1063,1064,3,103,46,0,1064,1065,1,0,0,0,1065,1066,6,134,17,0,
1066,280,1,0,0,0,1067,1068,3,167,78,0,1068,1069,1,0,0,0,1069,1070,6,135,
16,0,1070,282,1,0,0,0,1071,1072,3,163,76,0,1072,1073,1,0,0,0,1073,1074,
6,136,23,0,1074,284,1,0,0,0,1075,1076,3,47,18,0,1076,1077,1,0,0,0,1077,
1078,6,137,8,0,1078,286,1,0,0,0,1079,1080,3,49,19,0,1080,1081,1,0,0,0,1081,
1082,6,138,8,0,1082,288,1,0,0,0,1083,1084,3,51,20,0,1084,1085,1,0,0,0,1085,
1086,6,139,8,0,1086,290,1,0,0,0,1087,1088,3,63,26,0,1088,1089,1,0,0,0,1089,
1090,6,140,11,0,1090,1091,6,140,12,0,1091,292,1,0,0,0,1092,1093,7,1,0,0,
1093,1094,7,9,0,0,1094,1095,7,15,0,0,1095,1096,7,7,0,0,1096,294,1,0,0,0,
1097,1098,7,15,0,0,1098,1099,7,31,0,0,1099,1100,7,9,0,0,1100,1101,7,4,0,
0,1101,1102,7,5,0,0,1102,1103,7,1,0,0,1103,1104,7,7,0,0,1104,1105,7,9,0,
0,1105,1106,7,2,0,0,1106,296,1,0,0,0,1107,1108,3,47,18,0,1108,1109,1,0,
0,0,1109,1110,6,143,8,0,1110,298,1,0,0,0,1111,1112,3,49,19,0,1112,1113,
1,0,0,0,1113,1114,6,144,8,0,1114,300,1,0,0,0,1115,1116,3,51,20,0,1116,1117,
1,0,0,0,1117,1118,6,145,8,0,1118,302,1,0,0,0,1119,1120,3,161,75,0,1120,
1121,1,0,0,0,1121,1122,6,146,13,0,1122,1123,6,146,12,0,1123,304,1,0,0,0,
1124,1125,5,58,0,0,1125,306,1,0,0,0,1126,1132,3,75,32,0,1127,1132,3,65,
27,0,1128,1132,3,103,46,0,1129,1132,3,67,28,0,1130,1132,3,81,35,0,1131,
1126,1,0,0,0,1131,1127,1,0,0,0,1131,1128,1,0,0,0,1131,1129,1,0,0,0,1131,
1130,1,0,0,0,1132,1133,1,0,0,0,1133,1131,1,0,0,0,1133,1134,1,0,0,0,1134,
308,1,0,0,0,1135,1136,3,47,18,0,1136,1137,1,0,0,0,1137,1138,6,149,8,0,1138,
310,1,0,0,0,1139,1140,3,49,19,0,1140,1141,1,0,0,0,1141,1142,6,150,8,0,1142,
312,1,0,0,0,1143,1144,3,51,20,0,1144,1145,1,0,0,0,1145,1146,6,151,8,0,1146,
314,1,0,0,0,57,0,1,2,3,4,5,6,7,8,9,10,461,471,475,478,487,489,500,541,546,
555,562,567,569,580,588,591,593,598,603,609,616,621,627,630,638,642,772,
777,782,784,790,841,846,881,885,890,895,900,902,906,908,985,989,994,1131,
1133,24,5,2,0,5,4,0,5,6,0,5,1,0,5,3,0,5,8,0,5,5,0,5,9,0,0,1,0,7,63,0,5,
0,0,7,25,0,4,0,0,7,64,0,7,33,0,7,32,0,7,66,0,7,35,0,7,75,0,5,10,0,5,7,0,
7,85,0,7,84,0,7,65,0];
private static __ATN: ATN;
public static get _ATN(): ATN {

View file

@ -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
@ -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'
'=='
'=~'
'!='
@ -69,6 +69,21 @@ null
null
null
null
'metadata'
null
null
null
null
null
null
null
null
'as'
null
null
null
'on'
'with'
null
null
null
@ -79,23 +94,8 @@ null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
'info'
'functions'
null
null
null

View file

@ -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
@ -123,4 +156,10 @@ UNQUOTED_ID_PATTERN=105
'/'=61
'%'=62
']'=64
'metadata'=70
'as'=79
'on'=83
'with'=84
'info'=95
'functions'=96
':'=100

View file

@ -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,
"'on'", "'with'",
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,
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",

View file

@ -350,14 +350,14 @@ describe('validation logic', () => {
['eval', 'stats', 'rename', 'limit', 'keep', 'drop', 'mv_expand', 'dissect', 'grok'].map(
(command) =>
testErrorsAndWarnings(command, [
`SyntaxError: mismatched input '${command}' expecting {EXPLAIN, FROM, ROW, SHOW}`,
`SyntaxError: mismatched input '${command}' expecting {'explain', 'from', 'row', 'show'}`,
])
);
});
describe('from', () => {
testErrorsAndWarnings('f', [
"SyntaxError: mismatched input 'f' expecting {EXPLAIN, FROM, ROW, SHOW}",
"SyntaxError: mismatched input 'f' expecting {'explain', 'from', 'row', 'show'}",
]);
testErrorsAndWarnings(`from `, [
"SyntaxError: missing {QUOTED_IDENTIFIER, FROM_UNQUOTED_IDENTIFIER} at '<EOF>'",
@ -445,7 +445,7 @@ describe('validation logic', () => {
describe('row', () => {
testErrorsAndWarnings('row', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('row missing_column', ['Unknown column [missing_column]']);
testErrorsAndWarnings('row fn()', ['Unknown function [fn]']);
@ -474,7 +474,7 @@ describe('validation logic', () => {
"SyntaxError: mismatched input '<EOF>' expecting '('",
]);
testErrorsAndWarnings('row var = 1 in (', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
'Error: [in] function expects exactly 2 arguments, got 1.',
]);
testErrorsAndWarnings('row var = 1 not in ', [
@ -717,16 +717,16 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from index | keep `any#Char$Field`', []);
testErrorsAndWarnings('from index | project ', [
"SyntaxError: mismatched input 'project' expecting {DISSECT, DROP, ENRICH, EVAL, GROK, INLINESTATS, KEEP, LIMIT, MV_EXPAND, RENAME, SORT, STATS, WHERE}",
"SyntaxError: mismatched input 'project' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'mv_expand', 'rename', 'sort', 'stats', 'where'}",
]);
testErrorsAndWarnings('from index | project stringField, numberField, dateField', [
"SyntaxError: mismatched input 'project' expecting {DISSECT, DROP, ENRICH, EVAL, GROK, INLINESTATS, KEEP, LIMIT, MV_EXPAND, RENAME, SORT, STATS, WHERE}",
"SyntaxError: mismatched input 'project' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'mv_expand', 'rename', 'sort', 'stats', 'where'}",
]);
testErrorsAndWarnings('from index | PROJECT stringField, numberField, dateField', [
"SyntaxError: mismatched input 'PROJECT' expecting {DISSECT, DROP, ENRICH, EVAL, GROK, INLINESTATS, KEEP, LIMIT, MV_EXPAND, RENAME, SORT, STATS, WHERE}",
"SyntaxError: mismatched input 'PROJECT' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'mv_expand', 'rename', 'sort', 'stats', 'where'}",
]);
testErrorsAndWarnings('from index | project missingField, numberField, dateField', [
"SyntaxError: mismatched input 'project' expecting {DISSECT, DROP, ENRICH, EVAL, GROK, INLINESTATS, KEEP, LIMIT, MV_EXPAND, RENAME, SORT, STATS, WHERE}",
"SyntaxError: mismatched input 'project' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'inlinestats', 'keep', 'limit', 'mv_expand', 'rename', 'sort', 'stats', 'where'}",
]);
testErrorsAndWarnings('from index | keep s*', []);
testErrorsAndWarnings('from index | keep *Field', []);
@ -823,10 +823,10 @@ describe('validation logic', () => {
"SyntaxError: mismatched input '<EOF>' expecting ID_PATTERN",
]);
testErrorsAndWarnings('from a_index | rename stringField', [
"SyntaxError: mismatched input '<EOF>' expecting AS",
"SyntaxError: mismatched input '<EOF>' expecting 'as'",
]);
testErrorsAndWarnings('from a_index | rename a', [
"SyntaxError: mismatched input '<EOF>' expecting AS",
"SyntaxError: mismatched input '<EOF>' expecting 'as'",
'Unknown column [a]',
]);
testErrorsAndWarnings('from a_index | rename stringField as', [
@ -869,7 +869,7 @@ describe('validation logic', () => {
describe('dissect', () => {
testErrorsAndWarnings('from a_index | dissect', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | dissect stringField', [
"SyntaxError: missing STRING at '<EOF>'",
@ -894,7 +894,7 @@ describe('validation logic', () => {
"SyntaxError: mismatched input '<EOF>' expecting '='",
]);
testErrorsAndWarnings('from a_index | dissect stringField "%{firstWord}" option = ', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, NULL, '?', TRUE, '+', '-', OPENING_BRACKET}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', 'null', '?', 'true', '+', '-', OPENING_BRACKET}",
'Invalid option for DISSECT: [option]',
]);
testErrorsAndWarnings('from a_index | dissect stringField "%{firstWord}" option = 1', [
@ -920,7 +920,7 @@ describe('validation logic', () => {
describe('grok', () => {
testErrorsAndWarnings('from a_index | grok', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | grok stringField', [
"SyntaxError: missing STRING at '<EOF>'",
@ -993,7 +993,7 @@ describe('validation logic', () => {
}
for (const wrongOp of ['*', '/', '%']) {
testErrorsAndWarnings(`from a_index | where ${wrongOp}+ numberField`, [
`SyntaxError: extraneous input '${wrongOp}' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}`,
`SyntaxError: extraneous input '${wrongOp}' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}`,
]);
}
@ -1159,7 +1159,7 @@ describe('validation logic', () => {
describe('eval', () => {
testErrorsAndWarnings('from a_index | eval ', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | eval stringField ', []);
testErrorsAndWarnings('from a_index | eval b = stringField', []);
@ -1172,7 +1172,7 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | eval a=b', ['Unknown column [b]']);
testErrorsAndWarnings('from a_index | eval a=b, ', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
'Unknown column [b]',
]);
testErrorsAndWarnings('from a_index | eval a=round', ['Unknown column [round]']);
@ -1181,7 +1181,7 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | eval a=round(numberField) ', []);
testErrorsAndWarnings('from a_index | eval a=round(numberField), ', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | eval a=round(numberField) + round(numberField) ', []);
testErrorsAndWarnings('from a_index | eval a=round(numberField) + round(stringField) ', [
@ -1241,7 +1241,7 @@ describe('validation logic', () => {
for (const wrongOp of ['*', '/', '%']) {
testErrorsAndWarnings(`from a_index | eval ${wrongOp}+ numberField`, [
`SyntaxError: extraneous input '${wrongOp}' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}`,
`SyntaxError: extraneous input '${wrongOp}' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}`,
]);
}
@ -1592,11 +1592,11 @@ describe('validation logic', () => {
[]
);
testErrorsAndWarnings('from a_index | eval not', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
'Error: [not] function expects exactly one argument, got 0.',
]);
testErrorsAndWarnings('from a_index | eval in', [
"SyntaxError: mismatched input 'in' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input 'in' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | eval stringField in stringField', [
@ -1665,16 +1665,16 @@ describe('validation logic', () => {
]);
testErrorsAndWarnings('from a_index | stats by stringField', []);
testErrorsAndWarnings('from a_index | stats by ', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | stats numberField ', [
'Expected an aggregate function or group but got [numberField] of type [FieldAttribute]',
]);
testErrorsAndWarnings('from a_index | stats numberField=', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | stats numberField=5 by ', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | stats avg(numberField) by wrongField', [
'Unknown column [wrongField]',
@ -2074,19 +2074,19 @@ describe('validation logic', () => {
describe('sort', () => {
testErrorsAndWarnings('from a_index | sort ', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | sort "field" ', []);
testErrorsAndWarnings('from a_index | sort wrongField ', ['Unknown column [wrongField]']);
testErrorsAndWarnings('from a_index | sort numberField, ', [
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, FALSE, '(', NOT, NULL, '?', TRUE, '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
"SyntaxError: mismatched input '<EOF>' expecting {STRING, INTEGER_LITERAL, DECIMAL_LITERAL, 'false', '(', 'not', 'null', '?', 'true', '+', '-', OPENING_BRACKET, UNQUOTED_IDENTIFIER, QUOTED_IDENTIFIER}",
]);
testErrorsAndWarnings('from a_index | sort numberField, stringField', []);
for (const dir of ['desc', 'asc']) {
testErrorsAndWarnings(`from a_index | sort "field" ${dir} `, []);
testErrorsAndWarnings(`from a_index | sort numberField ${dir} `, []);
testErrorsAndWarnings(`from a_index | sort numberField ${dir} nulls `, [
"SyntaxError: missing {FIRST, LAST} at '<EOF>'",
"SyntaxError: missing {'first', 'last'} at '<EOF>'",
]);
for (const nullDir of ['first', 'last']) {
testErrorsAndWarnings(`from a_index | sort numberField ${dir} nulls ${nullDir}`, []);