-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add run selection syntax on frontend
- Loading branch information
Showing
12 changed files
with
2,249 additions
and
0 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
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
76 changes: 76 additions & 0 deletions
76
js_modules/dagster-ui/packages/ui-core/src/run-selection/RunSelection.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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
grammar RunSelection; | ||
|
||
start: expr EOF; | ||
|
||
// Root rule for parsing expressions | ||
expr | ||
: traversalAllowedExpr # TraversalAllowedExpression | ||
| traversal traversalAllowedExpr traversal # UpAndDownTraversalExpression | ||
| traversal traversalAllowedExpr # UpTraversalExpression | ||
| traversalAllowedExpr traversal # DownTraversalExpression | ||
| NOT expr # NotExpression | ||
| expr AND expr # AndExpression | ||
| expr OR expr # OrExpression | ||
| STAR # AllExpression | ||
; | ||
|
||
// Allowed expressions for traversals | ||
traversalAllowedExpr | ||
: attributeExpr # AttributeExpression | ||
| functionName LPAREN expr RPAREN # FunctionCallExpression | ||
| LPAREN expr RPAREN # ParenthesizedExpression | ||
; | ||
|
||
// Traversal operators | ||
traversal | ||
: STAR | ||
| PLUS+ | ||
; | ||
|
||
// Function names as tokens | ||
functionName | ||
: SINKS | ||
| ROOTS | ||
; | ||
|
||
// Attribute expressions for specific attributes | ||
attributeExpr | ||
: NAME COLON value # NameExpr | ||
| NAME_SUBSTRING COLON value # NameSubstringExpr | ||
| STATUS COLON value # StatusAttributeExpr | ||
; | ||
|
||
// Value can be a quoted or unquoted string | ||
value | ||
: QUOTED_STRING | ||
| UNQUOTED_STRING | ||
; | ||
|
||
// Tokens for operators and keywords | ||
AND : 'and'; | ||
OR : 'or'; | ||
NOT : 'not'; | ||
|
||
STAR : '*'; | ||
PLUS : '+'; | ||
|
||
COLON : ':'; | ||
|
||
LPAREN : '('; | ||
RPAREN : ')'; | ||
|
||
// Tokens for attributes | ||
NAME : 'name'; | ||
NAME_SUBSTRING : 'name_substring'; | ||
STATUS : 'status'; | ||
|
||
// Tokens for function names | ||
SINKS : 'sinks'; | ||
ROOTS : 'roots'; | ||
|
||
// Tokens for strings | ||
QUOTED_STRING : '"' (~["\\\r\n])* '"' ; | ||
UNQUOTED_STRING : [a-zA-Z_][a-zA-Z0-9_]*; | ||
// Whitespace | ||
WS : [ \t\r\n]+ -> skip ; |
50 changes: 50 additions & 0 deletions
50
js_modules/dagster-ui/packages/ui-core/src/run-selection/generated/RunSelection.interp
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
js_modules/dagster-ui/packages/ui-core/src/run-selection/generated/RunSelection.tokens
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
js_modules/dagster-ui/packages/ui-core/src/run-selection/generated/RunSelectionLexer.interp
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
js_modules/dagster-ui/packages/ui-core/src/run-selection/generated/RunSelectionLexer.tokens
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.