Permalink
Please sign in to comment.
Showing
with
15,828 additions
and 3 deletions.
- +1 −0 .gitignore
- +2 −0 .travis.yml
- +267 −3 README.md
- +20 −0 build.xml
- +18 −0 examples/CopyNumberQC.wdl
- +27 −0 examples/MutSig.wdl
- +28 −0 grammars/composite_task.zgr
- +59 −0 pom.xml
- +27 −0 src/main/java/org/broadinstitute/compositetask/AnsiColorizer.java
- +9 −0 src/main/java/org/broadinstitute/compositetask/ColorTheme.java
- +407 −0 src/main/java/org/broadinstitute/compositetask/CompositeTask.java
- +10 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskColorizer.java
- +35 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskEdge.java
- +8 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskEdgeFactory.java
- +68 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskForLoop.java
- +364 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskGraph.java
- +9 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskNode.java
- +9 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskScope.java
- +98 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskSourceCode.java
- +80 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskSourceCodeFormatter.java
- +65 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskStep.java
- +42 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskStepInput.java
- +51 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskStepOutput.java
- +37 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskSubTask.java
- +7 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskToDotCompiler.java
- +56 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskVariable.java
- +3 −0 src/main/java/org/broadinstitute/compositetask/CompositeTaskVertex.java
- +108 −0 src/main/java/org/broadinstitute/compositetask/DirectedGraph.java
- +67 −0 src/main/java/org/broadinstitute/compositetask/EdgeFactory.java
- +435 −0 src/main/java/org/broadinstitute/compositetask/Graph.java
- +27 −0 src/main/java/org/broadinstitute/compositetask/HtmlColorizer.java
- +121 −0 src/main/java/org/broadinstitute/compositetask/Lexer.java
- +112 −0 src/main/java/org/broadinstitute/compositetask/Main.java
- +27 −0 src/main/java/org/broadinstitute/compositetask/NullColorizer.java
- +102 −0 src/main/java/org/broadinstitute/compositetask/WdlSyntaxErrorFormatter.java
- +48 −0 src/main/java/org/broadinstitute/parser/Ast.java
- +22 −0 src/main/java/org/broadinstitute/parser/AstList.java
- +7 −0 src/main/java/org/broadinstitute/parser/AstNode.java
- +3 −0 src/main/java/org/broadinstitute/parser/AstTransform.java
- +26 −0 src/main/java/org/broadinstitute/parser/AstTransformNodeCreator.java
- +14 −0 src/main/java/org/broadinstitute/parser/AstTransformSubstitution.java
- +1,363 −0 src/main/java/org/broadinstitute/parser/CompositeTaskParser.java
- +5 −0 src/main/java/org/broadinstitute/parser/ExpressionParser.java
- +19 −0 src/main/java/org/broadinstitute/parser/NonTerminal.java
- +161 −0 src/main/java/org/broadinstitute/parser/ParseTree.java
- +8 −0 src/main/java/org/broadinstitute/parser/ParseTreeNode.java
- +6 −0 src/main/java/org/broadinstitute/parser/Parser.java
- +12 −0 src/main/java/org/broadinstitute/parser/SourceCode.java
- +7 −0 src/main/java/org/broadinstitute/parser/SyntaxError.java
- +15 −0 src/main/java/org/broadinstitute/parser/SyntaxErrorFormatter.java
- +53 −0 src/main/java/org/broadinstitute/parser/Terminal.java
- +6 −0 src/main/java/org/broadinstitute/parser/TerminalIdentifier.java
- +8 −0 src/main/java/org/broadinstitute/parser/TerminalMap.java
- +57 −0 src/main/java/org/broadinstitute/parser/TokenStream.java
- +83 −0 src/main/java/org/broadinstitute/parser/Utility.java
- +85 −0 src/test/java/org/broadinstitute/compositetask/ApiTest.java
- +222 −0 src/test/java/org/broadinstitute/compositetask/ParsingTest.java
- +74 −0 src/test/java/org/broadinstitute/compositetask/SyntaxErrorTest.java
- +15 −0 test-files/api/0.wdl
- +198 −0 test-files/parsing/0/ast
- +19 −0 test-files/parsing/0/formatted
- +81 −0 test-files/parsing/0/graph
- +383 −0 test-files/parsing/0/parsetree
- +24 −0 test-files/parsing/0/source.wdl
- +128 −0 test-files/parsing/0/tokens
- +215 −0 test-files/parsing/1/ast
- +24 −0 test-files/parsing/1/formatted
- +89 −0 test-files/parsing/1/graph
- +426 −0 test-files/parsing/1/parsetree
- +30 −0 test-files/parsing/1/source.wdl
- +143 −0 test-files/parsing/1/tokens
- +14 −0 test-files/parsing/10/ast
- +6 −0 test-files/parsing/10/formatted
- +5 −0 test-files/parsing/10/graph
- +36 −0 test-files/parsing/10/parsetree
- +1 −0 test-files/parsing/10/source.wdl
- +14 −0 test-files/parsing/10/tokens
- +198 −0 test-files/parsing/11/ast
- +19 −0 test-files/parsing/11/formatted
- +81 −0 test-files/parsing/11/graph
- +383 −0 test-files/parsing/11/parsetree
- +8 −0 test-files/parsing/11/source.wdl
- +128 −0 test-files/parsing/11/tokens
- +170 −0 test-files/parsing/12/ast
- +18 −0 test-files/parsing/12/formatted
- +69 −0 test-files/parsing/12/graph
- +354 −0 test-files/parsing/12/parsetree
- +18 −0 test-files/parsing/12/source.wdl
- +119 −0 test-files/parsing/12/tokens
- +35 −0 test-files/parsing/13/ast
- +10 −0 test-files/parsing/13/formatted
- +39 −0 test-files/parsing/13/graph
- +89 −0 test-files/parsing/13/parsetree
- +4 −0 test-files/parsing/13/source.wdl
- +39 −0 test-files/parsing/13/tokens
- +193 −0 test-files/parsing/14/ast
- +13 −0 test-files/parsing/14/formatted
- +76 −0 test-files/parsing/14/graph
- +368 −0 test-files/parsing/14/parsetree
- +27 −0 test-files/parsing/14/source.wdl
- +126 −0 test-files/parsing/14/tokens
- +4 −0 test-files/parsing/15/ast
- +2 −0 test-files/parsing/15/formatted
- +5 −0 test-files/parsing/15/graph
- +14 −0 test-files/parsing/15/parsetree
- +4 −0 test-files/parsing/15/source.wdl
- +6 −0 test-files/parsing/15/tokens
- +18 −0 test-files/parsing/16/ast
- +4 −0 test-files/parsing/16/formatted
- +6 −0 test-files/parsing/16/graph
- +44 −0 test-files/parsing/16/parsetree
- +11 −0 test-files/parsing/16/source.wdl
- +15 −0 test-files/parsing/16/tokens
- +96 −0 test-files/parsing/17/ast
- +12 −0 test-files/parsing/17/formatted
- +42 −0 test-files/parsing/17/graph
- +199 −0 test-files/parsing/17/parsetree
- +10 −0 test-files/parsing/17/source.wdl
- +68 −0 test-files/parsing/17/tokens
- +96 −0 test-files/parsing/18/ast
- +12 −0 test-files/parsing/18/formatted
- +42 −0 test-files/parsing/18/graph
- +199 −0 test-files/parsing/18/parsetree
- +11 −0 test-files/parsing/18/source.wdl
- +68 −0 test-files/parsing/18/tokens
- +305 −0 test-files/parsing/2/ast
- +32 −0 test-files/parsing/2/formatted
- +93 −0 test-files/parsing/2/graph
- +592 −0 test-files/parsing/2/parsetree
- +39 −0 test-files/parsing/2/source.wdl
- +197 −0 test-files/parsing/2/tokens
- +4 −0 test-files/parsing/3/ast
- +2 −0 test-files/parsing/3/formatted
- +5 −0 test-files/parsing/3/graph
- +14 −0 test-files/parsing/3/parsetree
- +1 −0 test-files/parsing/3/source.wdl
- +6 −0 test-files/parsing/3/tokens
- +205 −0 test-files/parsing/4/ast
- +22 −0 test-files/parsing/4/formatted
- +76 −0 test-files/parsing/4/graph
- +417 −0 test-files/parsing/4/parsetree
- +28 −0 test-files/parsing/4/source.wdl
- +138 −0 test-files/parsing/4/tokens
- +211 −0 test-files/parsing/5/ast
- +24 −0 test-files/parsing/5/formatted
- +89 −0 test-files/parsing/5/graph
- +432 −0 test-files/parsing/5/parsetree
- +30 −0 test-files/parsing/5/source.wdl
- +146 −0 test-files/parsing/5/tokens
- +237 −0 test-files/parsing/6/ast
- +28 −0 test-files/parsing/6/formatted
- +89 −0 test-files/parsing/6/graph
- +482 −0 test-files/parsing/6/parsetree
- +33 −0 test-files/parsing/6/source.wdl
- +160 −0 test-files/parsing/6/tokens
- +89 −0 test-files/parsing/7/ast
- +11 −0 test-files/parsing/7/formatted
- +46 −0 test-files/parsing/7/graph
- +183 −0 test-files/parsing/7/parsetree
- +12 −0 test-files/parsing/7/source.wdl
- +63 −0 test-files/parsing/7/tokens
- +123 −0 test-files/parsing/8/ast
- +16 −0 test-files/parsing/8/formatted
- +60 −0 test-files/parsing/8/graph
- +250 −0 test-files/parsing/8/parsetree
- +18 −0 test-files/parsing/8/source.wdl
- +87 −0 test-files/parsing/8/tokens
- +18 −0 test-files/parsing/9/ast
- +4 −0 test-files/parsing/9/formatted
- +6 −0 test-files/parsing/9/graph
- +44 −0 test-files/parsing/9/parsetree
- +1 −0 test-files/parsing/9/source.wdl
- +15 −0 test-files/parsing/9/tokens
- +9 −0 test-files/syntax-error/0/errors
- +24 −0 test-files/syntax-error/0/source.wdl
- +9 −0 test-files/syntax-error/1/errors
- +12 −0 test-files/syntax-error/1/source.wdl
- +9 −0 test-files/syntax-error/2/errors
- +12 −0 test-files/syntax-error/2/source.wdl
- +9 −0 test-files/syntax-error/3/errors
- +12 −0 test-files/syntax-error/3/source.wdl
- +5 −0 test-files/syntax-error/4/errors
- +4 −0 test-files/syntax-error/4/source.wdl
- +6 −0 test-files/syntax-error/5/errors
- +1 −0 test-files/syntax-error/5/source.wdl
| @@ -0,0 +1 @@ | ||
| +tags |
| @@ -0,0 +1,2 @@ | ||
| +language: java | ||
| +script: ant test |
| @@ -1,4 +1,268 @@ | ||
| -wdl | ||
| -=== | ||
| +Workflow Description Language (wdl) | ||
| +=================================== | ||
| -Workflow Description Language | ||
| +The Workflow Description Language is a language for describing dependency trees of tasks (algorithms) in a concise and clear syntax. | ||
| + | ||
| +Installation | ||
| +============ | ||
| + | ||
| +Generating the JAR | ||
| +------------------ | ||
| + | ||
| +To build the JAR file, run: | ||
| + | ||
| +``` | ||
| +$ mvn package | ||
| +``` | ||
| + | ||
| +Which will create a file target/Wdl-${version}.jar as an executable JAR. To invoke the CLI: | ||
| + | ||
| +``` | ||
| +$ java -jar target/Wdl-0.0.1.jar examples/0.wdl ast | ||
| +``` | ||
| + | ||
| +Generating the parser code | ||
| +-------------------------- | ||
| + | ||
| +Use the Hermes parser generator (http://github.com/scottfrazer/hermes). From the root of this repository, run: | ||
| + | ||
| +``` | ||
| +$ hermes generate grammars/composite_task.zgr --directory=src/main/java/org/broadinstitute/compositetask --language=java --java-package=org.broadinstitute.compositetask | ||
| +``` | ||
| + | ||
| +Or, run the Ant target `generate-parser` which will run the command above: | ||
| + | ||
| +``` | ||
| +$ ant generate-parser | ||
| +``` | ||
| + | ||
| +Usage | ||
| +===== | ||
| + | ||
| +Java API | ||
| +-------- | ||
| + | ||
| +From Java code, the main interface is the CompositeTask, which can be used in this example to print out the immediate children nodes of this composite task: | ||
| + | ||
| +```java | ||
| +CompositeTask ct = new CompositeTask(new File(args[0])); | ||
| +for ( CompositeTaskNode entry : ct.getNodes() ) { | ||
| + System.out.println("Node: " + entry); | ||
| +} | ||
| +``` | ||
| + | ||
| +Command-line Interface | ||
| +---------------------- | ||
| + | ||
| +The data file we'll use is: | ||
| + | ||
| +``` | ||
| +$ cat examples/7.wdl | ||
| +composite_task test { | ||
| + step s0[version=0] { | ||
| + output: File("abc") as foo; | ||
| + } | ||
| + | ||
| + for (I in L) { | ||
| + for (J in M) { | ||
| + step s1[version=0] { | ||
| + input: p0=I, p1=J, p2=foo; | ||
| + output: File("def") as bar; | ||
| + } | ||
| + } | ||
| + } | ||
| + | ||
| + step s2[version=0] { | ||
| + input: p0=bar; | ||
| + } | ||
| +} | ||
| +``` | ||
| + | ||
| +Get the abstract syntax tree: | ||
| + | ||
| +``` | ||
| +$ java -jar dist/Wdl-0.0.1.jar examples/7.wdl ast | ||
| +(CompositeTask: | ||
| + body=[ | ||
| + (Step: | ||
| + body=[ | ||
| + (StepOutputList: | ||
| + outputs=[ | ||
| + (StepFileOutput: | ||
| + as=(Variable: | ||
| + member=None, | ||
| + name=identifier | ||
| + ), | ||
| + file=string | ||
| + ) | ||
| + ] | ||
| + ) | ||
| + ], | ||
| + task=(Task: | ||
| + attributes=[ | ||
| + (TaskAttribute: | ||
| + value=number, | ||
| + key=identifier | ||
| + ) | ||
| + ], | ||
| + name=identifier | ||
| + ), | ||
| + name=None | ||
| + ), | ||
| + (ForLoop: | ||
| + body=[ | ||
| + (ForLoop: | ||
| + body=[ | ||
| + (Step: | ||
| + body=[ | ||
| + (StepInputList: | ||
| + inputs=[ | ||
| + (StepInput: | ||
| + parameter=identifier, | ||
| + value=(Variable: | ||
| + member=None, | ||
| + name=identifier | ||
| + ) | ||
| + ), | ||
| + (StepInput: | ||
| + parameter=identifier, | ||
| + value=(Variable: | ||
| + member=None, | ||
| + name=identifier | ||
| + ) | ||
| + ), | ||
| + (StepInput: | ||
| + parameter=identifier, | ||
| + value=(Variable: | ||
| + member=None, | ||
| + name=identifier | ||
| + ) | ||
| + ) | ||
| + ] | ||
| + ), | ||
| + (StepOutputList: | ||
| + outputs=[ | ||
| + (StepFileOutput: | ||
| + as=(Variable: | ||
| + member=None, | ||
| + name=identifier | ||
| + ), | ||
| + file=string | ||
| + ) | ||
| + ] | ||
| + ) | ||
| + ], | ||
| + task=(Task: | ||
| + attributes=[ | ||
| + (TaskAttribute: | ||
| + value=number, | ||
| + key=identifier | ||
| + ) | ||
| + ], | ||
| + name=identifier | ||
| + ), | ||
| + name=None | ||
| + ) | ||
| + ], | ||
| + item=identifier, | ||
| + collection=identifier | ||
| + ) | ||
| + ], | ||
| + item=identifier, | ||
| + collection=identifier | ||
| + ), | ||
| + (Step: | ||
| + body=[ | ||
| + (StepInputList: | ||
| + inputs=[ | ||
| + (StepInput: | ||
| + parameter=identifier, | ||
| + value=(Variable: | ||
| + member=None, | ||
| + name=identifier | ||
| + ) | ||
| + ) | ||
| + ] | ||
| + ) | ||
| + ], | ||
| + task=(Task: | ||
| + attributes=[ | ||
| + (TaskAttribute: | ||
| + value=number, | ||
| + key=identifier | ||
| + ) | ||
| + ], | ||
| + name=identifier | ||
| + ), | ||
| + name=None | ||
| + ) | ||
| + ], | ||
| + name=identifier | ||
| +) | ||
| +``` | ||
| + | ||
| +Get a view of the graph | ||
| + | ||
| +``` | ||
| +$ java -jar dist/Wdl-0.0.1.jar examples/7.wdl graph | ||
| +VERTICIES | ||
| +--------- | ||
| +[Step: name=s1] | ||
| +[Variable: name=J] | ||
| +[Variable: name=M] | ||
| +[Variable: name=I] | ||
| +[Variable: name=L] | ||
| +[Variable: name=foo] | ||
| +[Step: name=s0] | ||
| +[Variable: name=bar] | ||
| +[Step: name=s2] | ||
| +[CompositeTaskForScope: collection=[Variable: name=L], var=[Variable: name=I], # nodes=1] | ||
| +[CompositeTaskForScope: collection=[Variable: name=M], var=[Variable: name=J], # nodes=1] | ||
| + | ||
| +EDGES | ||
| +----- | ||
| +[Edge | ||
| + from: [Step: name=s1] | ||
| + to: [Variable: name=bar] | ||
| +] | ||
| +[Edge | ||
| + from: [Variable: name=L] | ||
| + to: [CompositeTaskForScope: collection=[Variable: name=L], var=[Variable: name=I], # nodes=1] | ||
| +] | ||
| +[Edge | ||
| + from: [Variable: name=bar] | ||
| + to: [Step: name=s2] | ||
| +] | ||
| +[Edge | ||
| + from: [Variable: name=foo] | ||
| + to: [Step: name=s1] | ||
| +] | ||
| +[Edge | ||
| + from: [Step: name=s0] | ||
| + to: [Variable: name=foo] | ||
| +] | ||
| +[Edge | ||
| + from: [CompositeTaskForScope: collection=[Variable: name=M], var=[Variable: name=J], # nodes=1] | ||
| + to: [Variable: name=J] | ||
| +] | ||
| +[Edge | ||
| + from: [Variable: name=J] | ||
| + to: [Step: name=s1] | ||
| +] | ||
| +[Edge | ||
| + from: [Variable: name=M] | ||
| + to: [CompositeTaskForScope: collection=[Variable: name=M], var=[Variable: name=J], # nodes=1] | ||
| +] | ||
| +[Edge | ||
| + from: [CompositeTaskForScope: collection=[Variable: name=L], var=[Variable: name=I], # nodes=1] | ||
| + to: [Step: name=s2] | ||
| +] | ||
| +[Edge | ||
| + from: [Variable: name=I] | ||
| + to: [Step: name=s1] | ||
| +] | ||
| +[Edge | ||
| + from: [CompositeTaskForScope: collection=[Variable: name=L], var=[Variable: name=I], # nodes=1] | ||
| + to: [Variable: name=I] | ||
| +] | ||
| +``` |
| @@ -0,0 +1,20 @@ | ||
| +<project name="wdl"> | ||
| + <target name="generate-parser" description="Generate the parser from grammar file"> | ||
| + <property name="parser.dir" value="src/main/java/org/broadinstitute/parser" /> | ||
| + <property name="parser.package" value="org.broadinstitute.parser" /> | ||
| + <property name="parser.grammar" value="grammars/composite_task.zgr" /> | ||
| + | ||
| + <exec executable="hermes"> | ||
| + <arg value="--version" /> | ||
| + </exec> | ||
| + <echo message="Generating parser in ${parser.dir}" /> | ||
| + <mkdir dir="${parser.dir}" /> | ||
| + <exec executable="hermes"> | ||
| + <arg value="generate" /> | ||
| + <arg value="${parser.grammar}" /> | ||
| + <arg value="--directory=${parser.dir}" /> | ||
| + <arg value="--language=java" /> | ||
| + <arg value="--java-package=${parser.package}" /> | ||
| + </exec> | ||
| + </target> | ||
| +</project> |
| @@ -0,0 +1,18 @@ | ||
| +composite_task CopyNumberQC { | ||
| + step LaneBlackList[version=6] { | ||
| + output: File("lane_blacklist.txt") as lane_blacklist; | ||
| + } | ||
| + for ( sample in samples ) { | ||
| + step RegionCovPerLane[version=16] { | ||
| + input: bam_file=sample.bam, sample_id=sample.id; | ||
| + output: File("${sample.id}.rcl") into rcl; | ||
| + } | ||
| + step MakeLaneList[version=11] { | ||
| + input: bam_file=sample.bam, sample_id=sample.id; | ||
| + output: File("${sample.id}.lanelist") into lanelist; | ||
| + } | ||
| + } | ||
| + step CopyNumberQC[version=25] { | ||
| + input: lanes_list=lanelist, rcl_list=rcl, lane_blacklist=lane_blacklist; | ||
| + } | ||
| +} |
| @@ -0,0 +1,27 @@ | ||
| +/* inputs: | ||
| + * 1) MutSigPreprocess.{individual_set_id, maf1, maf2, maf3, maf4, maflabel1, maflabel2, maflabel3, maflabel4, wig1, wig2, wig3, wig4, build, context65_dir, build_dir, num_categories, target_list, paramfile} | ||
| + * 2) ProcessCoverageForMutSig has no variables. All inputs come from prior step. | ||
| + * 3) MutSigRun.{individual_set_id, gene_list, build, geneset_file, cosmic_file, refseq_file, build_dir, param_file, jobcount} | ||
| + */ | ||
| + | ||
| +composite_task MutSig { | ||
| + | ||
| + step MutSigPreprocess[version=86] { | ||
| + output: File("coverage.prepare.txt") as coverage_prepare_file, | ||
| + File("patients.txt") as patient_list, | ||
| + File("${individual_set_id}.maf") as mutation_list, | ||
| + File("mutation_preprocessing_report.txt") as mutation_preprocessing_report; | ||
| + } | ||
| + | ||
| + step ProcessCoverageForMutSig[version=75] { | ||
| + input: coverage=coverage_prepare_file, patients=patient_list, mutations=mutation_list; | ||
| + output: File("coverage.mat") as coverage_file, | ||
| + File("mutcategs.txt") as category_file; | ||
| + } | ||
| + | ||
| + step MutSigRun[version=157] as MutSig { | ||
| + input: mutation_list=mutation_list, coverage_file=coverage_file, patients=patient_list, category_file=category_file, mutation_preprocessing_report=foobar; | ||
| + output: File("bargraphs.png") as graphs; | ||
| + } | ||
| + | ||
| +} |
| @@ -0,0 +1,28 @@ | ||
| +{ | ||
| + "ll1": { | ||
| + "start": "wdl", | ||
| + "rules": [ | ||
| + "wdl := list(wdl_entity)", | ||
| + "wdl_entity := composite_task", | ||
| + "composite_task := 'composite_task' + 'identifier' + 'lbrace' + list(composite_task_entity) + 'rbrace' -> CompositeTask( name=$1, body=$3 )", | ||
| + "composite_task_entity := step | for_loop | composite_task", | ||
| + "for_loop := 'for' + 'lparen' + 'identifier' + 'in' + 'identifier' + 'rparen' + 'lbrace' + list(composite_task_entity) + 'rbrace' -> ForLoop( collection=$4, item=$2, body=$7 )", | ||
| + "step := 'step' + task_identifier + optional(step_name) + 'lbrace' + list(step_attr) + 'rbrace' -> Step( task=$1, name=$2, body=$4 )", | ||
| + "task_identifier := 'identifier' + optional(task_attrs) -> Task(name=$0, attributes=$1)", | ||
| + "task_attrs := 'lsquare' + list(task_attr) + 'rsquare' -> $1", | ||
| + "task_attr := 'identifier' + 'assign' + task_attr_value -> TaskAttribute(key=$0, value=$2)", | ||
| + "task_attr_value := 'identifier' | 'string' | 'number'", | ||
| + "step_name := 'as' + 'identifier' -> $1", | ||
| + "step_attr := step_input_list | step_output_list", | ||
| + "step_input_list := 'input' + 'colon' + list(step_input, 'comma') + 'semi' -> StepInputList( inputs=$2 )", | ||
| + "step_input := 'identifier' + 'assign' + variable -> StepInput(parameter=$0, value=$2)", | ||
| + "step_output_list := 'output' + 'colon' + list(step_output, 'comma') + 'semi' -> StepOutputList( outputs=$2 )", | ||
| + "step_output := step_output_mode + 'lparen' + 'string' + 'rparen' + step_output_location -> StepOutput( mode=$0, expression=$2, var=$4 )", | ||
| + "step_output_mode := 'file' | 'first_line'", | ||
| + "step_output_location := 'as' + variable -> OutputVariable( var=$1 )", | ||
| + "step_output_location := 'into' + variable -> OutputListAppend( var=$1 )", | ||
| + "variable := 'identifier' + optional(variable_member) -> Variable(name=$0, member=$1)", | ||
| + "variable_member := 'dot' + 'identifier -> $1" | ||
| + ] | ||
| + } | ||
| +} |
Oops, something went wrong.
0 comments on commit
f9b810b