Skip to content

Commit

Permalink
feature: 🍺 Class with inheritance support (#187)
Browse files Browse the repository at this point in the history
* 🍺 Add class with inheritance :money: support

* 🚢 add proxy env for class instance member invocation

* 🚢 fix test

* 🚢 fix test
  • Loading branch information
shivasurya authored Feb 1, 2025
1 parent 239922a commit 17b5623
Show file tree
Hide file tree
Showing 13 changed files with 2,322 additions and 663 deletions.
25 changes: 19 additions & 6 deletions sourcecode-parser/antlr/Query.g4
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
grammar Query;

query: predicate_declarations? FROM select_list (WHERE expression)? SELECT select_clause;
query: class_declarations? predicate_declarations? FROM select_list (WHERE expression)? SELECT select_clause;

class_declarations: class_declaration+;
class_declaration: 'class' class_name '{' method_declarations '}';
class_name: IDENTIFIER;
method_declarations: method_declaration+;
method_declaration: return_type method_name '(' parameter_list? ')' '{' method_body '}';
method_name: IDENTIFIER;
method_body: return_statement;
return_statement: 'result' '=' value;
return_type: type;

predicate_declarations: predicate_declaration+;
predicate_declaration: PREDICATE predicate_name '(' parameter_list? ')' '{' expression '}';
predicate_name: IDENTIFIER;
parameter_list: parameter (',' parameter)*;
parameter: type IDENTIFIER;
parameter: (type | class_name) IDENTIFIER;
type: IDENTIFIER;

select_list: select_item (',' select_item)*;
select_item: entity AS alias;
select_item: (entity | class_name) AS alias;
entity: IDENTIFIER;
alias: IDENTIFIER;

expression: orExpression;
orExpression: andExpression ( '||' andExpression )*;
andExpression: equalityExpression ( '&&' equalityExpression )*;
Expand All @@ -20,8 +33,8 @@ additiveExpression: multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpre
multiplicativeExpression: unaryExpression ( ( '*' | '/' ) unaryExpression )*;
unaryExpression: ( '!' | '-' ) unaryExpression | primary;
primary: operand | predicate_invocation | '(' expression ')';
operand: value | variable | alias '.' method_chain | '[' value_list ']';
method_chain: (alias '.')? method_or_variable ('.' method_or_variable)*;
operand: value | variable | alias '.' method_chain | class_name '.' method_chain | '[' value_list ']';
method_chain: (class_name '.')? method_name '(' argument_list? ')';
method_or_variable: method_invocation | variable | predicate_invocation;
method_invocation: IDENTIFIER '(' argument_list? ')';
variable: IDENTIFIER;
Expand All @@ -43,4 +56,4 @@ WHERE: 'WHERE';
AS: 'AS';
SELECT: 'SELECT';
IDENTIFIER: [a-zA-Z_][a-zA-Z0-9_]*;
WS: [ \t\r\n]+ -> skip;
WS: [ \t\r\n]+ -> skip;
21 changes: 18 additions & 3 deletions sourcecode-parser/antlr/Query.interp

Large diffs are not rendered by default.

84 changes: 45 additions & 39 deletions sourcecode-parser/antlr/Query.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,48 @@ T__20=21
T__21=22
T__22=23
T__23=24
STRING=25
STRING_WITH_WILDCARD=26
NUMBER=27
PREDICATE=28
FROM=29
WHERE=30
AS=31
SELECT=32
IDENTIFIER=33
WS=34
'('=1
')'=2
'{'=3
'}'=4
','=5
'||'=6
'&&'=7
'=='=8
'!='=9
'<'=10
'>'=11
'<='=12
'>='=13
' in '=14
'+'=15
'-'=16
'*'=17
'/'=18
'!'=19
'.'=20
'['=21
']'=22
'LIKE'=23
'in'=24
'predicate'=28
'FROM'=29
'WHERE'=30
'AS'=31
'SELECT'=32
T__24=25
T__25=26
T__26=27
STRING=28
STRING_WITH_WILDCARD=29
NUMBER=30
PREDICATE=31
FROM=32
WHERE=33
AS=34
SELECT=35
IDENTIFIER=36
WS=37
'class'=1
'{'=2
'}'=3
'('=4
')'=5
'result'=6
'='=7
','=8
'||'=9
'&&'=10
'=='=11
'!='=12
'<'=13
'>'=14
'<='=15
'>='=16
' in '=17
'+'=18
'-'=19
'*'=20
'/'=21
'!'=22
'.'=23
'['=24
']'=25
'LIKE'=26
'in'=27
'predicate'=31
'FROM'=32
'WHERE'=33
'AS'=34
'SELECT'=35
15 changes: 12 additions & 3 deletions sourcecode-parser/antlr/QueryLexer.interp
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
token literal names:
null
'('
')'
'class'
'{'
'}'
'('
')'
'result'
'='
','
'||'
'&&'
Expand Down Expand Up @@ -61,6 +64,9 @@ null
null
null
null
null
null
null
STRING
STRING_WITH_WILDCARD
NUMBER
Expand Down Expand Up @@ -97,6 +103,9 @@ T__20
T__21
T__22
T__23
T__24
T__25
T__26
STRING
STRING_WITH_WILDCARD
NUMBER
Expand All @@ -116,4 +125,4 @@ mode names:
DEFAULT_MODE

atn:
[4, 0, 34, 211, 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, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 135, 8, 24, 10, 24, 12, 24, 138, 9, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 147, 8, 25, 10, 25, 12, 25, 150, 9, 25, 1, 25, 1, 25, 1, 26, 4, 26, 155, 8, 26, 11, 26, 12, 26, 156, 1, 26, 1, 26, 4, 26, 161, 8, 26, 11, 26, 12, 26, 162, 3, 26, 165, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 5, 32, 200, 8, 32, 10, 32, 12, 32, 203, 9, 32, 1, 33, 4, 33, 206, 8, 33, 11, 33, 12, 33, 207, 1, 33, 1, 33, 0, 0, 34, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 1, 0, 5, 2, 0, 34, 34, 92, 92, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 9, 10, 13, 13, 32, 32, 220, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 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, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 1, 69, 1, 0, 0, 0, 3, 71, 1, 0, 0, 0, 5, 73, 1, 0, 0, 0, 7, 75, 1, 0, 0, 0, 9, 77, 1, 0, 0, 0, 11, 79, 1, 0, 0, 0, 13, 82, 1, 0, 0, 0, 15, 85, 1, 0, 0, 0, 17, 88, 1, 0, 0, 0, 19, 91, 1, 0, 0, 0, 21, 93, 1, 0, 0, 0, 23, 95, 1, 0, 0, 0, 25, 98, 1, 0, 0, 0, 27, 101, 1, 0, 0, 0, 29, 106, 1, 0, 0, 0, 31, 108, 1, 0, 0, 0, 33, 110, 1, 0, 0, 0, 35, 112, 1, 0, 0, 0, 37, 114, 1, 0, 0, 0, 39, 116, 1, 0, 0, 0, 41, 118, 1, 0, 0, 0, 43, 120, 1, 0, 0, 0, 45, 122, 1, 0, 0, 0, 47, 127, 1, 0, 0, 0, 49, 130, 1, 0, 0, 0, 51, 141, 1, 0, 0, 0, 53, 154, 1, 0, 0, 0, 55, 166, 1, 0, 0, 0, 57, 176, 1, 0, 0, 0, 59, 181, 1, 0, 0, 0, 61, 187, 1, 0, 0, 0, 63, 190, 1, 0, 0, 0, 65, 197, 1, 0, 0, 0, 67, 205, 1, 0, 0, 0, 69, 70, 5, 40, 0, 0, 70, 2, 1, 0, 0, 0, 71, 72, 5, 41, 0, 0, 72, 4, 1, 0, 0, 0, 73, 74, 5, 123, 0, 0, 74, 6, 1, 0, 0, 0, 75, 76, 5, 125, 0, 0, 76, 8, 1, 0, 0, 0, 77, 78, 5, 44, 0, 0, 78, 10, 1, 0, 0, 0, 79, 80, 5, 124, 0, 0, 80, 81, 5, 124, 0, 0, 81, 12, 1, 0, 0, 0, 82, 83, 5, 38, 0, 0, 83, 84, 5, 38, 0, 0, 84, 14, 1, 0, 0, 0, 85, 86, 5, 61, 0, 0, 86, 87, 5, 61, 0, 0, 87, 16, 1, 0, 0, 0, 88, 89, 5, 33, 0, 0, 89, 90, 5, 61, 0, 0, 90, 18, 1, 0, 0, 0, 91, 92, 5, 60, 0, 0, 92, 20, 1, 0, 0, 0, 93, 94, 5, 62, 0, 0, 94, 22, 1, 0, 0, 0, 95, 96, 5, 60, 0, 0, 96, 97, 5, 61, 0, 0, 97, 24, 1, 0, 0, 0, 98, 99, 5, 62, 0, 0, 99, 100, 5, 61, 0, 0, 100, 26, 1, 0, 0, 0, 101, 102, 5, 32, 0, 0, 102, 103, 5, 105, 0, 0, 103, 104, 5, 110, 0, 0, 104, 105, 5, 32, 0, 0, 105, 28, 1, 0, 0, 0, 106, 107, 5, 43, 0, 0, 107, 30, 1, 0, 0, 0, 108, 109, 5, 45, 0, 0, 109, 32, 1, 0, 0, 0, 110, 111, 5, 42, 0, 0, 111, 34, 1, 0, 0, 0, 112, 113, 5, 47, 0, 0, 113, 36, 1, 0, 0, 0, 114, 115, 5, 33, 0, 0, 115, 38, 1, 0, 0, 0, 116, 117, 5, 46, 0, 0, 117, 40, 1, 0, 0, 0, 118, 119, 5, 91, 0, 0, 119, 42, 1, 0, 0, 0, 120, 121, 5, 93, 0, 0, 121, 44, 1, 0, 0, 0, 122, 123, 5, 76, 0, 0, 123, 124, 5, 73, 0, 0, 124, 125, 5, 75, 0, 0, 125, 126, 5, 69, 0, 0, 126, 46, 1, 0, 0, 0, 127, 128, 5, 105, 0, 0, 128, 129, 5, 110, 0, 0, 129, 48, 1, 0, 0, 0, 130, 136, 5, 34, 0, 0, 131, 135, 8, 0, 0, 0, 132, 133, 5, 92, 0, 0, 133, 135, 9, 0, 0, 0, 134, 131, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 135, 138, 1, 0, 0, 0, 136, 134, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 139, 1, 0, 0, 0, 138, 136, 1, 0, 0, 0, 139, 140, 5, 34, 0, 0, 140, 50, 1, 0, 0, 0, 141, 148, 5, 34, 0, 0, 142, 147, 8, 0, 0, 0, 143, 144, 5, 92, 0, 0, 144, 147, 9, 0, 0, 0, 145, 147, 5, 37, 0, 0, 146, 142, 1, 0, 0, 0, 146, 143, 1, 0, 0, 0, 146, 145, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 151, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 152, 5, 34, 0, 0, 152, 52, 1, 0, 0, 0, 153, 155, 7, 1, 0, 0, 154, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 164, 1, 0, 0, 0, 158, 160, 5, 46, 0, 0, 159, 161, 7, 1, 0, 0, 160, 159, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 1, 0, 0, 0, 164, 158, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 54, 1, 0, 0, 0, 166, 167, 5, 112, 0, 0, 167, 168, 5, 114, 0, 0, 168, 169, 5, 101, 0, 0, 169, 170, 5, 100, 0, 0, 170, 171, 5, 105, 0, 0, 171, 172, 5, 99, 0, 0, 172, 173, 5, 97, 0, 0, 173, 174, 5, 116, 0, 0, 174, 175, 5, 101, 0, 0, 175, 56, 1, 0, 0, 0, 176, 177, 5, 70, 0, 0, 177, 178, 5, 82, 0, 0, 178, 179, 5, 79, 0, 0, 179, 180, 5, 77, 0, 0, 180, 58, 1, 0, 0, 0, 181, 182, 5, 87, 0, 0, 182, 183, 5, 72, 0, 0, 183, 184, 5, 69, 0, 0, 184, 185, 5, 82, 0, 0, 185, 186, 5, 69, 0, 0, 186, 60, 1, 0, 0, 0, 187, 188, 5, 65, 0, 0, 188, 189, 5, 83, 0, 0, 189, 62, 1, 0, 0, 0, 190, 191, 5, 83, 0, 0, 191, 192, 5, 69, 0, 0, 192, 193, 5, 76, 0, 0, 193, 194, 5, 69, 0, 0, 194, 195, 5, 67, 0, 0, 195, 196, 5, 84, 0, 0, 196, 64, 1, 0, 0, 0, 197, 201, 7, 2, 0, 0, 198, 200, 7, 3, 0, 0, 199, 198, 1, 0, 0, 0, 200, 203, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 66, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 204, 206, 7, 4, 0, 0, 205, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 205, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 210, 6, 33, 0, 0, 210, 68, 1, 0, 0, 0, 10, 0, 134, 136, 146, 148, 156, 162, 164, 201, 207, 1, 6, 0, 0]
[4, 0, 37, 232, 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, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 5, 27, 156, 8, 27, 10, 27, 12, 27, 159, 9, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 168, 8, 28, 10, 28, 12, 28, 171, 9, 28, 1, 28, 1, 28, 1, 29, 4, 29, 176, 8, 29, 11, 29, 12, 29, 177, 1, 29, 1, 29, 4, 29, 182, 8, 29, 11, 29, 12, 29, 183, 3, 29, 186, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 5, 35, 221, 8, 35, 10, 35, 12, 35, 224, 9, 35, 1, 36, 4, 36, 227, 8, 36, 11, 36, 12, 36, 228, 1, 36, 1, 36, 0, 0, 37, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 1, 0, 5, 2, 0, 34, 34, 92, 92, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 9, 10, 13, 13, 32, 32, 241, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 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, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 1, 75, 1, 0, 0, 0, 3, 81, 1, 0, 0, 0, 5, 83, 1, 0, 0, 0, 7, 85, 1, 0, 0, 0, 9, 87, 1, 0, 0, 0, 11, 89, 1, 0, 0, 0, 13, 96, 1, 0, 0, 0, 15, 98, 1, 0, 0, 0, 17, 100, 1, 0, 0, 0, 19, 103, 1, 0, 0, 0, 21, 106, 1, 0, 0, 0, 23, 109, 1, 0, 0, 0, 25, 112, 1, 0, 0, 0, 27, 114, 1, 0, 0, 0, 29, 116, 1, 0, 0, 0, 31, 119, 1, 0, 0, 0, 33, 122, 1, 0, 0, 0, 35, 127, 1, 0, 0, 0, 37, 129, 1, 0, 0, 0, 39, 131, 1, 0, 0, 0, 41, 133, 1, 0, 0, 0, 43, 135, 1, 0, 0, 0, 45, 137, 1, 0, 0, 0, 47, 139, 1, 0, 0, 0, 49, 141, 1, 0, 0, 0, 51, 143, 1, 0, 0, 0, 53, 148, 1, 0, 0, 0, 55, 151, 1, 0, 0, 0, 57, 162, 1, 0, 0, 0, 59, 175, 1, 0, 0, 0, 61, 187, 1, 0, 0, 0, 63, 197, 1, 0, 0, 0, 65, 202, 1, 0, 0, 0, 67, 208, 1, 0, 0, 0, 69, 211, 1, 0, 0, 0, 71, 218, 1, 0, 0, 0, 73, 226, 1, 0, 0, 0, 75, 76, 5, 99, 0, 0, 76, 77, 5, 108, 0, 0, 77, 78, 5, 97, 0, 0, 78, 79, 5, 115, 0, 0, 79, 80, 5, 115, 0, 0, 80, 2, 1, 0, 0, 0, 81, 82, 5, 123, 0, 0, 82, 4, 1, 0, 0, 0, 83, 84, 5, 125, 0, 0, 84, 6, 1, 0, 0, 0, 85, 86, 5, 40, 0, 0, 86, 8, 1, 0, 0, 0, 87, 88, 5, 41, 0, 0, 88, 10, 1, 0, 0, 0, 89, 90, 5, 114, 0, 0, 90, 91, 5, 101, 0, 0, 91, 92, 5, 115, 0, 0, 92, 93, 5, 117, 0, 0, 93, 94, 5, 108, 0, 0, 94, 95, 5, 116, 0, 0, 95, 12, 1, 0, 0, 0, 96, 97, 5, 61, 0, 0, 97, 14, 1, 0, 0, 0, 98, 99, 5, 44, 0, 0, 99, 16, 1, 0, 0, 0, 100, 101, 5, 124, 0, 0, 101, 102, 5, 124, 0, 0, 102, 18, 1, 0, 0, 0, 103, 104, 5, 38, 0, 0, 104, 105, 5, 38, 0, 0, 105, 20, 1, 0, 0, 0, 106, 107, 5, 61, 0, 0, 107, 108, 5, 61, 0, 0, 108, 22, 1, 0, 0, 0, 109, 110, 5, 33, 0, 0, 110, 111, 5, 61, 0, 0, 111, 24, 1, 0, 0, 0, 112, 113, 5, 60, 0, 0, 113, 26, 1, 0, 0, 0, 114, 115, 5, 62, 0, 0, 115, 28, 1, 0, 0, 0, 116, 117, 5, 60, 0, 0, 117, 118, 5, 61, 0, 0, 118, 30, 1, 0, 0, 0, 119, 120, 5, 62, 0, 0, 120, 121, 5, 61, 0, 0, 121, 32, 1, 0, 0, 0, 122, 123, 5, 32, 0, 0, 123, 124, 5, 105, 0, 0, 124, 125, 5, 110, 0, 0, 125, 126, 5, 32, 0, 0, 126, 34, 1, 0, 0, 0, 127, 128, 5, 43, 0, 0, 128, 36, 1, 0, 0, 0, 129, 130, 5, 45, 0, 0, 130, 38, 1, 0, 0, 0, 131, 132, 5, 42, 0, 0, 132, 40, 1, 0, 0, 0, 133, 134, 5, 47, 0, 0, 134, 42, 1, 0, 0, 0, 135, 136, 5, 33, 0, 0, 136, 44, 1, 0, 0, 0, 137, 138, 5, 46, 0, 0, 138, 46, 1, 0, 0, 0, 139, 140, 5, 91, 0, 0, 140, 48, 1, 0, 0, 0, 141, 142, 5, 93, 0, 0, 142, 50, 1, 0, 0, 0, 143, 144, 5, 76, 0, 0, 144, 145, 5, 73, 0, 0, 145, 146, 5, 75, 0, 0, 146, 147, 5, 69, 0, 0, 147, 52, 1, 0, 0, 0, 148, 149, 5, 105, 0, 0, 149, 150, 5, 110, 0, 0, 150, 54, 1, 0, 0, 0, 151, 157, 5, 34, 0, 0, 152, 156, 8, 0, 0, 0, 153, 154, 5, 92, 0, 0, 154, 156, 9, 0, 0, 0, 155, 152, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 160, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 160, 161, 5, 34, 0, 0, 161, 56, 1, 0, 0, 0, 162, 169, 5, 34, 0, 0, 163, 168, 8, 0, 0, 0, 164, 165, 5, 92, 0, 0, 165, 168, 9, 0, 0, 0, 166, 168, 5, 37, 0, 0, 167, 163, 1, 0, 0, 0, 167, 164, 1, 0, 0, 0, 167, 166, 1, 0, 0, 0, 168, 171, 1, 0, 0, 0, 169, 167, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 172, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 172, 173, 5, 34, 0, 0, 173, 58, 1, 0, 0, 0, 174, 176, 7, 1, 0, 0, 175, 174, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 185, 1, 0, 0, 0, 179, 181, 5, 46, 0, 0, 180, 182, 7, 1, 0, 0, 181, 180, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 186, 1, 0, 0, 0, 185, 179, 1, 0, 0, 0, 185, 186, 1, 0, 0, 0, 186, 60, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 114, 0, 0, 189, 190, 5, 101, 0, 0, 190, 191, 5, 100, 0, 0, 191, 192, 5, 105, 0, 0, 192, 193, 5, 99, 0, 0, 193, 194, 5, 97, 0, 0, 194, 195, 5, 116, 0, 0, 195, 196, 5, 101, 0, 0, 196, 62, 1, 0, 0, 0, 197, 198, 5, 70, 0, 0, 198, 199, 5, 82, 0, 0, 199, 200, 5, 79, 0, 0, 200, 201, 5, 77, 0, 0, 201, 64, 1, 0, 0, 0, 202, 203, 5, 87, 0, 0, 203, 204, 5, 72, 0, 0, 204, 205, 5, 69, 0, 0, 205, 206, 5, 82, 0, 0, 206, 207, 5, 69, 0, 0, 207, 66, 1, 0, 0, 0, 208, 209, 5, 65, 0, 0, 209, 210, 5, 83, 0, 0, 210, 68, 1, 0, 0, 0, 211, 212, 5, 83, 0, 0, 212, 213, 5, 69, 0, 0, 213, 214, 5, 76, 0, 0, 214, 215, 5, 69, 0, 0, 215, 216, 5, 67, 0, 0, 216, 217, 5, 84, 0, 0, 217, 70, 1, 0, 0, 0, 218, 222, 7, 2, 0, 0, 219, 221, 7, 3, 0, 0, 220, 219, 1, 0, 0, 0, 221, 224, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223, 72, 1, 0, 0, 0, 224, 222, 1, 0, 0, 0, 225, 227, 7, 4, 0, 0, 226, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 226, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 231, 6, 36, 0, 0, 231, 74, 1, 0, 0, 0, 10, 0, 155, 157, 167, 169, 177, 183, 185, 222, 228, 1, 6, 0, 0]
84 changes: 45 additions & 39 deletions sourcecode-parser/antlr/QueryLexer.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,48 @@ T__20=21
T__21=22
T__22=23
T__23=24
STRING=25
STRING_WITH_WILDCARD=26
NUMBER=27
PREDICATE=28
FROM=29
WHERE=30
AS=31
SELECT=32
IDENTIFIER=33
WS=34
'('=1
')'=2
'{'=3
'}'=4
','=5
'||'=6
'&&'=7
'=='=8
'!='=9
'<'=10
'>'=11
'<='=12
'>='=13
' in '=14
'+'=15
'-'=16
'*'=17
'/'=18
'!'=19
'.'=20
'['=21
']'=22
'LIKE'=23
'in'=24
'predicate'=28
'FROM'=29
'WHERE'=30
'AS'=31
'SELECT'=32
T__24=25
T__25=26
T__26=27
STRING=28
STRING_WITH_WILDCARD=29
NUMBER=30
PREDICATE=31
FROM=32
WHERE=33
AS=34
SELECT=35
IDENTIFIER=36
WS=37
'class'=1
'{'=2
'}'=3
'('=4
')'=5
'result'=6
'='=7
','=8
'||'=9
'&&'=10
'=='=11
'!='=12
'<'=13
'>'=14
'<='=15
'>='=16
' in '=17
'+'=18
'-'=19
'*'=20
'/'=21
'!'=22
'.'=23
'['=24
']'=25
'LIKE'=26
'in'=27
'predicate'=31
'FROM'=32
'WHERE'=33
'AS'=34
'SELECT'=35
Loading

0 comments on commit 17b5623

Please sign in to comment.