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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/lang-painless/src/main/antlr/PainlessLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ LBRACE: '[';
RBRACE: ']';
LP: '(';
RP: ')';
DOLLAR: '$';
// We switch modes after a dot to ensure there are not conflicts
// between shortcuts and decimal values. Without the mode switch
// shortcuts such as id.0.0 will fail because 0.0 will be interpreted
Expand Down
290 changes: 146 additions & 144 deletions modules/lang-painless/src/main/antlr/PainlessLexer.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -6,153 +6,155 @@ LBRACE=5
RBRACE=6
LP=7
RP=8
DOT=9
NSDOT=10
COMMA=11
SEMICOLON=12
IF=13
IN=14
ELSE=15
WHILE=16
DO=17
FOR=18
CONTINUE=19
BREAK=20
RETURN=21
NEW=22
TRY=23
CATCH=24
THROW=25
THIS=26
INSTANCEOF=27
BOOLNOT=28
BWNOT=29
MUL=30
DIV=31
REM=32
ADD=33
SUB=34
LSH=35
RSH=36
USH=37
LT=38
LTE=39
GT=40
GTE=41
EQ=42
EQR=43
NE=44
NER=45
BWAND=46
XOR=47
BWOR=48
BOOLAND=49
BOOLOR=50
COND=51
COLON=52
ELVIS=53
REF=54
ARROW=55
FIND=56
MATCH=57
INCR=58
DECR=59
ASSIGN=60
AADD=61
ASUB=62
AMUL=63
ADIV=64
AREM=65
AAND=66
AXOR=67
AOR=68
ALSH=69
ARSH=70
AUSH=71
OCTAL=72
HEX=73
INTEGER=74
DECIMAL=75
STRING=76
REGEX=77
TRUE=78
FALSE=79
NULL=80
PRIMITIVE=81
DEF=82
ID=83
DOTINTEGER=84
DOTID=85
DOLLAR=9
DOT=10
NSDOT=11
COMMA=12
SEMICOLON=13
IF=14
IN=15
ELSE=16
WHILE=17
DO=18
FOR=19
CONTINUE=20
BREAK=21
RETURN=22
NEW=23
TRY=24
CATCH=25
THROW=26
THIS=27
INSTANCEOF=28
BOOLNOT=29
BWNOT=30
MUL=31
DIV=32
REM=33
ADD=34
SUB=35
LSH=36
RSH=37
USH=38
LT=39
LTE=40
GT=41
GTE=42
EQ=43
EQR=44
NE=45
NER=46
BWAND=47
XOR=48
BWOR=49
BOOLAND=50
BOOLOR=51
COND=52
COLON=53
ELVIS=54
REF=55
ARROW=56
FIND=57
MATCH=58
INCR=59
DECR=60
ASSIGN=61
AADD=62
ASUB=63
AMUL=64
ADIV=65
AREM=66
AAND=67
AXOR=68
AOR=69
ALSH=70
ARSH=71
AUSH=72
OCTAL=73
HEX=74
INTEGER=75
DECIMAL=76
STRING=77
REGEX=78
TRUE=79
FALSE=80
NULL=81
PRIMITIVE=82
DEF=83
ID=84
DOTINTEGER=85
DOTID=86
'{'=3
'}'=4
'['=5
']'=6
'('=7
')'=8
'.'=9
'?.'=10
','=11
';'=12
'if'=13
'in'=14
'else'=15
'while'=16
'do'=17
'for'=18
'continue'=19
'break'=20
'return'=21
'new'=22
'try'=23
'catch'=24
'throw'=25
'this'=26
'instanceof'=27
'!'=28
'~'=29
'*'=30
'/'=31
'%'=32
'+'=33
'-'=34
'<<'=35
'>>'=36
'>>>'=37
'<'=38
'<='=39
'>'=40
'>='=41
'=='=42
'==='=43
'!='=44
'!=='=45
'&'=46
'^'=47
'|'=48
'&&'=49
'||'=50
'?'=51
':'=52
'?:'=53
'::'=54
'->'=55
'=~'=56
'==~'=57
'++'=58
'--'=59
'='=60
'+='=61
'-='=62
'*='=63
'/='=64
'%='=65
'&='=66
'^='=67
'|='=68
'<<='=69
'>>='=70
'>>>='=71
'true'=78
'false'=79
'null'=80
'def'=82
'$'=9
'.'=10
'?.'=11
','=12
';'=13
'if'=14
'in'=15
'else'=16
'while'=17
'do'=18
'for'=19
'continue'=20
'break'=21
'return'=22
'new'=23
'try'=24
'catch'=25
'throw'=26
'this'=27
'instanceof'=28
'!'=29
'~'=30
'*'=31
'/'=32
'%'=33
'+'=34
'-'=35
'<<'=36
'>>'=37
'>>>'=38
'<'=39
'<='=40
'>'=41
'>='=42
'=='=43
'==='=44
'!='=45
'!=='=46
'&'=47
'^'=48
'|'=49
'&&'=50
'||'=51
'?'=52
':'=53
'?:'=54
'::'=55
'->'=56
'=~'=57
'==~'=58
'++'=59
'--'=60
'='=61
'+='=62
'-='=63
'*='=64
'/='=65
'%='=66
'&='=67
'^='=68
'|='=69
'<<='=70
'>>='=71
'>>>='=72
'true'=79
'false'=80
'null'=81
'def'=83
2 changes: 1 addition & 1 deletion modules/lang-painless/src/main/antlr/PainlessParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ primary
| listinitializer # listinit
| mapinitializer # mapinit
| ID # variable
| ID arguments # calllocal
| (ID | DOLLAR) arguments # calllocal
| NEW type arguments # newobject
;

Expand Down
Loading