-
Notifications
You must be signed in to change notification settings - Fork 112
PR/DynamoDB operations and parsers #1521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aschenzle
wants to merge
10
commits into
master
Choose a base branch
from
pr/dynamodb-operations-and-parsers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
dddac08
DynamoDB operation modeling and parsers.
aschenzle 4477f1a
Adding javadoc
aschenzle 8aa0925
Merge branch 'master' into pr/dynamodb-operations-and-parsers
aschenzle 22f85da
Adding Javadoc to all methods. Removing unnecessary function.
aschenzle d55cbac
Improving Javadoc
aschenzle 77d5b8c
Added comments explainig decisions made around reflection. Added test…
aschenzle 8e217c2
Merge branch 'master' into pr/dynamodb-operations-and-parsers
aschenzle 8fbf856
Merge branch 'master' into pr/dynamodb-operations-and-parsers
aschenzle ce8ee71
Small fixes from PR comments
aschenzle 1143665
Small fixes from PR comments
aschenzle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
123 changes: 123 additions & 0 deletions
123
.../main/antlr4/org/evomaster/client/java/controller/dynamodb/DynamoDbConditionExpression.g4
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| grammar DynamoDbConditionExpression; | ||
|
|
||
| expression | ||
| : orExpr EOF | ||
| ; | ||
|
|
||
| orExpr | ||
| : andExpr (OR andExpr)* | ||
| ; | ||
|
|
||
| andExpr | ||
| : notExpr (AND notExpr)* | ||
| ; | ||
|
|
||
| notExpr | ||
| : NOT notExpr #negatedExpr | ||
| | primary #primaryExpr | ||
| ; | ||
|
|
||
| primary | ||
| : LPAREN orExpr RPAREN #parenthesizedPrimary | ||
| | predicate #predicatePrimary | ||
| ; | ||
|
|
||
| predicate | ||
| : ATTRIBUTE_EXISTS LPAREN path RPAREN #attributeExistsPredicate | ||
| | ATTRIBUTE_NOT_EXISTS LPAREN path RPAREN #attributeNotExistsPredicate | ||
| | ATTRIBUTE_TYPE LPAREN path COMMA value RPAREN #attributeTypePredicate | ||
| | BEGINS_WITH LPAREN path COMMA value RPAREN #beginsWithPredicate | ||
| | CONTAINS LPAREN path COMMA value RPAREN #containsPredicate | ||
| | SIZE LPAREN path RPAREN comparator value #sizePredicate | ||
| | path BETWEEN value AND value #betweenPredicate | ||
| | path IN LPAREN value (COMMA value)* RPAREN #inPredicate | ||
| | path comparator value #comparisonPredicate | ||
| ; | ||
|
|
||
| comparator | ||
| : EQ | ||
| | NE | ||
| | LT | ||
| | LTE | ||
| | GT | ||
| | GTE | ||
| ; | ||
|
|
||
| path | ||
| : IDENTIFIER | ||
| ; | ||
|
|
||
| value | ||
| : PLACEHOLDER #placeholderValue | ||
| | STRING_LITERAL #stringValue | ||
| | NUMBER_LITERAL #numberValue | ||
| | BOOLEAN_LITERAL #booleanValue | ||
| | NULL_LITERAL #nullValue | ||
| | IDENTIFIER #identifierValue | ||
| ; | ||
|
|
||
| LPAREN : '('; | ||
| RPAREN : ')'; | ||
| COMMA : ','; | ||
| EQ : '='; | ||
| NE : '<>'; | ||
| LTE : '<='; | ||
| GTE : '>='; | ||
| LT : '<'; | ||
| GT : '>'; | ||
|
|
||
| AND : A N D; | ||
| OR : O R; | ||
| NOT : N O T; | ||
| BETWEEN : B E T W E E N; | ||
| IN : I N; | ||
| ATTRIBUTE_EXISTS : A T T R I B U T E '_' E X I S T S; | ||
| ATTRIBUTE_NOT_EXISTS : A T T R I B U T E '_' N O T '_' E X I S T S; | ||
| ATTRIBUTE_TYPE : A T T R I B U T E '_' T Y P E; | ||
| BEGINS_WITH : B E G I N S '_' W I T H; | ||
| CONTAINS : C O N T A I N S; | ||
| SIZE : S I Z E; | ||
|
|
||
| BOOLEAN_LITERAL : T R U E | F A L S E; | ||
| NULL_LITERAL : N U L L; | ||
|
|
||
| PLACEHOLDER : ':' IDENT_START IDENT_PART*; | ||
| NUMBER_LITERAL : '-'? DIGIT+ ('.' DIGIT+)? EXPONENT?; | ||
| STRING_LITERAL : '\'' ~['\r\n]* '\''; | ||
|
|
||
| IDENTIFIER : IDENT_START IDENT_PART* INDEX* ('.' IDENT_START IDENT_PART* INDEX*)*; | ||
|
|
||
| WS : [ \t\r\n]+ -> skip; | ||
|
|
||
| fragment INDEX : '[' DIGIT+ ']'; | ||
| fragment EXPONENT : [eE] [+\-]? DIGIT+; | ||
| fragment IDENT_START : [a-zA-Z_#]; | ||
| fragment IDENT_PART : [a-zA-Z0-9_]; | ||
| fragment DIGIT : [0-9]; | ||
|
|
||
| fragment A : [aA]; | ||
| 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]; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.