-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
16,708 additions
and
15,840 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 47 additions & 67 deletions
114
moto/stepfunctions/parser/asl/antlr/ASLIntrinsicLexer.g4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,59 @@ | ||
// $antlr-format alignTrailingComments true, columnLimit 150, maxEmptyLinesToKeep 1, reflowComments false, useTab false | ||
// $antlr-format allowShortRulesOnASingleLine true, allowShortBlocksOnASingleLine true, minEmptyLines 0, alignSemicolons ownLine | ||
// $antlr-format alignColons trailing, singleLineOverrulesHangingColon true, alignLexerCommands true, alignLabels true, alignTrailers true | ||
|
||
lexer grammar ASLIntrinsicLexer; | ||
|
||
DOLLAR: '$'; | ||
DOT: '.'; | ||
STAR: '*'; | ||
COMMA: ','; | ||
LPAREN: '('; | ||
RPAREN: ')'; | ||
LBRACK: '['; | ||
RBRACK: ']'; | ||
LDIAM: '<'; | ||
RDIAM: '>'; | ||
ATDOT: '@.'; | ||
ATDOTLENGTHDASH: '@.length-'; | ||
ANDAND: '&&'; | ||
OROR: '||'; | ||
EQEQ: '=='; | ||
EQ: '='; | ||
CONTEXT_PATH_STRING: DOLLAR DOLLAR JSON_PATH_BODY; | ||
|
||
JSON_PATH_STRING: DOLLAR JSON_PATH_BODY; | ||
|
||
fragment JSON_PATH_BODY: JSON_PATH_BRACK? (DOT IDENTIFIER? JSON_PATH_BRACK?)*; | ||
|
||
fragment JSON_PATH_BRACK: '[' (JSON_PATH_BRACK | ~[\]])* ']'; | ||
|
||
TRUE: 'true'; | ||
FALSE: 'false'; | ||
DOLLAR : '$'; | ||
LPAREN : '('; | ||
RPAREN : ')'; | ||
COMMA : ','; | ||
DOT : '.'; | ||
|
||
States: 'States'; | ||
Format: 'Format'; | ||
StringToJson: 'StringToJson'; | ||
JsonToString: 'JsonToString'; | ||
Array: 'Array'; | ||
ArrayPartition: 'ArrayPartition'; | ||
ArrayContains: 'ArrayContains'; | ||
ArrayRange: 'ArrayRange'; | ||
ArrayGetItem: 'ArrayGetItem'; | ||
ArrayLength: 'ArrayLength'; | ||
ArrayUnique: 'ArrayUnique'; | ||
Base64Encode: 'Base64Encode'; | ||
Base64Decode: 'Base64Decode'; | ||
Hash: 'Hash'; | ||
JsonMerge: 'JsonMerge'; | ||
MathRandom: 'MathRandom'; | ||
MathAdd: 'MathAdd'; | ||
StringSplit: 'StringSplit'; | ||
UUID: 'UUID'; | ||
TRUE : 'true'; | ||
FALSE : 'false'; | ||
|
||
States : 'States'; | ||
Format : 'Format'; | ||
StringToJson : 'StringToJson'; | ||
JsonToString : 'JsonToString'; | ||
Array : 'Array'; | ||
ArrayPartition : 'ArrayPartition'; | ||
ArrayContains : 'ArrayContains'; | ||
ArrayRange : 'ArrayRange'; | ||
ArrayGetItem : 'ArrayGetItem'; | ||
ArrayLength : 'ArrayLength'; | ||
ArrayUnique : 'ArrayUnique'; | ||
Base64Encode : 'Base64Encode'; | ||
Base64Decode : 'Base64Decode'; | ||
Hash : 'Hash'; | ||
JsonMerge : 'JsonMerge'; | ||
MathRandom : 'MathRandom'; | ||
MathAdd : 'MathAdd'; | ||
StringSplit : 'StringSplit'; | ||
UUID : 'UUID'; | ||
|
||
STRING | ||
: '\'' (ESC | SAFECODEPOINT)*? '\'' | ||
; | ||
STRING: '\'' (ESC | SAFECODEPOINT)*? '\''; | ||
|
||
fragment ESC | ||
: '\\' (UNICODE | .) | ||
; | ||
fragment UNICODE | ||
: 'u' HEX HEX HEX HEX | ||
; | ||
fragment HEX | ||
: [0-9a-fA-F] | ||
; | ||
fragment SAFECODEPOINT | ||
: ~ ['\\\u0000-\u001F] | ||
; | ||
fragment ESC : '\\' (UNICODE | .); | ||
fragment UNICODE : 'u' HEX HEX HEX HEX; | ||
fragment HEX : [0-9a-fA-F]; | ||
fragment SAFECODEPOINT : ~ ['\\\u0000-\u001F]; | ||
INT | ||
: '-'? ('0' | [1-9] [0-9]*) | ||
; | ||
INT: '-'? ('0' | [1-9] [0-9]*); | ||
NUMBER | ||
: '-'? INT ('.' [0-9] +)? EXP? | ||
; | ||
NUMBER: '-'? INT ('.' [0-9]+)? EXP?; | ||
fragment EXP | ||
: [Ee] [+\-]? INT | ||
; | ||
fragment EXP: [Ee] [+\-]? INT; | ||
IDENTIFIER | ||
: ([0-9a-zA-Z_] | UNICODE)+ | ||
; | ||
IDENTIFIER: ([0-9a-zA-Z_] | UNICODE)+; | ||
WS | ||
: [ \t\n] + -> skip | ||
; | ||
WS: [ \t\n]+ -> skip; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.