From 7bdd8fdba3a418190f2e74c67a378176642e5cb7 Mon Sep 17 00:00:00 2001 From: geoffjentry Date: Fri, 24 Feb 2017 16:59:38 -0500 Subject: [PATCH] checkpoint --- java/Makefile | 9 - java/example.wdl | 17 - java/generate.sh | 4 - java/java7/Main.java | 23 - java/java7/Makefile | 1 - java/java8/Main.java | 23 - java/java8/Makefile | 1 - parsers/README.md | 3 + parsers/java/Makefile | 7 + {java => parsers/java}/README.md | 0 {java => parsers/java}/download.sh | 0 parsers/java/generate.sh | 4 + {java/java8 => parsers/java/java7}/WdlParser.java | 7258 ++++++++++---------- {java/java7 => parsers/java/java8}/WdlParser.java | 7232 ++++++++++--------- {javascript => parsers/javascript}/.gitignore | 0 parsers/javascript/Makefile | 5 + {javascript => parsers/javascript}/README.md | 2 +- {javascript => parsers/javascript}/hermes | 0 {javascript => parsers/javascript}/sample.js | 0 .../javascript}/tests/cases/0/ast | 0 .../javascript}/tests/cases/0/wdl | 0 .../javascript}/tests/cases/1/ast | 0 .../javascript}/tests/cases/1/wdl | 0 .../javascript}/tests/cases/2/ast | 0 .../javascript}/tests/cases/2/wdl | 0 .../javascript}/tests/cases/3/ast | 0 .../javascript}/tests/cases/3/wdl | 0 .../javascript}/tests/cases/4/ast | 0 .../javascript}/tests/cases/4/wdl | 0 .../javascript}/tests/cases/5/ast | 0 .../javascript}/tests/cases/5/wdl | 0 .../javascript}/tests/package.json | 0 .../javascript}/tests/parser-test.js | 0 {javascript => parsers/javascript}/wdl_parser.js | 1796 +++-- parsers/python/Makefile | 5 + parsers/python/README.md | 6 + parsers/python/wdl_parser.py | 3856 +++++++++++ python/README.md | 5 - 38 files changed, 11777 insertions(+), 8480 deletions(-) delete mode 100644 java/Makefile delete mode 100644 java/example.wdl delete mode 100644 java/generate.sh delete mode 100644 java/java7/Main.java delete mode 120000 java/java7/Makefile delete mode 100644 java/java8/Main.java delete mode 120000 java/java8/Makefile create mode 100644 parsers/README.md create mode 100644 parsers/java/Makefile rename {java => parsers/java}/README.md (100%) rename {java => parsers/java}/download.sh (100%) mode change 100644 => 100755 create mode 100755 parsers/java/generate.sh rename {java/java8 => parsers/java/java7}/WdlParser.java (72%) rename {java/java7 => parsers/java/java8}/WdlParser.java (71%) rename {javascript => parsers/javascript}/.gitignore (100%) create mode 100644 parsers/javascript/Makefile rename {javascript => parsers/javascript}/README.md (94%) rename {javascript => parsers/javascript}/hermes (100%) rename {javascript => parsers/javascript}/sample.js (100%) rename {javascript => parsers/javascript}/tests/cases/0/ast (100%) rename {javascript => parsers/javascript}/tests/cases/0/wdl (100%) rename {javascript => parsers/javascript}/tests/cases/1/ast (100%) rename {javascript => parsers/javascript}/tests/cases/1/wdl (100%) rename {javascript => parsers/javascript}/tests/cases/2/ast (100%) rename {javascript => parsers/javascript}/tests/cases/2/wdl (100%) rename {javascript => parsers/javascript}/tests/cases/3/ast (100%) rename {javascript => parsers/javascript}/tests/cases/3/wdl (100%) rename {javascript => parsers/javascript}/tests/cases/4/ast (100%) rename {javascript => parsers/javascript}/tests/cases/4/wdl (100%) rename {javascript => parsers/javascript}/tests/cases/5/ast (100%) rename {javascript => parsers/javascript}/tests/cases/5/wdl (100%) rename {javascript => parsers/javascript}/tests/package.json (100%) rename {javascript => parsers/javascript}/tests/parser-test.js (100%) rename {javascript => parsers/javascript}/wdl_parser.js (85%) create mode 100644 parsers/python/Makefile create mode 100644 parsers/python/README.md create mode 100644 parsers/python/wdl_parser.py delete mode 100644 python/README.md diff --git a/java/Makefile b/java/Makefile deleted file mode 100644 index 599cb7f..0000000 --- a/java/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -all: deps compile run -deps: - sh ../download.sh -compile: - javac -cp ".:*" Main.java -run: - java -cp ".:*" Main ../example.wdl -clean: - -rm -rf *.class *.jar diff --git a/java/example.wdl b/java/example.wdl deleted file mode 100644 index b58380c..0000000 --- a/java/example.wdl +++ /dev/null @@ -1,17 +0,0 @@ -task wc { - String str - command { - echo "${str}" | wc -c - } - output { - Int count = read_int("stdout") - 1 - } -} - -workflow wf { - String esc = "a\n\"b\t\"" - Array[String] str_array - scatter(s in str_array) { - call wc{input: str=s} - } -} diff --git a/java/generate.sh b/java/generate.sh deleted file mode 100644 index b4a6119..0000000 --- a/java/generate.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -hermes generate ../grammar.hgr --name=wdl --directory=java7 --language=java --java-use-apache-commons --java-imports=org.apache.commons.lang3.StringEscapeUtils -hermes generate ../grammar.hgr --name=wdl --directory=java8 --language=java --java-imports=org.apache.commons.lang3.StringEscapeUtils diff --git a/java/java7/Main.java b/java/java7/Main.java deleted file mode 100644 index d9121b4..0000000 --- a/java/java7/Main.java +++ /dev/null @@ -1,23 +0,0 @@ -import java.io.File; -import java.io.FileNotFoundException; -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - if (args.length < 1) { - System.err.println("java Main "); - } - File wdl = new File(args[0]); - try { - String wdlSource = new Scanner(wdl, "UTF-8").useDelimiter("\\A").next(); - WdlParser parser = new WdlParser(); - WdlParser.TokenStream tokens = new WdlParser.TokenStream(parser.lex(wdlSource, wdl.getName())); - WdlParser.Ast ast = (WdlParser.Ast) parser.parse(tokens).toAst(); - System.out.println(ast.toPrettyString()); - } catch(FileNotFoundException e) { - System.err.println(e); - } catch(WdlParser.SyntaxError e) { - System.err.println(e); - } - } -} diff --git a/java/java7/Makefile b/java/java7/Makefile deleted file mode 120000 index d0b0e8e..0000000 --- a/java/java7/Makefile +++ /dev/null @@ -1 +0,0 @@ -../Makefile \ No newline at end of file diff --git a/java/java8/Main.java b/java/java8/Main.java deleted file mode 100644 index d9121b4..0000000 --- a/java/java8/Main.java +++ /dev/null @@ -1,23 +0,0 @@ -import java.io.File; -import java.io.FileNotFoundException; -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - if (args.length < 1) { - System.err.println("java Main "); - } - File wdl = new File(args[0]); - try { - String wdlSource = new Scanner(wdl, "UTF-8").useDelimiter("\\A").next(); - WdlParser parser = new WdlParser(); - WdlParser.TokenStream tokens = new WdlParser.TokenStream(parser.lex(wdlSource, wdl.getName())); - WdlParser.Ast ast = (WdlParser.Ast) parser.parse(tokens).toAst(); - System.out.println(ast.toPrettyString()); - } catch(FileNotFoundException e) { - System.err.println(e); - } catch(WdlParser.SyntaxError e) { - System.err.println(e); - } - } -} diff --git a/java/java8/Makefile b/java/java8/Makefile deleted file mode 120000 index d0b0e8e..0000000 --- a/java/java8/Makefile +++ /dev/null @@ -1 +0,0 @@ -../Makefile \ No newline at end of file diff --git a/parsers/README.md b/parsers/README.md new file mode 100644 index 0000000..eff580d --- /dev/null +++ b/parsers/README.md @@ -0,0 +1,3 @@ +# Parsers for WDL + +This directory contains pregenerated parsers for WDL in a variety of languages. Except for the Java parser, all of these are provided *as-is*. We believe that they work but do not have the resources to validate that claim, but if you're willing to help us fix any issues you come across we'll work with you to do so." \ No newline at end of file diff --git a/parsers/java/Makefile b/parsers/java/Makefile new file mode 100644 index 0000000..b0120ce --- /dev/null +++ b/parsers/java/Makefile @@ -0,0 +1,7 @@ +all: deps generate +deps: + sh download.sh +generate: + sh generate.sh +clean: + rm -rf *.class *.jar diff --git a/java/README.md b/parsers/java/README.md similarity index 100% rename from java/README.md rename to parsers/java/README.md diff --git a/java/download.sh b/parsers/java/download.sh old mode 100644 new mode 100755 similarity index 100% rename from java/download.sh rename to parsers/java/download.sh diff --git a/parsers/java/generate.sh b/parsers/java/generate.sh new file mode 100755 index 0000000..c8f9d93 --- /dev/null +++ b/parsers/java/generate.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +hermes generate ../../grammar.hgr --name=wdl --directory=java7 --language=java --java-use-apache-commons --java-imports=org.apache.commons.lang3.StringEscapeUtils +hermes generate ../../grammar.hgr --name=wdl --directory=java8 --language=java --java-imports=org.apache.commons.lang3.StringEscapeUtils diff --git a/java/java8/WdlParser.java b/parsers/java/java7/WdlParser.java similarity index 72% rename from java/java8/WdlParser.java rename to parsers/java/java7/WdlParser.java index d92b243..2668c87 100644 --- a/java/java8/WdlParser.java +++ b/parsers/java/java7/WdlParser.java @@ -8,6 +8,7 @@ import java.nio.*; import java.nio.channels.FileChannel; import java.nio.charset.Charset; +import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringEscapeUtils; import java.util.regex.Pattern; import java.util.regex.Matcher; @@ -81,6 +82,10 @@ public SyntaxError(String message) { String noMoreTokens(String method, TerminalIdentifier expecting, Terminal last); /* Invalid terminal is found in the token stream. */ String invalidTerminal(String method, Terminal invalid); + /* For lists that have a minimum required size which is not met */ + String missingListItems(String method, int required, int found, Terminal last); + /* For lists that require a terminal to terminate each element in the list */ + String missingTerminator(String method, TerminalIdentifier terminator, Terminal last); } public static class TokenStream extends ArrayList { private int index; @@ -277,7 +282,7 @@ public String toString() { this.getLine(), this.getColumn(), this.getTerminalStr(), - Base64.getEncoder().encodeToString(source_string_bytes) + Base64.encodeBase64String(source_string_bytes) ); } public String toPrettyString() { @@ -293,7 +298,7 @@ public String toPrettyString(int indent) { private ArrayList children; private boolean isExpr, isNud, isPrefix, isInfix, isExprNud; private int nudMorphemeCount; - private Terminal listSeparator; + private int listSeparatorId; private boolean list; private AstTransform astTransform; ParseTree(NonTerminal nonterminal) { @@ -306,7 +311,7 @@ public String toPrettyString(int indent) { this.isInfix = false; this.isExprNud = false; this.nudMorphemeCount = 0; - this.listSeparator = null; + this.listSeparatorId = -1; this.list = false; } public void setExpr(boolean value) { this.isExpr = value; } @@ -317,7 +322,7 @@ public String toPrettyString(int indent) { public void setAstTransformation(AstTransform value) { this.astTransform = value; } public void setNudMorphemeCount(int value) { this.nudMorphemeCount = value; } public void setList(boolean value) { this.list = value; } - public void setListSeparator(Terminal value) { this.listSeparator = value; } + public void setListSeparator(int value) { this.listSeparatorId = value; } public int getNudMorphemeCount() { return this.nudMorphemeCount; } public List getChildren() { return this.children; } public boolean isInfix() { return this.isInfix; } @@ -343,16 +348,16 @@ private boolean isCompoundNud() { public AstNode toAst() { if ( this.list == true ) { AstList astList = new AstList(); - int end = this.children.size() - 1; if ( this.children.size() == 0 ) { return astList; } - for (int i = 0; i < this.children.size() - 1; i++) { - if (this.children.get(i) instanceof Terminal && this.listSeparator != null && ((Terminal)this.children.get(i)).id == this.listSeparator.id) + for (int i = 0; i < this.children.size(); i++) { + if (this.children.get(i) instanceof Terminal && this.listSeparatorId >= 0 && + ((Terminal) this.children.get(i)).id == this.listSeparatorId) { continue; + } astList.add(this.children.get(i).toAst()); } - astList.addAll((AstList) this.children.get(this.children.size() - 1).toAst()); return astList; } else if ( this.isExpr ) { if ( this.astTransform instanceof AstTransformSubstitution ) { @@ -461,6 +466,12 @@ public String noMoreTokens(String method, TerminalIdentifier expecting, Terminal public String invalidTerminal(String method, Terminal invalid) { return "Invalid symbol ID: "+invalid.getId()+" ("+invalid.getTerminalStr()+")"; } + public String missingListItems(String method, int required, int found, Terminal last) { + return "List for "+method+" requires "+required+" items but only "+found+" were found."; + } + public String missingTerminator(String method, TerminalIdentifier terminator, Terminal last) { + return "List for "+method+" is missing a terminator"; + } } public interface TerminalMap { TerminalIdentifier get(String string); @@ -491,62 +502,62 @@ public String invalidTerminal(String method, Terminal invalid) { public String string(); } public enum WdlTerminalIdentifier implements TerminalIdentifier { - TERMINAL_RAW_CMD_END(0, "raw_cmd_end"), - TERMINAL_RPAREN(1, "rparen"), - TERMINAL_TASK(2, "task"), - TERMINAL_NOT_EQUAL(3, "not_equal"), - TERMINAL_LTEQ(4, "lteq"), - TERMINAL_OUTPUT(5, "output"), - TERMINAL_IDENTIFIER(6, "identifier"), - TERMINAL_DOUBLE_EQUAL(7, "double_equal"), + TERMINAL_AS(37, "as"), + TERMINAL_ASTERISK(49, "asterisk"), + TERMINAL_BOOLEAN(19, "boolean"), + TERMINAL_CALL(29, "call"), + TERMINAL_CMD_ATTR_HINT(5, "cmd_attr_hint"), + TERMINAL_CMD_PARAM_END(55, "cmd_param_end"), + TERMINAL_CMD_PARAM_START(22, "cmd_param_start"), + TERMINAL_CMD_PART(54, "cmd_part"), + TERMINAL_COLON(40, "colon"), + TERMINAL_COMMA(30, "comma"), + TERMINAL_DASH(17, "dash"), + TERMINAL_DOT(36, "dot"), + TERMINAL_DOUBLE_AMPERSAND(7, "double_ampersand"), + TERMINAL_DOUBLE_EQUAL(21, "double_equal"), + TERMINAL_DOUBLE_PIPE(28, "double_pipe"), + TERMINAL_E(0, "e"), + TERMINAL_EQUAL(34, "equal"), + TERMINAL_FLOAT(35, "float"), + TERMINAL_FQN(42, "fqn"), + TERMINAL_GT(13, "gt"), + TERMINAL_GTEQ(33, "gteq"), + TERMINAL_IDENTIFIER(24, "identifier"), + TERMINAL_IF(46, "if"), + TERMINAL_IMPORT(48, "import"), + TERMINAL_IN(38, "in"), + TERMINAL_INPUT(53, "input"), + TERMINAL_INTEGER(18, "integer"), + TERMINAL_LBRACE(14, "lbrace"), + TERMINAL_LPAREN(52, "lparen"), + TERMINAL_LSQUARE(43, "lsquare"), TERMINAL_LT(8, "lt"), - TERMINAL_CMD_PARAM_END(9, "cmd_param_end"), - TERMINAL_RAW_COMMAND(10, "raw_command"), - TERMINAL_PLUS(11, "plus"), - TERMINAL_IN(12, "in"), - TERMINAL_STRING(13, "string"), - TERMINAL_INTEGER(14, "integer"), - TERMINAL_CMD_ATTR_HINT(15, "cmd_attr_hint"), - TERMINAL_FQN(16, "fqn"), - TERMINAL_WORKFLOW(17, "workflow"), - TERMINAL_NOT(18, "not"), - TERMINAL_SLASH(19, "slash"), - TERMINAL_DOUBLE_PIPE(20, "double_pipe"), - TERMINAL_FLOAT(21, "float"), - TERMINAL_COMMA(22, "comma"), - TERMINAL_TYPE_E(23, "type_e"), - TERMINAL_GT(24, "gt"), - TERMINAL_OBJECT(25, "object"), - TERMINAL_RAW_CMD_START(26, "raw_cmd_start"), - TERMINAL_LBRACE(27, "lbrace"), - TERMINAL_PERCENT(28, "percent"), - TERMINAL_RSQUARE(29, "rsquare"), - TERMINAL_GTEQ(30, "gteq"), - TERMINAL_META(31, "meta"), - TERMINAL_SCATTER(32, "scatter"), - TERMINAL_LPAREN(33, "lparen"), - TERMINAL_ASTERISK(34, "asterisk"), - TERMINAL_BOOLEAN(35, "boolean"), - TERMINAL_QMARK(36, "qmark"), - TERMINAL_DASH(37, "dash"), - TERMINAL_TYPE(38, "type"), - TERMINAL_INPUT(39, "input"), - TERMINAL_DOUBLE_AMPERSAND(40, "double_ampersand"), - TERMINAL_CMD_PART(41, "cmd_part"), - TERMINAL_PARAMETER_META(42, "parameter_meta"), - TERMINAL_RUNTIME(43, "runtime"), - TERMINAL_WHILE(44, "while"), - TERMINAL_E(45, "e"), - TERMINAL_DOT(46, "dot"), - TERMINAL_IMPORT(47, "import"), - TERMINAL_CMD_PARAM_START(48, "cmd_param_start"), - TERMINAL_LSQUARE(49, "lsquare"), - TERMINAL_IF(50, "if"), - TERMINAL_CALL(51, "call"), - TERMINAL_AS(52, "as"), - TERMINAL_RBRACE(53, "rbrace"), - TERMINAL_EQUAL(54, "equal"), - TERMINAL_COLON(55, "colon"), + TERMINAL_LTEQ(41, "lteq"), + TERMINAL_META(23, "meta"), + TERMINAL_NOT(9, "not"), + TERMINAL_NOT_EQUAL(15, "not_equal"), + TERMINAL_OBJECT(16, "object"), + TERMINAL_OUTPUT(20, "output"), + TERMINAL_PARAMETER_META(27, "parameter_meta"), + TERMINAL_PERCENT(10, "percent"), + TERMINAL_PLUS(6, "plus"), + TERMINAL_QMARK(45, "qmark"), + TERMINAL_RAW_CMD_END(2, "raw_cmd_end"), + TERMINAL_RAW_CMD_START(1, "raw_cmd_start"), + TERMINAL_RAW_COMMAND(4, "raw_command"), + TERMINAL_RBRACE(11, "rbrace"), + TERMINAL_RPAREN(32, "rparen"), + TERMINAL_RSQUARE(51, "rsquare"), + TERMINAL_RUNTIME(39, "runtime"), + TERMINAL_SCATTER(50, "scatter"), + TERMINAL_SLASH(47, "slash"), + TERMINAL_STRING(44, "string"), + TERMINAL_TASK(26, "task"), + TERMINAL_TYPE(12, "type"), + TERMINAL_TYPE_E(31, "type_e"), + TERMINAL_WHILE(3, "while"), + TERMINAL_WORKFLOW(25, "workflow"), END_SENTINAL(-3, "END_SENTINAL"); private final int id; private final String string; @@ -559,1938 +570,1702 @@ public String invalidTerminal(String method, Terminal invalid) { } /* table[nonterminal][terminal] = rule */ private static final int[][] table = { - { -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, 39, -1, 39, 39, 36, -1, -1, 39, -1, -1, 39, -1, -1, -1, 39, -1, 39, -1, -1, -1, -1, -1, 39, -1, 39, -1, 39, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, 39, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 25, -1, -1, -1, -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, -1 }, - { -1, -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, -1, -1, -1, 79, -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, 80, 80, -1, 80, -1, -1 }, - { -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, -1, 16, 17, -1, -1, 17, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 92, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, -1, -1 }, - { -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, 67, 67, -1, 68, -1, -1 }, - { -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 137, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { 38, -1, -1, -1, -1, -1, 38, -1, -1, 38, -1, -1, -1, -1, 38, -1, 38, 38, 38, 38, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, 38, 38, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, -1, 46, -1, -1, 48, -1, -1, -1, 47, -1, 41, -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, 45, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, 65, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, 50, 50, -1, 50, -1, -1, -1, -1, -1, 50, -1, -1, 50, -1, -1, -1, 50, -1, 50, -1, 50, -1, -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, 50, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 2, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, -1, -1, -1, -1, -1, 110, -1, -1, -1, -1, -1, -1, -1, -1, 107, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, -1, 142, -1, 142, 142, -1, -1, -1, 142, -1, -1, 142, -1, -1, -1, 142, -1, 142, -1, -1, -1, -1, -1, 142, -1, 142, -1, 142, -1, -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, 142, -1, -1, -1, 145, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, 66, 66, -1, 69, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 18, -1, -1, -1, -1, 18, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, -1, -1, -1, -1, -1, -1, -1, 18, -1, -1, -1, -1, -1, -1, 15, 18, -1, -1, 18, 18, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 99, -1, -1, -1, -1, -1, -1, 100, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 101, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 58, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, 131, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, 131, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 144, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, -1 }, - { 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, 38, -1, 38, 38, 37, -1, -1, 38, -1, -1, 38, -1, -1, -1, 38, -1, 38, -1, -1, -1, -1, -1, 38, -1, 38, -1, 38, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 76, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, 75, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, 73, -1, -1, -1, -1, -1, 74, 71, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 84, -1, -1 }, - { -1, 132, -1, -1, -1, -1, 129, -1, -1, -1, -1, 129, -1, 129, 129, -1, -1, -1, 129, -1, -1, 129, -1, -1, -1, 129, -1, 129, -1, 132, -1, -1, -1, 129, -1, 129, -1, 129, -1, -1, -1, -1, -1, -1, -1, 129, -1, -1, -1, 129, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, -1, -1, -1, 78, -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, 78, 78, 77, 78, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 54, -1, -1 }, - { -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 11, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, 65, -1, 65, 65, -1, -1, -1, 65, -1, -1, 65, -1, -1, -1, 65, -1, 65, -1, -1, -1, -1, -1, 65, -1, 65, -1, 65, -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, 65, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 104, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 85, -1, -1 }, - { -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 60, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, -1, -1, 60, 60, -1, -1, -1, -1, -1, 60, 60, -1, -1, 60, 60, 60, -1, -1, -1, -1, -1, 60, 60, -1, 60, 59, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 97, -1, -1 }, - { -1, -1, -1, -1, -1, -1, 136, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 139, -1, -1 }, + { -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 57, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, 35, 35, -1, -1, -1, -1, -1, -1, 35, 35, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, 35, -1, 35, 35, 35, -1, 35, -1, 35, -1, -1, 34, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, 35, -1, -1, 35, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, -1, 52, 52, -1, 51, -1, -1, -1, -1, -1, 52, -1, -1, 52, -1, -1, -1, 52, -1, 52, -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, 52, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 7, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, -1, -1, 17, -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, }; static { Map> map = new HashMap>(); - map.put(56, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - })); - map.put(57, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(58, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - })); - map.put(59, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_META, + map.put(79, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, })); - map.put(60, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(63, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, WdlTerminalIdentifier.TERMINAL_TYPE, - })); - map.put(61, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(62, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(63, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(73, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - })); - map.put(64, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(65, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_EQUAL, - })); - map.put(66, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, - })); - map.put(67, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - })); - map.put(68, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(69, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(70, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(71, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(83, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(72, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_QMARK, - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(113, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(73, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(101, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INPUT, })); - map.put(74, Arrays.asList(new TerminalIdentifier[] { + map.put(57, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(75, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - })); - map.put(76, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(61, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(77, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(75, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DOT, })); - map.put(78, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(84, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(79, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(78, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(80, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(81, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_TYPE, + map.put(60, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(82, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_TYPE, + map.put(115, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(83, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(99, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(84, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(85, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(86, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(87, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); map.put(88, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(89, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - })); - map.put(90, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(91, Arrays.asList(new TerminalIdentifier[] { + map.put(85, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(92, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, + map.put(90, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(93, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_TYPE, + map.put(111, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, })); - map.put(94, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(67, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(95, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DOT, + map.put(71, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(96, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FQN, + map.put(107, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_EQUAL, })); - map.put(97, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_QMARK, - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(100, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); map.put(98, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(99, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, })); - map.put(100, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(101, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(97, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(102, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_TYPE, + map.put(105, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INPUT, })); - map.put(103, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, + map.put(70, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, })); - map.put(104, Arrays.asList(new TerminalIdentifier[] { + map.put(81, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, })); - map.put(105, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DOT, + map.put(91, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, })); - map.put(106, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(110, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(107, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(103, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(108, Arrays.asList(new TerminalIdentifier[] { + map.put(86, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IMPORT, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(109, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + map.put(80, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(110, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(104, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_CALL, })); - map.put(111, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, + map.put(109, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, })); map.put(112, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, + })); + map.put(72, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_LPAREN, + })); + map.put(77, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, + })); + map.put(66, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_PLUS, WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_STRING, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(113, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(114, Arrays.asList(new TerminalIdentifier[] { + map.put(69, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(115, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(65, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, })); - map.put(116, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, + map.put(59, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(117, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + map.put(93, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(118, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(114, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + })); + map.put(89, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, })); - map.put(119, Arrays.asList(new TerminalIdentifier[] { + map.put(56, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(120, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, + map.put(92, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, })); - map.put(121, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, + map.put(116, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(122, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + map.put(62, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_EQUAL, })); - map.put(123, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(95, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, })); - map.put(124, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, + map.put(82, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(125, Arrays.asList(new TerminalIdentifier[] { + map.put(68, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(126, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, + map.put(74, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, })); - map.put(127, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(96, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(128, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_EQUAL, + map.put(58, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(102, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DOT, })); - map.put(129, Arrays.asList(new TerminalIdentifier[] { + map.put(106, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_FQN, })); - map.put(130, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(76, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + })); + map.put(94, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + })); + map.put(64, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(87, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + map.put(108, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); nonterminal_first = Collections.unmodifiableMap(map); } static { Map> map = new HashMap>(); - map.put(56, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, + map.put(79, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(57, Arrays.asList(new TerminalIdentifier[] { + map.put(63, Arrays.asList(new TerminalIdentifier[] { + })); + map.put(73, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_INPUT, })); - map.put(58, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(83, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(59, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(113, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - })); - map.put(60, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(61, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(101, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE, })); - map.put(62, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(57, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(63, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(64, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(61, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, })); - map.put(65, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(75, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_INPUT, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(84, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RSQUARE, + })); + map.put(78, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RPAREN, + WdlTerminalIdentifier.TERMINAL_RSQUARE, + })); + map.put(60, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(66, Arrays.asList(new TerminalIdentifier[] { + map.put(115, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, WdlTerminalIdentifier.TERMINAL_TASK, - })); - map.put(67, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, - })); - map.put(68, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(69, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(70, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(71, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(72, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(73, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(74, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(75, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(76, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_QMARK, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_RSQUARE, - WdlTerminalIdentifier.TERMINAL_COMMA, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(77, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(78, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RSQUARE, - })); - map.put(79, Arrays.asList(new TerminalIdentifier[] { + map.put(99, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(80, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(88, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INPUT, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(81, Arrays.asList(new TerminalIdentifier[] { + map.put(85, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(82, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_TYPE, + map.put(90, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, })); - map.put(83, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RPAREN, - WdlTerminalIdentifier.TERMINAL_LTEQ, - WdlTerminalIdentifier.TERMINAL_NOT_EQUAL, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(111, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_DOUBLE_EQUAL, - WdlTerminalIdentifier.TERMINAL_LT, - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_END, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_SLASH, - WdlTerminalIdentifier.TERMINAL_DOUBLE_PIPE, - WdlTerminalIdentifier.TERMINAL_FLOAT, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_COMMA, - WdlTerminalIdentifier.TERMINAL_GT, - WdlTerminalIdentifier.TERMINAL_OBJECT, WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_PERCENT, - WdlTerminalIdentifier.TERMINAL_RSQUARE, - WdlTerminalIdentifier.TERMINAL_GTEQ, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_ASTERISK, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_DOUBLE_AMPERSAND, - WdlTerminalIdentifier.TERMINAL_INPUT, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_WHILE, WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COLON, - })); - map.put(84, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(85, Arrays.asList(new TerminalIdentifier[] { + map.put(67, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(86, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RSQUARE, - })); - map.put(87, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, })); - map.put(88, Arrays.asList(new TerminalIdentifier[] { + map.put(71, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(89, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, })); - map.put(90, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(107, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(91, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - })); - map.put(92, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, - })); - map.put(93, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_WHILE, WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_TASK, WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(94, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(100, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - })); - map.put(95, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(96, Arrays.asList(new TerminalIdentifier[] { + map.put(98, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); map.put(97, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(98, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RSQUARE, - WdlTerminalIdentifier.TERMINAL_RPAREN, - })); - map.put(99, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(100, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, + map.put(105, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(101, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(102, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(103, Arrays.asList(new TerminalIdentifier[] { + map.put(70, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + WdlTerminalIdentifier.TERMINAL_CMD_PART, WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, })); - map.put(104, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(81, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(105, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(106, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(91, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE, - })); - map.put(107, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(108, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(109, Arrays.asList(new TerminalIdentifier[] { + map.put(110, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + WdlTerminalIdentifier.TERMINAL_CMD_PART, WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, })); - map.put(110, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(103, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TASK, WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_CALL, - })); - map.put(111, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(112, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RSQUARE, - WdlTerminalIdentifier.TERMINAL_RPAREN, + map.put(86, Arrays.asList(new TerminalIdentifier[] { })); - map.put(113, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, + map.put(80, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_ASTERISK, + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_END, + WdlTerminalIdentifier.TERMINAL_COLON, + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_DOUBLE_AMPERSAND, + WdlTerminalIdentifier.TERMINAL_DOUBLE_EQUAL, + WdlTerminalIdentifier.TERMINAL_DOUBLE_PIPE, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_GT, + WdlTerminalIdentifier.TERMINAL_GTEQ, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_INTEGER, WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LT, + WdlTerminalIdentifier.TERMINAL_LTEQ, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_NOT_EQUAL, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_PERCENT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RPAREN, + WdlTerminalIdentifier.TERMINAL_RSQUARE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_SLASH, + WdlTerminalIdentifier.TERMINAL_STRING, + WdlTerminalIdentifier.TERMINAL_TASK, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(114, Arrays.asList(new TerminalIdentifier[] { + map.put(104, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(115, Arrays.asList(new TerminalIdentifier[] { + map.put(109, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + map.put(112, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(116, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, + map.put(72, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_RBRACE, + })); + map.put(77, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(117, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, + map.put(66, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(118, Arrays.asList(new TerminalIdentifier[] { + map.put(69, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(119, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(65, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - })); - map.put(120, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, - })); - map.put(121, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(122, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, + map.put(59, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(123, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(93, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(124, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(114, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(125, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(89, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(126, Arrays.asList(new TerminalIdentifier[] { + map.put(56, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(127, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, - })); - map.put(128, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(92, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(116, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, + })); + map.put(62, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(129, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(130, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - nonterminal_follow = Collections.unmodifiableMap(map); - } - static { - Map> map = new HashMap>(); - map.put(0, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - })); - map.put(1, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - })); - map.put(2, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(3, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(4, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, - })); - map.put(5, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - WdlTerminalIdentifier.TERMINAL_TASK, - })); - map.put(6, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(7, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(8, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + map.put(95, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TASK, - })); - map.put(9, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(10, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, - })); - map.put(11, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, - })); - map.put(12, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(13, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - })); - map.put(14, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, + map.put(82, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_RSQUARE, })); - map.put(15, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(68, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_TYPE, - })); - map.put(16, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_TYPE, - })); - map.put(17, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(18, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(19, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(74, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_META, - })); - map.put(20, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(21, Arrays.asList(new TerminalIdentifier[] { + map.put(96, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(22, Arrays.asList(new TerminalIdentifier[] { + map.put(58, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(23, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(102, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(24, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(106, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(25, Arrays.asList(new TerminalIdentifier[] { + map.put(76, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(26, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - })); - map.put(27, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(28, Arrays.asList(new TerminalIdentifier[] { + map.put(94, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_META, - })); - map.put(29, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - })); - map.put(30, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - })); - map.put(31, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(32, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(33, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - })); - map.put(34, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, - })); - map.put(35, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - })); - map.put(36, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - })); - map.put(37, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - })); - map.put(38, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(39, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(40, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - })); - map.put(41, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - })); - map.put(42, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(64, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(43, Arrays.asList(new TerminalIdentifier[] { + map.put(87, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + map.put(108, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(44, Arrays.asList(new TerminalIdentifier[] { + nonterminal_follow = Collections.unmodifiableMap(map); + } + static { + Map> map = new HashMap>(); + map.put(0, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, })); - map.put(45, Arrays.asList(new TerminalIdentifier[] { + map.put(1, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(46, Arrays.asList(new TerminalIdentifier[] { + map.put(39, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(47, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_TYPE, - })); - map.put(48, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); map.put(49, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_AS, })); map.put(50, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_META, })); map.put(51, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_LBRACE, })); map.put(52, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(53, Arrays.asList(new TerminalIdentifier[] { })); map.put(54, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(55, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_INPUT, })); map.put(56, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(57, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_QMARK, - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(60, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(58, Arrays.asList(new TerminalIdentifier[] { + map.put(65, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DOT, })); - map.put(59, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_EQUAL, + map.put(66, Arrays.asList(new TerminalIdentifier[] { })); - map.put(60, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(61, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(75, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(62, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_EQUAL, + map.put(96, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(63, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_QMARK, + map.put(100, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(64, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(6, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(65, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(7, Arrays.asList(new TerminalIdentifier[] { + })); + map.put(103, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(66, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_IF, + map.put(10, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_CALL, - })); - map.put(67, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_OUTPUT, WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_CALL, - })); - map.put(68, Arrays.asList(new TerminalIdentifier[] { })); - map.put(69, Arrays.asList(new TerminalIdentifier[] { + map.put(11, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(70, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + map.put(18, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(71, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CALL, + map.put(22, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, })); - map.put(72, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(25, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(73, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - })); - map.put(74, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IF, + map.put(31, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(75, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(34, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_EQUAL, })); - map.put(76, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(35, Arrays.asList(new TerminalIdentifier[] { })); - map.put(77, Arrays.asList(new TerminalIdentifier[] { + map.put(59, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(78, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(79, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(80, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(81, Arrays.asList(new TerminalIdentifier[] { + map.put(53, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, })); - map.put(82, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(83, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(84, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(85, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(86, Arrays.asList(new TerminalIdentifier[] { + map.put(55, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(87, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(88, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(89, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(90, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(91, Arrays.asList(new TerminalIdentifier[] { + map.put(57, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_INPUT, })); - map.put(92, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(93, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, - })); - map.put(94, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FQN, - })); - map.put(95, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(96, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(97, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(98, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(99, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DOT, - })); - map.put(100, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(101, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FQN, - })); - map.put(102, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DOT, - })); - map.put(103, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - })); - map.put(104, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IF, - })); - map.put(105, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_SCATTER, - })); - map.put(106, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(23, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, })); - map.put(107, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_TYPE, + map.put(24, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, })); - map.put(108, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(19, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, })); - map.put(109, Arrays.asList(new TerminalIdentifier[] { + map.put(21, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, })); - map.put(110, Arrays.asList(new TerminalIdentifier[] { + map.put(20, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(111, Arrays.asList(new TerminalIdentifier[] { + map.put(36, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(112, Arrays.asList(new TerminalIdentifier[] { + map.put(2, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, + WdlTerminalIdentifier.TERMINAL_TASK, WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(113, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(90, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(114, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(89, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(115, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(81, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(116, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(82, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(117, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_LPAREN, + })); + map.put(80, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, - WdlTerminalIdentifier.TERMINAL_OBJECT, WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(118, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(119, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(86, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(120, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(87, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(121, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(84, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(122, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(85, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(123, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(83, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(124, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(92, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(125, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(88, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(126, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_NOT, - })); - map.put(127, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(128, Arrays.asList(new TerminalIdentifier[] { + map.put(91, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, - })); - map.put(129, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(130, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(108, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, })); - map.put(131, Arrays.asList(new TerminalIdentifier[] { + map.put(95, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DASH, })); - map.put(132, Arrays.asList(new TerminalIdentifier[] { + map.put(110, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FLOAT, })); - map.put(133, Arrays.asList(new TerminalIdentifier[] { + map.put(107, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(134, Arrays.asList(new TerminalIdentifier[] { + map.put(99, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(135, Arrays.asList(new TerminalIdentifier[] { + map.put(97, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(136, Arrays.asList(new TerminalIdentifier[] { + map.put(98, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(137, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(138, Arrays.asList(new TerminalIdentifier[] { + map.put(109, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INTEGER, })); - map.put(139, Arrays.asList(new TerminalIdentifier[] { + map.put(104, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(140, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OBJECT, + map.put(105, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LPAREN, })); - map.put(141, Arrays.asList(new TerminalIdentifier[] { + map.put(102, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_LSQUARE, })); - map.put(142, Arrays.asList(new TerminalIdentifier[] { + map.put(93, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_NOT, + })); + map.put(101, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OBJECT, + })); + map.put(94, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, + })); + map.put(106, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(72, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IF, + })); + map.put(8, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, + })); + map.put(9, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, + })); + map.put(33, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + })); + map.put(32, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, + })); + map.put(38, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_STRING, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LBRACE, WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(143, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(58, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(144, Arrays.asList(new TerminalIdentifier[] { + map.put(30, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, })); - map.put(145, Arrays.asList(new TerminalIdentifier[] { + map.put(74, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(146, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, + map.put(27, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(147, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LPAREN, + map.put(26, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, })); - map.put(148, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_STRING, + map.put(29, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, })); - map.put(149, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(28, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(150, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + map.put(73, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, })); - map.put(151, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INTEGER, + map.put(13, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, })); - map.put(152, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FLOAT, + map.put(17, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, })); - rule_first = Collections.unmodifiableMap(map); - } - static { - Map> map = new HashMap>(); - map.put(56, new ArrayList()); - map.put(57, new ArrayList()); - map.put(58, new ArrayList()); - map.put(59, new ArrayList()); - map.put(60, new ArrayList()); - map.put(61, new ArrayList()); - map.put(62, new ArrayList()); - map.put(63, new ArrayList()); - map.put(64, new ArrayList()); - map.put(65, new ArrayList()); - map.put(66, new ArrayList()); - map.put(67, new ArrayList()); - map.put(68, new ArrayList()); - map.put(69, new ArrayList()); - map.put(70, new ArrayList()); - map.put(71, new ArrayList()); - map.put(72, new ArrayList()); - map.put(73, new ArrayList()); - map.put(74, new ArrayList()); - map.put(75, new ArrayList()); - map.put(76, new ArrayList()); - map.put(77, new ArrayList()); - map.put(78, new ArrayList()); + map.put(14, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + })); + map.put(16, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + })); + map.put(15, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RUNTIME, + })); + map.put(37, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_EQUAL, + })); + map.put(12, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + })); + map.put(79, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + })); + map.put(76, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + })); + map.put(78, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + })); + map.put(77, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + })); + map.put(41, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + })); + map.put(42, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(44, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IF, + })); + map.put(45, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, + })); + map.put(48, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + })); + map.put(46, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + })); + map.put(47, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + })); + map.put(43, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(70, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + })); + map.put(62, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(63, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + })); + map.put(64, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(68, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DOT, + })); + map.put(67, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + })); + map.put(61, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + })); + map.put(69, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + })); + map.put(71, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(40, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + map.put(5, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(4, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + })); + map.put(3, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + rule_first = Collections.unmodifiableMap(map); + } + static { + Map> map = new HashMap>(); map.put(79, new ArrayList()); - map.put(80, new ArrayList()); - map.put(81, new ArrayList()); - map.put(82, new ArrayList()); + map.put(63, new ArrayList()); + map.put(73, new ArrayList()); map.put(83, new ArrayList()); + map.put(113, new ArrayList()); + map.put(101, new ArrayList()); + map.put(57, new ArrayList()); + map.put(61, new ArrayList()); + map.put(75, new ArrayList()); map.put(84, new ArrayList()); - map.put(85, new ArrayList()); - map.put(86, new ArrayList()); - map.put(87, new ArrayList()); + map.put(78, new ArrayList()); + map.put(60, new ArrayList()); + map.put(115, new ArrayList()); + map.put(99, new ArrayList()); map.put(88, new ArrayList()); - map.put(89, new ArrayList()); + map.put(85, new ArrayList()); map.put(90, new ArrayList()); - map.put(91, new ArrayList()); - map.put(92, new ArrayList()); - map.put(93, new ArrayList()); - map.put(94, new ArrayList()); - map.put(95, new ArrayList()); - map.put(96, new ArrayList()); - map.put(97, new ArrayList()); - map.put(98, new ArrayList()); - map.put(99, new ArrayList()); + map.put(111, new ArrayList()); + map.put(67, new ArrayList()); + map.put(71, new ArrayList()); + map.put(107, new ArrayList()); map.put(100, new ArrayList()); - map.put(101, new ArrayList()); - map.put(102, new ArrayList()); + map.put(98, new ArrayList()); + map.put(97, new ArrayList()); + map.put(105, new ArrayList()); + map.put(70, new ArrayList()); + map.put(81, new ArrayList()); + map.put(91, new ArrayList()); + map.put(110, new ArrayList()); map.put(103, new ArrayList()); + map.put(86, new ArrayList()); + map.put(80, new ArrayList()); map.put(104, new ArrayList()); - map.put(105, new ArrayList()); - map.put(106, new ArrayList()); - map.put(107, new ArrayList()); - map.put(108, new ArrayList()); map.put(109, new ArrayList()); - map.put(110, new ArrayList()); - map.put(111, new ArrayList()); map.put(112, new ArrayList()); - map.put(113, new ArrayList()); + map.put(72, new ArrayList()); + map.put(77, new ArrayList()); + map.put(66, new ArrayList()); + map.put(69, new ArrayList()); + map.put(65, new ArrayList()); + map.put(59, new ArrayList()); + map.put(93, new ArrayList()); map.put(114, new ArrayList()); - map.put(115, new ArrayList()); + map.put(89, new ArrayList()); + map.put(56, new ArrayList()); + map.put(92, new ArrayList()); map.put(116, new ArrayList()); - map.put(117, new ArrayList()); - map.put(118, new ArrayList()); - map.put(119, new ArrayList()); - map.put(120, new ArrayList()); - map.put(121, new ArrayList()); - map.put(122, new ArrayList()); - map.put(123, new ArrayList()); - map.put(124, new ArrayList()); - map.put(125, new ArrayList()); - map.put(126, new ArrayList()); - map.put(127, new ArrayList()); - map.put(128, new ArrayList()); - map.put(129, new ArrayList()); - map.put(130, new ArrayList()); - map.get(87).add("$_gen0 = $import $_gen1"); - map.get(108).add("$_gen1 = $import $_gen1"); - map.get(108).add("$_gen1 = :_empty"); - map.get(87).add("$_gen0 = :_empty"); - map.get(107).add("$_gen2 = $workflow_or_task $_gen3"); - map.get(77).add("$_gen3 = $workflow_or_task $_gen3"); - map.get(77).add("$_gen3 = :_empty"); - map.get(107).add("$_gen2 = :_empty"); - map.get(118).add("$document = $_gen0 $_gen2 -> Document( imports=$0, definitions=$1 )"); - map.get(115).add("$workflow_or_task = $workflow"); - map.get(115).add("$workflow_or_task = $task"); - map.get(120).add("$_gen4 = $import_namespace"); - map.get(120).add("$_gen4 = :_empty"); - map.get(92).add("$import = :import :string $_gen4 -> Import( uri=$1, namespace=$2 )"); - map.get(66).add("$import_namespace = :as :identifier -> $1"); - map.get(90).add("$_gen5 = $declaration $_gen6"); - map.get(62).add("$_gen6 = $declaration $_gen6"); - map.get(62).add("$_gen6 = :_empty"); - map.get(90).add("$_gen5 = :_empty"); - map.get(71).add("$_gen7 = $sections $_gen8"); - map.get(63).add("$_gen8 = $sections $_gen8"); - map.get(63).add("$_gen8 = :_empty"); - map.get(71).add("$_gen7 = :_empty"); - map.get(127).add("$task = :task :identifier :lbrace $_gen5 $_gen7 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )"); - map.get(59).add("$sections = $command"); - map.get(59).add("$sections = $outputs"); - map.get(59).add("$sections = $runtime"); - map.get(59).add("$sections = $parameter_meta"); - map.get(59).add("$sections = $meta"); - map.get(103).add("$_gen9 = $command_part $_gen10"); - map.get(109).add("$_gen10 = $command_part $_gen10"); - map.get(109).add("$_gen10 = :_empty"); - map.get(103).add("$_gen9 = :_empty"); - map.get(91).add("$command = :raw_command :raw_cmd_start $_gen9 :raw_cmd_end -> RawCommand( parts=$2 )"); - map.get(117).add("$command_part = :cmd_part"); - map.get(117).add("$command_part = $cmd_param"); - map.get(56).add("$_gen11 = $cmd_param_kv $_gen12"); - map.get(104).add("$_gen12 = $cmd_param_kv $_gen12"); - map.get(104).add("$_gen12 = :_empty"); - map.get(56).add("$_gen11 = :_empty"); - map.get(67).add("$cmd_param = :cmd_param_start $_gen11 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )"); - map.get(122).add("$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )"); - map.get(60).add("$_gen13 = $output_kv $_gen14"); - map.get(102).add("$_gen14 = $output_kv $_gen14"); - map.get(102).add("$_gen14 = :_empty"); - map.get(60).add("$_gen13 = :_empty"); - map.get(94).add("$outputs = :output :lbrace $_gen13 :rbrace -> Outputs( attributes=$2 )"); - map.get(82).add("$output_kv = $type_e :identifier :equal $e -> Output( type=$0, var=$1, expression=$3 )"); - map.get(119).add("$runtime = :runtime $map -> Runtime( map=$1 )"); - map.get(58).add("$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); - map.get(80).add("$meta = :meta $map -> Meta( map=$1 )"); - map.get(114).add("$_gen15 = $kv $_gen16"); - map.get(74).add("$_gen16 = $kv $_gen16"); - map.get(74).add("$_gen16 = :_empty"); - map.get(114).add("$_gen15 = :_empty"); - map.get(64).add("$map = :lbrace $_gen15 :rbrace -> $1"); - map.get(88).add("$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )"); - map.get(97).add("$_gen17 = $postfix_quantifier"); - map.get(97).add("$_gen17 = :_empty"); - map.get(128).add("$_gen18 = $setter"); - map.get(128).add("$_gen18 = :_empty"); - map.get(93).add("$declaration = $type_e $_gen17 :identifier $_gen18 -> Declaration( type=$0, postfix=$1, name=$2, expression=$3 )"); - map.get(65).add("$setter = :equal $e -> $1"); - map.get(72).add("$postfix_quantifier = :qmark"); - map.get(72).add("$postfix_quantifier = :plus"); - map.get(121).add("$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )"); - map.get(81).add("$_gen19 = $wf_body_element $_gen20"); - map.get(70).add("$_gen20 = $wf_body_element $_gen20"); - map.get(70).add("$_gen20 = :_empty"); - map.get(81).add("$_gen19 = :_empty"); - map.get(89).add("$workflow = :workflow :identifier :lbrace $_gen19 :rbrace -> Workflow( name=$1, body=$3 )"); - map.get(110).add("$wf_body_element = $call"); - map.get(110).add("$wf_body_element = $declaration"); - map.get(110).add("$wf_body_element = $while_loop"); - map.get(110).add("$wf_body_element = $if_stmt"); - map.get(110).add("$wf_body_element = $scatter"); - map.get(110).add("$wf_body_element = $wf_outputs"); - map.get(113).add("$_gen21 = $alias"); - map.get(113).add("$_gen21 = :_empty"); - map.get(61).add("$_gen22 = $call_body"); - map.get(61).add("$_gen22 = :_empty"); - map.get(99).add("$call = :call :fqn $_gen21 $_gen22 -> Call( task=$1, alias=$2, body=$3 )"); - map.get(126).add("$_gen23 = $call_input $_gen24"); - map.get(111).add("$_gen24 = $call_input $_gen24"); - map.get(111).add("$_gen24 = :_empty"); - map.get(126).add("$_gen23 = :_empty"); - map.get(116).add("$call_body = :lbrace $_gen5 $_gen23 :rbrace -> CallBody( declarations=$1, io=$2 )"); - map.get(84).add("$_gen25 = $mapping $_gen26"); - map.get(100).add("$_gen26 = :comma $mapping $_gen26"); - map.get(100).add("$_gen26 = :_empty"); - map.get(84).add("$_gen25 = :_empty"); - map.get(57).add("$call_input = :input :colon $_gen25 -> Inputs( map=$2 )"); - map.get(68).add("$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )"); - map.get(124).add("$alias = :as :identifier -> $1"); - map.get(129).add("$_gen27 = $wf_output $_gen28"); - map.get(69).add("$_gen28 = :comma $wf_output $_gen28"); - map.get(69).add("$_gen28 = :_empty"); - map.get(129).add("$_gen27 = :_empty"); - map.get(123).add("$wf_outputs = :output :lbrace $_gen27 :rbrace -> WorkflowOutputs( outputs=$2 )"); - map.get(95).add("$_gen29 = $wf_output_wildcard"); - map.get(95).add("$_gen29 = :_empty"); - map.get(96).add("$wf_output = :fqn $_gen29 -> WorkflowOutput( fqn=$0, wildcard=$1 )"); - map.get(105).add("$wf_output_wildcard = :dot :asterisk -> $1"); - map.get(75).add("$while_loop = :while :lparen $e :rparen :lbrace $_gen19 :rbrace -> WhileLoop( expression=$2, body=$5 )"); - map.get(125).add("$if_stmt = :if :lparen $e :rparen :lbrace $_gen19 :rbrace -> If( expression=$2, body=$5 )"); - map.get(106).add("$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen19 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )"); - map.get(85).add("$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )"); - map.get(78).add("$_gen30 = $type_e $_gen31"); - map.get(86).add("$_gen31 = :comma $type_e $_gen31"); - map.get(86).add("$_gen31 = :_empty"); - map.get(78).add("$_gen30 = :_empty"); - map.get(76).add("$type_e = :type <=> :lsquare $_gen30 :rsquare -> Type( name=$0, subtype=$2 )"); - map.get(76).add("$type_e = :type"); - map.get(83).add("$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = :not $e -> LogicalNot( expression=$1 )"); - map.get(83).add("$e = :plus $e -> UnaryPlus( expression=$1 )"); - map.get(83).add("$e = :dash $e -> UnaryNegation( expression=$1 )"); - map.get(112).add("$_gen32 = $e $_gen33"); - map.get(98).add("$_gen33 = :comma $e $_gen33"); - map.get(98).add("$_gen33 = :_empty"); - map.get(112).add("$_gen32 = :_empty"); - map.get(83).add("$e = :identifier <=> :lparen $_gen32 :rparen -> FunctionCall( name=$0, params=$2 )"); - map.get(83).add("$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )"); - map.get(83).add("$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )"); - map.get(130).add("$_gen34 = $object_kv $_gen35"); - map.get(73).add("$_gen35 = :comma $object_kv $_gen35"); - map.get(73).add("$_gen35 = :_empty"); - map.get(130).add("$_gen34 = :_empty"); - map.get(83).add("$e = :object :lbrace $_gen34 :rbrace -> ObjectLiteral( map=$2 )"); - map.get(83).add("$e = :lsquare $_gen32 :rsquare -> ArrayLiteral( values=$1 )"); - map.get(79).add("$_gen36 = $map_kv $_gen37"); - map.get(101).add("$_gen37 = :comma $map_kv $_gen37"); - map.get(101).add("$_gen37 = :_empty"); - map.get(79).add("$_gen36 = :_empty"); - map.get(83).add("$e = :lbrace $_gen36 :rbrace -> MapLiteral( map=$1 )"); - map.get(83).add("$e = :lparen $e :rparen -> $1"); - map.get(83).add("$e = :string"); - map.get(83).add("$e = :identifier"); - map.get(83).add("$e = :boolean"); - map.get(83).add("$e = :integer"); - map.get(83).add("$e = :float"); + map.put(62, new ArrayList()); + map.put(95, new ArrayList()); + map.put(82, new ArrayList()); + map.put(68, new ArrayList()); + map.put(74, new ArrayList()); + map.put(96, new ArrayList()); + map.put(58, new ArrayList()); + map.put(102, new ArrayList()); + map.put(106, new ArrayList()); + map.put(76, new ArrayList()); + map.put(94, new ArrayList()); + map.put(64, new ArrayList()); + map.put(87, new ArrayList()); + map.put(108, new ArrayList()); + map.get(79).add("$_gen0 = list($import)"); + map.get(63).add("$_gen1 = list($workflow_or_task_or_decl)"); + map.get(73).add("$_gen10 = list($wf_body_element)"); + map.get(83).add("$_gen11 = $alias"); + map.get(83).add("$_gen11 = :_empty"); + map.get(113).add("$_gen12 = $call_body"); + map.get(113).add("$_gen12 = :_empty"); + map.get(101).add("$_gen13 = list($call_input)"); + map.get(57).add("$_gen14 = list($mapping, :comma)"); + map.get(61).add("$_gen15 = list($wf_output)"); + map.get(75).add("$_gen16 = $wf_output_wildcard"); + map.get(75).add("$_gen16 = :_empty"); + map.get(84).add("$_gen17 = list($type_e, :comma)"); + map.get(78).add("$_gen18 = list($e, :comma)"); + map.get(60).add("$_gen19 = list($object_kv, :comma)"); + map.get(115).add("$_gen2 = $import_namespace"); + map.get(115).add("$_gen2 = :_empty"); + map.get(99).add("$_gen20 = list($map_kv, :comma)"); + map.get(88).add("$_gen3 = list($declaration)"); + map.get(85).add("$_gen4 = list($sections)"); + map.get(90).add("$_gen5 = list($command_part)"); + map.get(111).add("$_gen6 = list($cmd_param_kv)"); + map.get(67).add("$_gen7 = list($output_kv)"); + map.get(71).add("$_gen8 = list($kv)"); + map.get(107).add("$_gen9 = $setter"); + map.get(107).add("$_gen9 = :_empty"); + map.get(100).add("$alias = :as :identifier -> $1"); + map.get(98).add("$call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 )"); + map.get(97).add("$call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 )"); + map.get(105).add("$call_input = :input :colon $_gen14 -> Inputs( map=$2 )"); + map.get(70).add("$cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )"); + map.get(81).add("$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )"); + map.get(91).add("$command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 )"); + map.get(110).add("$command_part = $cmd_param"); + map.get(110).add("$command_part = :cmd_part"); + map.get(103).add("$declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 )"); + map.get(86).add("$document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 )"); + map.get(80).add("$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = :boolean"); + map.get(80).add("$e = :dash $e -> UnaryNegation( expression=$1 )"); + map.get(80).add("$e = :float"); + map.get(80).add("$e = :identifier"); + map.get(80).add("$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )"); + map.get(80).add("$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )"); + map.get(80).add("$e = :integer"); + map.get(80).add("$e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 )"); + map.get(80).add("$e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 )"); + map.get(80).add("$e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 )"); + map.get(80).add("$e = :not $e -> LogicalNot( expression=$1 )"); + map.get(80).add("$e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 )"); + map.get(80).add("$e = :plus $e -> UnaryPlus( expression=$1 )"); + map.get(80).add("$e = :string"); + map.get(104).add("$if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 )"); + map.get(109).add("$import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 )"); + map.get(112).add("$import_namespace = :as :identifier -> $1"); + map.get(72).add("$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )"); + map.get(77).add("$map = :lbrace $_gen8 :rbrace -> $1"); + map.get(66).add("$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )"); + map.get(69).add("$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )"); + map.get(65).add("$meta = :meta $map -> Meta( map=$1 )"); + map.get(59).add("$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )"); + map.get(93).add("$output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 )"); + map.get(114).add("$outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 )"); + map.get(89).add("$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); + map.get(56).add("$runtime = :runtime $map -> Runtime( map=$1 )"); + map.get(92).add("$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )"); + map.get(116).add("$sections = $command"); + map.get(116).add("$sections = $meta"); + map.get(116).add("$sections = $outputs"); + map.get(116).add("$sections = $parameter_meta"); + map.get(116).add("$sections = $runtime"); + map.get(62).add("$setter = :equal $e -> $1"); + map.get(95).add("$task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )"); + map.get(82).add("$type_e = :type"); + map.get(82).add("$type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 )"); + map.get(82).add("$type_e = :type <=> :plus -> NonEmptyType( innerType=$0 )"); + map.get(82).add("$type_e = :type <=> :qmark -> OptionalType( innerType=$0 )"); + map.get(68).add("$wf_body_element = $call"); + map.get(68).add("$wf_body_element = $declaration"); + map.get(68).add("$wf_body_element = $if_stmt"); + map.get(68).add("$wf_body_element = $scatter"); + map.get(68).add("$wf_body_element = $wf_meta"); + map.get(68).add("$wf_body_element = $wf_outputs"); + map.get(68).add("$wf_body_element = $wf_parameter_meta"); + map.get(68).add("$wf_body_element = $while_loop"); + map.get(74).add("$wf_meta = :meta $map -> Meta( map=$1 )"); + map.get(96).add("$wf_output = $wf_output_declaration_syntax"); + map.get(96).add("$wf_output = $wf_output_wildcard_syntax"); + map.get(58).add("$wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 )"); + map.get(102).add("$wf_output_wildcard = :dot :asterisk -> $1"); + map.get(106).add("$wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 )"); + map.get(76).add("$wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 )"); + map.get(94).add("$wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); + map.get(64).add("$while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 )"); + map.get(87).add("$workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 )"); + map.get(108).add("$workflow_or_task_or_decl = $declaration"); + map.get(108).add("$workflow_or_task_or_decl = $task"); + map.get(108).add("$workflow_or_task_or_decl = $workflow"); nonterminal_rules = Collections.unmodifiableMap(map); } static { Map map = new HashMap(); - map.put(new Integer(0), "$_gen0 = $import $_gen1"); - map.put(new Integer(1), "$_gen1 = $import $_gen1"); - map.put(new Integer(2), "$_gen1 = :_empty"); - map.put(new Integer(3), "$_gen0 = :_empty"); - map.put(new Integer(4), "$_gen2 = $workflow_or_task $_gen3"); - map.put(new Integer(5), "$_gen3 = $workflow_or_task $_gen3"); - map.put(new Integer(6), "$_gen3 = :_empty"); + map.put(new Integer(0), "$_gen0 = list($import)"); + map.put(new Integer(1), "$_gen1 = list($workflow_or_task_or_decl)"); + map.put(new Integer(39), "$_gen10 = list($wf_body_element)"); + map.put(new Integer(49), "$_gen11 = $alias"); + map.put(new Integer(50), "$_gen11 = :_empty"); + map.put(new Integer(51), "$_gen12 = $call_body"); + map.put(new Integer(52), "$_gen12 = :_empty"); + map.put(new Integer(54), "$_gen13 = list($call_input)"); + map.put(new Integer(56), "$_gen14 = list($mapping, :comma)"); + map.put(new Integer(60), "$_gen15 = list($wf_output)"); + map.put(new Integer(65), "$_gen16 = $wf_output_wildcard"); + map.put(new Integer(66), "$_gen16 = :_empty"); + map.put(new Integer(75), "$_gen17 = list($type_e, :comma)"); + map.put(new Integer(96), "$_gen18 = list($e, :comma)"); + map.put(new Integer(100), "$_gen19 = list($object_kv, :comma)"); + map.put(new Integer(6), "$_gen2 = $import_namespace"); map.put(new Integer(7), "$_gen2 = :_empty"); - map.put(new Integer(8), "$document = $_gen0 $_gen2 -> Document( imports=$0, definitions=$1 )"); - map.put(new Integer(9), "$workflow_or_task = $workflow"); - map.put(new Integer(10), "$workflow_or_task = $task"); - map.put(new Integer(11), "$_gen4 = $import_namespace"); - map.put(new Integer(12), "$_gen4 = :_empty"); - map.put(new Integer(13), "$import = :import :string $_gen4 -> Import( uri=$1, namespace=$2 )"); - map.put(new Integer(14), "$import_namespace = :as :identifier -> $1"); - map.put(new Integer(15), "$_gen5 = $declaration $_gen6"); - map.put(new Integer(16), "$_gen6 = $declaration $_gen6"); - map.put(new Integer(17), "$_gen6 = :_empty"); - map.put(new Integer(18), "$_gen5 = :_empty"); - map.put(new Integer(19), "$_gen7 = $sections $_gen8"); - map.put(new Integer(20), "$_gen8 = $sections $_gen8"); - map.put(new Integer(21), "$_gen8 = :_empty"); - map.put(new Integer(22), "$_gen7 = :_empty"); - map.put(new Integer(23), "$task = :task :identifier :lbrace $_gen5 $_gen7 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )"); - map.put(new Integer(24), "$sections = $command"); - map.put(new Integer(25), "$sections = $outputs"); - map.put(new Integer(26), "$sections = $runtime"); - map.put(new Integer(27), "$sections = $parameter_meta"); - map.put(new Integer(28), "$sections = $meta"); - map.put(new Integer(29), "$_gen9 = $command_part $_gen10"); - map.put(new Integer(30), "$_gen10 = $command_part $_gen10"); - map.put(new Integer(31), "$_gen10 = :_empty"); - map.put(new Integer(32), "$_gen9 = :_empty"); - map.put(new Integer(33), "$command = :raw_command :raw_cmd_start $_gen9 :raw_cmd_end -> RawCommand( parts=$2 )"); - map.put(new Integer(34), "$command_part = :cmd_part"); - map.put(new Integer(35), "$command_part = $cmd_param"); - map.put(new Integer(36), "$_gen11 = $cmd_param_kv $_gen12"); - map.put(new Integer(37), "$_gen12 = $cmd_param_kv $_gen12"); - map.put(new Integer(38), "$_gen12 = :_empty"); - map.put(new Integer(39), "$_gen11 = :_empty"); - map.put(new Integer(40), "$cmd_param = :cmd_param_start $_gen11 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )"); - map.put(new Integer(41), "$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )"); - map.put(new Integer(42), "$_gen13 = $output_kv $_gen14"); - map.put(new Integer(43), "$_gen14 = $output_kv $_gen14"); - map.put(new Integer(44), "$_gen14 = :_empty"); - map.put(new Integer(45), "$_gen13 = :_empty"); - map.put(new Integer(46), "$outputs = :output :lbrace $_gen13 :rbrace -> Outputs( attributes=$2 )"); - map.put(new Integer(47), "$output_kv = $type_e :identifier :equal $e -> Output( type=$0, var=$1, expression=$3 )"); - map.put(new Integer(48), "$runtime = :runtime $map -> Runtime( map=$1 )"); - map.put(new Integer(49), "$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); - map.put(new Integer(50), "$meta = :meta $map -> Meta( map=$1 )"); - map.put(new Integer(51), "$_gen15 = $kv $_gen16"); - map.put(new Integer(52), "$_gen16 = $kv $_gen16"); - map.put(new Integer(53), "$_gen16 = :_empty"); - map.put(new Integer(54), "$_gen15 = :_empty"); - map.put(new Integer(55), "$map = :lbrace $_gen15 :rbrace -> $1"); - map.put(new Integer(56), "$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )"); - map.put(new Integer(57), "$_gen17 = $postfix_quantifier"); - map.put(new Integer(58), "$_gen17 = :_empty"); - map.put(new Integer(59), "$_gen18 = $setter"); - map.put(new Integer(60), "$_gen18 = :_empty"); - map.put(new Integer(61), "$declaration = $type_e $_gen17 :identifier $_gen18 -> Declaration( type=$0, postfix=$1, name=$2, expression=$3 )"); - map.put(new Integer(62), "$setter = :equal $e -> $1"); - map.put(new Integer(63), "$postfix_quantifier = :qmark"); - map.put(new Integer(64), "$postfix_quantifier = :plus"); - map.put(new Integer(65), "$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )"); - map.put(new Integer(66), "$_gen19 = $wf_body_element $_gen20"); - map.put(new Integer(67), "$_gen20 = $wf_body_element $_gen20"); - map.put(new Integer(68), "$_gen20 = :_empty"); - map.put(new Integer(69), "$_gen19 = :_empty"); - map.put(new Integer(70), "$workflow = :workflow :identifier :lbrace $_gen19 :rbrace -> Workflow( name=$1, body=$3 )"); - map.put(new Integer(71), "$wf_body_element = $call"); - map.put(new Integer(72), "$wf_body_element = $declaration"); - map.put(new Integer(73), "$wf_body_element = $while_loop"); - map.put(new Integer(74), "$wf_body_element = $if_stmt"); - map.put(new Integer(75), "$wf_body_element = $scatter"); - map.put(new Integer(76), "$wf_body_element = $wf_outputs"); - map.put(new Integer(77), "$_gen21 = $alias"); - map.put(new Integer(78), "$_gen21 = :_empty"); - map.put(new Integer(79), "$_gen22 = $call_body"); - map.put(new Integer(80), "$_gen22 = :_empty"); - map.put(new Integer(81), "$call = :call :fqn $_gen21 $_gen22 -> Call( task=$1, alias=$2, body=$3 )"); - map.put(new Integer(82), "$_gen23 = $call_input $_gen24"); - map.put(new Integer(83), "$_gen24 = $call_input $_gen24"); - map.put(new Integer(84), "$_gen24 = :_empty"); - map.put(new Integer(85), "$_gen23 = :_empty"); - map.put(new Integer(86), "$call_body = :lbrace $_gen5 $_gen23 :rbrace -> CallBody( declarations=$1, io=$2 )"); - map.put(new Integer(87), "$_gen25 = $mapping $_gen26"); - map.put(new Integer(88), "$_gen26 = :comma $mapping $_gen26"); - map.put(new Integer(89), "$_gen26 = :_empty"); - map.put(new Integer(90), "$_gen25 = :_empty"); - map.put(new Integer(91), "$call_input = :input :colon $_gen25 -> Inputs( map=$2 )"); - map.put(new Integer(92), "$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )"); - map.put(new Integer(93), "$alias = :as :identifier -> $1"); - map.put(new Integer(94), "$_gen27 = $wf_output $_gen28"); - map.put(new Integer(95), "$_gen28 = :comma $wf_output $_gen28"); - map.put(new Integer(96), "$_gen28 = :_empty"); - map.put(new Integer(97), "$_gen27 = :_empty"); - map.put(new Integer(98), "$wf_outputs = :output :lbrace $_gen27 :rbrace -> WorkflowOutputs( outputs=$2 )"); - map.put(new Integer(99), "$_gen29 = $wf_output_wildcard"); - map.put(new Integer(100), "$_gen29 = :_empty"); - map.put(new Integer(101), "$wf_output = :fqn $_gen29 -> WorkflowOutput( fqn=$0, wildcard=$1 )"); - map.put(new Integer(102), "$wf_output_wildcard = :dot :asterisk -> $1"); - map.put(new Integer(103), "$while_loop = :while :lparen $e :rparen :lbrace $_gen19 :rbrace -> WhileLoop( expression=$2, body=$5 )"); - map.put(new Integer(104), "$if_stmt = :if :lparen $e :rparen :lbrace $_gen19 :rbrace -> If( expression=$2, body=$5 )"); - map.put(new Integer(105), "$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen19 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )"); - map.put(new Integer(106), "$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )"); - map.put(new Integer(107), "$_gen30 = $type_e $_gen31"); - map.put(new Integer(108), "$_gen31 = :comma $type_e $_gen31"); - map.put(new Integer(109), "$_gen31 = :_empty"); - map.put(new Integer(110), "$_gen30 = :_empty"); - map.put(new Integer(111), "$type_e = :type <=> :lsquare $_gen30 :rsquare -> Type( name=$0, subtype=$2 )"); - map.put(new Integer(112), "$type_e = :type"); - map.put(new Integer(113), "$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )"); - map.put(new Integer(114), "$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )"); - map.put(new Integer(115), "$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )"); - map.put(new Integer(116), "$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )"); - map.put(new Integer(117), "$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )"); - map.put(new Integer(118), "$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )"); - map.put(new Integer(119), "$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )"); - map.put(new Integer(120), "$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )"); - map.put(new Integer(121), "$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )"); - map.put(new Integer(122), "$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )"); - map.put(new Integer(123), "$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )"); - map.put(new Integer(124), "$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )"); - map.put(new Integer(125), "$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )"); - map.put(new Integer(126), "$e = :not $e -> LogicalNot( expression=$1 )"); - map.put(new Integer(127), "$e = :plus $e -> UnaryPlus( expression=$1 )"); - map.put(new Integer(128), "$e = :dash $e -> UnaryNegation( expression=$1 )"); - map.put(new Integer(129), "$_gen32 = $e $_gen33"); - map.put(new Integer(130), "$_gen33 = :comma $e $_gen33"); - map.put(new Integer(131), "$_gen33 = :_empty"); - map.put(new Integer(132), "$_gen32 = :_empty"); - map.put(new Integer(133), "$e = :identifier <=> :lparen $_gen32 :rparen -> FunctionCall( name=$0, params=$2 )"); - map.put(new Integer(134), "$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )"); - map.put(new Integer(135), "$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )"); - map.put(new Integer(136), "$_gen34 = $object_kv $_gen35"); - map.put(new Integer(137), "$_gen35 = :comma $object_kv $_gen35"); - map.put(new Integer(138), "$_gen35 = :_empty"); - map.put(new Integer(139), "$_gen34 = :_empty"); - map.put(new Integer(140), "$e = :object :lbrace $_gen34 :rbrace -> ObjectLiteral( map=$2 )"); - map.put(new Integer(141), "$e = :lsquare $_gen32 :rsquare -> ArrayLiteral( values=$1 )"); - map.put(new Integer(142), "$_gen36 = $map_kv $_gen37"); - map.put(new Integer(143), "$_gen37 = :comma $map_kv $_gen37"); - map.put(new Integer(144), "$_gen37 = :_empty"); - map.put(new Integer(145), "$_gen36 = :_empty"); - map.put(new Integer(146), "$e = :lbrace $_gen36 :rbrace -> MapLiteral( map=$1 )"); - map.put(new Integer(147), "$e = :lparen $e :rparen -> $1"); - map.put(new Integer(148), "$e = :string"); - map.put(new Integer(149), "$e = :identifier"); - map.put(new Integer(150), "$e = :boolean"); - map.put(new Integer(151), "$e = :integer"); - map.put(new Integer(152), "$e = :float"); + map.put(new Integer(103), "$_gen20 = list($map_kv, :comma)"); + map.put(new Integer(10), "$_gen3 = list($declaration)"); + map.put(new Integer(11), "$_gen4 = list($sections)"); + map.put(new Integer(18), "$_gen5 = list($command_part)"); + map.put(new Integer(22), "$_gen6 = list($cmd_param_kv)"); + map.put(new Integer(25), "$_gen7 = list($output_kv)"); + map.put(new Integer(31), "$_gen8 = list($kv)"); + map.put(new Integer(34), "$_gen9 = $setter"); + map.put(new Integer(35), "$_gen9 = :_empty"); + map.put(new Integer(59), "$alias = :as :identifier -> $1"); + map.put(new Integer(53), "$call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 )"); + map.put(new Integer(55), "$call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 )"); + map.put(new Integer(57), "$call_input = :input :colon $_gen14 -> Inputs( map=$2 )"); + map.put(new Integer(23), "$cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )"); + map.put(new Integer(24), "$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )"); + map.put(new Integer(19), "$command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 )"); + map.put(new Integer(21), "$command_part = $cmd_param"); + map.put(new Integer(20), "$command_part = :cmd_part"); + map.put(new Integer(36), "$declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 )"); + map.put(new Integer(2), "$document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 )"); + map.put(new Integer(90), "$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )"); + map.put(new Integer(89), "$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )"); + map.put(new Integer(81), "$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )"); + map.put(new Integer(82), "$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )"); + map.put(new Integer(80), "$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )"); + map.put(new Integer(86), "$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )"); + map.put(new Integer(87), "$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )"); + map.put(new Integer(84), "$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )"); + map.put(new Integer(85), "$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )"); + map.put(new Integer(83), "$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )"); + map.put(new Integer(92), "$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )"); + map.put(new Integer(88), "$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )"); + map.put(new Integer(91), "$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )"); + map.put(new Integer(108), "$e = :boolean"); + map.put(new Integer(95), "$e = :dash $e -> UnaryNegation( expression=$1 )"); + map.put(new Integer(110), "$e = :float"); + map.put(new Integer(107), "$e = :identifier"); + map.put(new Integer(99), "$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )"); + map.put(new Integer(97), "$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )"); + map.put(new Integer(98), "$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )"); + map.put(new Integer(109), "$e = :integer"); + map.put(new Integer(104), "$e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 )"); + map.put(new Integer(105), "$e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 )"); + map.put(new Integer(102), "$e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 )"); + map.put(new Integer(93), "$e = :not $e -> LogicalNot( expression=$1 )"); + map.put(new Integer(101), "$e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 )"); + map.put(new Integer(94), "$e = :plus $e -> UnaryPlus( expression=$1 )"); + map.put(new Integer(106), "$e = :string"); + map.put(new Integer(72), "$if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 )"); + map.put(new Integer(8), "$import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 )"); + map.put(new Integer(9), "$import_namespace = :as :identifier -> $1"); + map.put(new Integer(33), "$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )"); + map.put(new Integer(32), "$map = :lbrace $_gen8 :rbrace -> $1"); + map.put(new Integer(38), "$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )"); + map.put(new Integer(58), "$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )"); + map.put(new Integer(30), "$meta = :meta $map -> Meta( map=$1 )"); + map.put(new Integer(74), "$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )"); + map.put(new Integer(27), "$output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 )"); + map.put(new Integer(26), "$outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 )"); + map.put(new Integer(29), "$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); + map.put(new Integer(28), "$runtime = :runtime $map -> Runtime( map=$1 )"); + map.put(new Integer(73), "$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )"); + map.put(new Integer(13), "$sections = $command"); + map.put(new Integer(17), "$sections = $meta"); + map.put(new Integer(14), "$sections = $outputs"); + map.put(new Integer(16), "$sections = $parameter_meta"); + map.put(new Integer(15), "$sections = $runtime"); + map.put(new Integer(37), "$setter = :equal $e -> $1"); + map.put(new Integer(12), "$task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )"); + map.put(new Integer(79), "$type_e = :type"); + map.put(new Integer(76), "$type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 )"); + map.put(new Integer(78), "$type_e = :type <=> :plus -> NonEmptyType( innerType=$0 )"); + map.put(new Integer(77), "$type_e = :type <=> :qmark -> OptionalType( innerType=$0 )"); + map.put(new Integer(41), "$wf_body_element = $call"); + map.put(new Integer(42), "$wf_body_element = $declaration"); + map.put(new Integer(44), "$wf_body_element = $if_stmt"); + map.put(new Integer(45), "$wf_body_element = $scatter"); + map.put(new Integer(48), "$wf_body_element = $wf_meta"); + map.put(new Integer(46), "$wf_body_element = $wf_outputs"); + map.put(new Integer(47), "$wf_body_element = $wf_parameter_meta"); + map.put(new Integer(43), "$wf_body_element = $while_loop"); + map.put(new Integer(70), "$wf_meta = :meta $map -> Meta( map=$1 )"); + map.put(new Integer(62), "$wf_output = $wf_output_declaration_syntax"); + map.put(new Integer(63), "$wf_output = $wf_output_wildcard_syntax"); + map.put(new Integer(64), "$wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 )"); + map.put(new Integer(68), "$wf_output_wildcard = :dot :asterisk -> $1"); + map.put(new Integer(67), "$wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 )"); + map.put(new Integer(61), "$wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 )"); + map.put(new Integer(69), "$wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); + map.put(new Integer(71), "$while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 )"); + map.put(new Integer(40), "$workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 )"); + map.put(new Integer(5), "$workflow_or_task_or_decl = $declaration"); + map.put(new Integer(4), "$workflow_or_task_or_decl = $task"); + map.put(new Integer(3), "$workflow_or_task_or_decl = $workflow"); rules = Collections.unmodifiableMap(map); } public static boolean is_terminal(int id) { @@ -2530,290 +2305,205 @@ private static Terminal expect(ParserContext ctx, TerminalIdentifier expecting) } return current; } - private static Map infix_binding_power_type_e; - private static Map prefix_binding_power_type_e; + private static Map infix_binding_power_e; + private static Map prefix_binding_power_e; static { Map map = new HashMap(); - map.put(49, 1000); /* $type_e = :type <=> :lsquare list(nt=$type_e, sep=:comma, min=0, sep_terminates=False) :rsquare -> Type( name=$0, subtype=$2 ) */ - infix_binding_power_type_e = Collections.unmodifiableMap(map); + map.put(28, 4000); /* $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) */ + map.put(7, 5000); /* $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) */ + map.put(21, 6000); /* $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) */ + map.put(15, 6000); /* $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) */ + map.put(8, 7000); /* $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) */ + map.put(41, 7000); /* $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) */ + map.put(13, 7000); /* $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) */ + map.put(33, 7000); /* $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) */ + map.put(6, 8000); /* $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) */ + map.put(17, 8000); /* $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) */ + map.put(49, 9000); /* $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) */ + map.put(47, 9000); /* $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) */ + map.put(10, 9000); /* $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) */ + map.put(52, 11000); /* $e = :identifier <=> :lparen list($e, :comma) :rparen -> FunctionCall( name=$0, params=$2 ) */ + map.put(43, 12000); /* $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ + map.put(36, 13000); /* $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ + infix_binding_power_e = Collections.unmodifiableMap(map); } static { Map map = new HashMap(); - prefix_binding_power_type_e = Collections.unmodifiableMap(map); + map.put(9, 10000); /* $e = :not $e -> LogicalNot( expression=$1 ) */ + map.put(6, 10000); /* $e = :plus $e -> UnaryPlus( expression=$1 ) */ + map.put(17, 10000); /* $e = :dash $e -> UnaryNegation( expression=$1 ) */ + prefix_binding_power_e = Collections.unmodifiableMap(map); } - static int get_infix_binding_power_type_e(int terminal_id) { - if (infix_binding_power_type_e.containsKey(terminal_id)) { - return infix_binding_power_type_e.get(terminal_id); + static int get_infix_binding_power_e(int terminal_id) { + if (infix_binding_power_e.containsKey(terminal_id)) { + return infix_binding_power_e.get(terminal_id); } return 0; } - static int get_prefix_binding_power_type_e(int terminal_id) { - if (prefix_binding_power_type_e.containsKey(terminal_id)) { - return prefix_binding_power_type_e.get(terminal_id); + static int get_prefix_binding_power_e(int terminal_id) { + if (prefix_binding_power_e.containsKey(terminal_id)) { + return prefix_binding_power_e.get(terminal_id); } return 0; } - public ParseTree parse_type_e(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_e(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_type_e_internal(ctx, 0); + return parse_e_internal(ctx, 0); } - public static ParseTree parse_type_e(ParserContext ctx) throws SyntaxError { - return parse_type_e_internal(ctx, 0); + public static ParseTree parse_e(ParserContext ctx) throws SyntaxError { + return parse_e_internal(ctx, 0); } - public static ParseTree parse_type_e_internal(ParserContext ctx, int rbp) throws SyntaxError { - ParseTree left = nud_type_e(ctx); + public static ParseTree parse_e_internal(ParserContext ctx, int rbp) throws SyntaxError { + ParseTree left = nud_e(ctx); if ( left instanceof ParseTree ) { left.setExpr(true); left.setNud(true); } - while (ctx.tokens.current() != null && rbp < get_infix_binding_power_type_e(ctx.tokens.current().getId())) { - left = led_type_e(left, ctx); + while (ctx.tokens.current() != null && rbp < get_infix_binding_power_e(ctx.tokens.current().getId())) { + left = led_e(left, ctx); } if (left != null) { left.setExpr(true); } return left; } - private static ParseTree nud_type_e(ParserContext ctx) throws SyntaxError { - ParseTree tree = new ParseTree( new NonTerminal(76, "type_e") ); + private static ParseTree nud_e(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree( new NonTerminal(80, "e") ); Terminal current = ctx.tokens.current(); - ctx.nonterminal = "type_e"; + ctx.nonterminal = "e"; if (current == null) { return tree; } - if (rule_first.get(111).contains(terminal_map.get(current.getId()))) { - /* (111) $type_e = :type <=> :lsquare $_gen30 :rsquare -> Type( name=$0, subtype=$2 ) */ - ctx.rule = rules.get(111); + else if (rule_first.get(93).contains(terminal_map.get(current.getId()))) { + /* (93) $e = :not $e -> LogicalNot( expression=$1 ) */ + ctx.rule = rules.get(93); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("expression", 1); + tree.setAstTransformation(new AstTransformNodeCreator("LogicalNot", parameters)); + tree.setNudMorphemeCount(2); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_NOT)); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(9))); + tree.setPrefix(true); + } + else if (rule_first.get(94).contains(terminal_map.get(current.getId()))) { + /* (94) $e = :plus $e -> UnaryPlus( expression=$1 ) */ + ctx.rule = rules.get(94); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("expression", 1); + tree.setAstTransformation(new AstTransformNodeCreator("UnaryPlus", parameters)); + tree.setNudMorphemeCount(2); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS)); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(6))); + tree.setPrefix(true); + } + else if (rule_first.get(95).contains(terminal_map.get(current.getId()))) { + /* (95) $e = :dash $e -> UnaryNegation( expression=$1 ) */ + ctx.rule = rules.get(95); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("expression", 1); + tree.setAstTransformation(new AstTransformNodeCreator("UnaryNegation", parameters)); + tree.setNudMorphemeCount(2); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DASH)); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(17))); + tree.setPrefix(true); + } + else if (rule_first.get(97).contains(terminal_map.get(current.getId()))) { + /* (97) $e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 ) */ + ctx.rule = rules.get(97); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); - tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); } - else if (rule_first.get(112).contains(terminal_map.get(current.getId()))) { - /* (112) $type_e = :type */ - ctx.rule = rules.get(112); - tree.setAstTransformation(new AstTransformSubstitution(0)); - tree.setNudMorphemeCount(1); - tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); - } - return tree; - } - private static ParseTree led_type_e(ParseTree left, ParserContext ctx) throws SyntaxError { - ParseTree tree = new ParseTree( new NonTerminal(76, "type_e") ); - Terminal current = ctx.tokens.current(); - ctx.nonterminal = "type_e"; - int modifier; - if (current.getId() == 49) { - /* $type_e = :type <=> :lsquare $_gen30 :rsquare -> Type( name=$0, subtype=$2 ) */ - ctx.rule = rules.get(111); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("name", 0); - parameters.put("subtype", 2); - tree.setAstTransformation(new AstTransformNodeCreator("Type", parameters)); - tree.add(left); - tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LSQUARE)); - tree.add(parse__gen30(ctx)); - tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RSQUARE)); - return tree; - } - return tree; - } - private static Map infix_binding_power_e; - private static Map prefix_binding_power_e; - static { - Map map = new HashMap(); - map.put(20, 2000); /* $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) */ - map.put(40, 3000); /* $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) */ - map.put(7, 4000); /* $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) */ - map.put(3, 4000); /* $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) */ - map.put(8, 5000); /* $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) */ - map.put(4, 5000); /* $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) */ - map.put(24, 5000); /* $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) */ - map.put(30, 5000); /* $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) */ - map.put(11, 6000); /* $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) */ - map.put(37, 6000); /* $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) */ - map.put(34, 7000); /* $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) */ - map.put(19, 7000); /* $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) */ - map.put(28, 7000); /* $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) */ - map.put(33, 9000); /* $e = :identifier <=> :lparen list(nt=$e, sep=:comma, min=0, sep_terminates=False) :rparen -> FunctionCall( name=$0, params=$2 ) */ - map.put(49, 10000); /* $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ - map.put(46, 11000); /* $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ - infix_binding_power_e = Collections.unmodifiableMap(map); - } - static { - Map map = new HashMap(); - map.put(18, 8000); /* $e = :not $e -> LogicalNot( expression=$1 ) */ - map.put(11, 8000); /* $e = :plus $e -> UnaryPlus( expression=$1 ) */ - map.put(37, 8000); /* $e = :dash $e -> UnaryNegation( expression=$1 ) */ - prefix_binding_power_e = Collections.unmodifiableMap(map); - } - static int get_infix_binding_power_e(int terminal_id) { - if (infix_binding_power_e.containsKey(terminal_id)) { - return infix_binding_power_e.get(terminal_id); - } - return 0; - } - static int get_prefix_binding_power_e(int terminal_id) { - if (prefix_binding_power_e.containsKey(terminal_id)) { - return prefix_binding_power_e.get(terminal_id); - } - return 0; - } - public ParseTree parse_e(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_e_internal(ctx, 0); - } - public static ParseTree parse_e(ParserContext ctx) throws SyntaxError { - return parse_e_internal(ctx, 0); - } - public static ParseTree parse_e_internal(ParserContext ctx, int rbp) throws SyntaxError { - ParseTree left = nud_e(ctx); - if ( left instanceof ParseTree ) { - left.setExpr(true); - left.setNud(true); - } - while (ctx.tokens.current() != null && rbp < get_infix_binding_power_e(ctx.tokens.current().getId())) { - left = led_e(left, ctx); - } - if (left != null) { - left.setExpr(true); - } - return left; - } - private static ParseTree nud_e(ParserContext ctx) throws SyntaxError { - ParseTree tree = new ParseTree( new NonTerminal(83, "e") ); - Terminal current = ctx.tokens.current(); - ctx.nonterminal = "e"; - if (current == null) { - return tree; - } - else if (rule_first.get(126).contains(terminal_map.get(current.getId()))) { - /* (126) $e = :not $e -> LogicalNot( expression=$1 ) */ - ctx.rule = rules.get(126); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("expression", 1); - tree.setAstTransformation(new AstTransformNodeCreator("LogicalNot", parameters)); - tree.setNudMorphemeCount(2); - tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_NOT)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(18))); - tree.setPrefix(true); - } - else if (rule_first.get(127).contains(terminal_map.get(current.getId()))) { - /* (127) $e = :plus $e -> UnaryPlus( expression=$1 ) */ - ctx.rule = rules.get(127); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("expression", 1); - tree.setAstTransformation(new AstTransformNodeCreator("UnaryPlus", parameters)); - tree.setNudMorphemeCount(2); - tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(11))); - tree.setPrefix(true); - } - else if (rule_first.get(128).contains(terminal_map.get(current.getId()))) { - /* (128) $e = :dash $e -> UnaryNegation( expression=$1 ) */ - ctx.rule = rules.get(128); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("expression", 1); - tree.setAstTransformation(new AstTransformNodeCreator("UnaryNegation", parameters)); - tree.setNudMorphemeCount(2); - tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DASH)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(37))); - tree.setPrefix(true); - } - else if (rule_first.get(133).contains(terminal_map.get(current.getId()))) { - /* (133) $e = :identifier <=> :lparen $_gen32 :rparen -> FunctionCall( name=$0, params=$2 ) */ - ctx.rule = rules.get(133); - tree.setAstTransformation(new AstTransformSubstitution(0)); - tree.setNudMorphemeCount(1); - tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); - } - else if (rule_first.get(134).contains(terminal_map.get(current.getId()))) { - /* (134) $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(134); + else if (rule_first.get(98).contains(terminal_map.get(current.getId()))) { + /* (98) $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ + ctx.rule = rules.get(98); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); } - else if (rule_first.get(135).contains(terminal_map.get(current.getId()))) { - /* (135) $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(135); + else if (rule_first.get(99).contains(terminal_map.get(current.getId()))) { + /* (99) $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ + ctx.rule = rules.get(99); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); } - else if (rule_first.get(140).contains(terminal_map.get(current.getId()))) { - /* (140) $e = :object :lbrace $_gen34 :rbrace -> ObjectLiteral( map=$2 ) */ - ctx.rule = rules.get(140); + else if (rule_first.get(101).contains(terminal_map.get(current.getId()))) { + /* (101) $e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 ) */ + ctx.rule = rules.get(101); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("map", 2); tree.setAstTransformation(new AstTransformNodeCreator("ObjectLiteral", parameters)); tree.setNudMorphemeCount(4); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_OBJECT)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE)); - tree.add(parse__gen34(ctx)); + tree.add(parse__gen19(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE)); } - else if (rule_first.get(141).contains(terminal_map.get(current.getId()))) { - /* (141) $e = :lsquare $_gen32 :rsquare -> ArrayLiteral( values=$1 ) */ - ctx.rule = rules.get(141); + else if (rule_first.get(102).contains(terminal_map.get(current.getId()))) { + /* (102) $e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 ) */ + ctx.rule = rules.get(102); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("values", 1); tree.setAstTransformation(new AstTransformNodeCreator("ArrayLiteral", parameters)); tree.setNudMorphemeCount(3); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LSQUARE)); - tree.add(parse__gen32(ctx)); + tree.add(parse__gen18(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RSQUARE)); } - else if (rule_first.get(146).contains(terminal_map.get(current.getId()))) { - /* (146) $e = :lbrace $_gen36 :rbrace -> MapLiteral( map=$1 ) */ - ctx.rule = rules.get(146); + else if (rule_first.get(104).contains(terminal_map.get(current.getId()))) { + /* (104) $e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 ) */ + ctx.rule = rules.get(104); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("map", 1); tree.setAstTransformation(new AstTransformNodeCreator("MapLiteral", parameters)); tree.setNudMorphemeCount(3); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE)); - tree.add(parse__gen36(ctx)); + tree.add(parse__gen20(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE)); } - else if (rule_first.get(147).contains(terminal_map.get(current.getId()))) { - /* (147) $e = :lparen $e :rparen -> $1 */ - ctx.rule = rules.get(147); - tree.setAstTransformation(new AstTransformSubstitution(1)); + else if (rule_first.get(105).contains(terminal_map.get(current.getId()))) { + /* (105) $e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 ) */ + ctx.rule = rules.get(105); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("values", 1); + tree.setAstTransformation(new AstTransformNodeCreator("TupleLiteral", parameters)); tree.setNudMorphemeCount(3); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN)); - tree.add(parse_e(ctx)); + tree.add(parse__gen18(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN)); } - else if (rule_first.get(148).contains(terminal_map.get(current.getId()))) { - /* (148) $e = :string */ - ctx.rule = rules.get(148); + else if (rule_first.get(106).contains(terminal_map.get(current.getId()))) { + /* (106) $e = :string */ + ctx.rule = rules.get(106); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_STRING)); } - else if (rule_first.get(149).contains(terminal_map.get(current.getId()))) { - /* (149) $e = :identifier */ - ctx.rule = rules.get(149); + else if (rule_first.get(107).contains(terminal_map.get(current.getId()))) { + /* (107) $e = :identifier */ + ctx.rule = rules.get(107); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); } - else if (rule_first.get(150).contains(terminal_map.get(current.getId()))) { - /* (150) $e = :boolean */ - ctx.rule = rules.get(150); + else if (rule_first.get(108).contains(terminal_map.get(current.getId()))) { + /* (108) $e = :boolean */ + ctx.rule = rules.get(108); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_BOOLEAN)); } - else if (rule_first.get(151).contains(terminal_map.get(current.getId()))) { - /* (151) $e = :integer */ - ctx.rule = rules.get(151); + else if (rule_first.get(109).contains(terminal_map.get(current.getId()))) { + /* (109) $e = :integer */ + ctx.rule = rules.get(109); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_INTEGER)); } - else if (rule_first.get(152).contains(terminal_map.get(current.getId()))) { - /* (152) $e = :float */ - ctx.rule = rules.get(152); + else if (rule_first.get(110).contains(terminal_map.get(current.getId()))) { + /* (110) $e = :float */ + ctx.rule = rules.get(110); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_FLOAT)); @@ -2821,13 +2511,13 @@ else if (rule_first.get(152).contains(terminal_map.get(current.getId()))) { return tree; } private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxError { - ParseTree tree = new ParseTree( new NonTerminal(83, "e") ); + ParseTree tree = new ParseTree( new NonTerminal(80, "e") ); Terminal current = ctx.tokens.current(); ctx.nonterminal = "e"; int modifier; - if (current.getId() == 20) { + if (current.getId() == 28) { /* $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(113); + ctx.rule = rules.get(80); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2837,12 +2527,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DOUBLE_PIPE)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(20) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(28) - modifier)); return tree; } - if (current.getId() == 40) { + if (current.getId() == 7) { /* $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(114); + ctx.rule = rules.get(81); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2852,12 +2542,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DOUBLE_AMPERSAND)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(40) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(7) - modifier)); return tree; } - if (current.getId() == 7) { + if (current.getId() == 21) { /* $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(115); + ctx.rule = rules.get(82); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2867,12 +2557,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DOUBLE_EQUAL)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(7) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(21) - modifier)); return tree; } - if (current.getId() == 3) { + if (current.getId() == 15) { /* $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(116); + ctx.rule = rules.get(83); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2882,12 +2572,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_NOT_EQUAL)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(3) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(15) - modifier)); return tree; } if (current.getId() == 8) { /* $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(117); + ctx.rule = rules.get(84); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2900,9 +2590,9 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(parse_e_internal(ctx, get_infix_binding_power_e(8) - modifier)); return tree; } - if (current.getId() == 4) { + if (current.getId() == 41) { /* $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(118); + ctx.rule = rules.get(85); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2912,12 +2602,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LTEQ)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(4) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(41) - modifier)); return tree; } - if (current.getId() == 24) { + if (current.getId() == 13) { /* $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(119); + ctx.rule = rules.get(86); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2927,12 +2617,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_GT)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(24) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(13) - modifier)); return tree; } - if (current.getId() == 30) { + if (current.getId() == 33) { /* $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(120); + ctx.rule = rules.get(87); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2942,12 +2632,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_GTEQ)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(30) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(33) - modifier)); return tree; } - if (current.getId() == 11) { + if (current.getId() == 6) { /* $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(121); + ctx.rule = rules.get(88); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2957,12 +2647,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(11) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(6) - modifier)); return tree; } - if (current.getId() == 37) { + if (current.getId() == 17) { /* $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(122); + ctx.rule = rules.get(89); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2972,12 +2662,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DASH)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(37) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(17) - modifier)); return tree; } - if (current.getId() == 34) { + if (current.getId() == 49) { /* $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(123); + ctx.rule = rules.get(90); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2987,12 +2677,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_ASTERISK)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(34) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(49) - modifier)); return tree; } - if (current.getId() == 19) { + if (current.getId() == 47) { /* $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(124); + ctx.rule = rules.get(91); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -3002,12 +2692,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_SLASH)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(19) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(47) - modifier)); return tree; } - if (current.getId() == 28) { + if (current.getId() == 10) { /* $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(125); + ctx.rule = rules.get(92); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -3017,25 +2707,25 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PERCENT)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(28) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(10) - modifier)); return tree; } - if (current.getId() == 33) { - /* $e = :identifier <=> :lparen $_gen32 :rparen -> FunctionCall( name=$0, params=$2 ) */ - ctx.rule = rules.get(133); + if (current.getId() == 52) { + /* $e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 ) */ + ctx.rule = rules.get(97); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("name", 0); parameters.put("params", 2); tree.setAstTransformation(new AstTransformNodeCreator("FunctionCall", parameters)); tree.add(left); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN)); - tree.add(parse__gen32(ctx)); + tree.add(parse__gen18(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN)); return tree; } - if (current.getId() == 49) { + if (current.getId() == 43) { /* $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(134); + ctx.rule = rules.get(98); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -3043,13 +2733,13 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(left); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LSQUARE)); modifier = 0; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(49) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(43) - modifier)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RSQUARE)); return tree; } - if (current.getId() == 46) { + if (current.getId() == 36) { /* $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(135); + ctx.rule = rules.get(99); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -3061,566 +2751,565 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE } return tree; } - public ParseTree parse__gen11(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + private static Map infix_binding_power_type_e; + private static Map prefix_binding_power_type_e; + static { + Map map = new HashMap(); + map.put(43, 1000); /* $type_e = :type <=> :lsquare list($type_e, :comma) :rsquare -> Type( name=$0, subtype=$2 ) */ + map.put(45, 2000); /* $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) */ + map.put(6, 3000); /* $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) */ + infix_binding_power_type_e = Collections.unmodifiableMap(map); + } + static { + Map map = new HashMap(); + prefix_binding_power_type_e = Collections.unmodifiableMap(map); + } + static int get_infix_binding_power_type_e(int terminal_id) { + if (infix_binding_power_type_e.containsKey(terminal_id)) { + return infix_binding_power_type_e.get(terminal_id); + } + return 0; + } + static int get_prefix_binding_power_type_e(int terminal_id) { + if (prefix_binding_power_type_e.containsKey(terminal_id)) { + return prefix_binding_power_type_e.get(terminal_id); + } + return 0; + } + public ParseTree parse_type_e(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen11(ctx); + return parse_type_e_internal(ctx, 0); } - private static ParseTree parse__gen11(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[0][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(56, "_gen11")); - ctx.nonterminal = "_gen11"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(56).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(56).contains(terminal_map.get(current.getId())) ) { - return tree; + public static ParseTree parse_type_e(ParserContext ctx) throws SyntaxError { + return parse_type_e_internal(ctx, 0); + } + public static ParseTree parse_type_e_internal(ParserContext ctx, int rbp) throws SyntaxError { + ParseTree left = nud_type_e(ctx); + if ( left instanceof ParseTree ) { + left.setExpr(true); + left.setNud(true); + } + while (ctx.tokens.current() != null && rbp < get_infix_binding_power_type_e(ctx.tokens.current().getId())) { + left = led_type_e(left, ctx); + } + if (left != null) { + left.setExpr(true); } + return left; + } + private static ParseTree nud_type_e(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree( new NonTerminal(82, "type_e") ); + Terminal current = ctx.tokens.current(); + ctx.nonterminal = "type_e"; if (current == null) { return tree; } - if (rule == 36) { - /* $_gen11 = $cmd_param_kv $_gen12 */ - ctx.rule = rules.get(36); + if (rule_first.get(76).contains(terminal_map.get(current.getId()))) { + /* (76) $type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 ) */ + ctx.rule = rules.get(76); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_cmd_param_kv(ctx); - tree.add(subtree); - subtree = parse__gen12(ctx); - tree.add(subtree); - return tree; + tree.setNudMorphemeCount(1); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); + } + else if (rule_first.get(77).contains(terminal_map.get(current.getId()))) { + /* (77) $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) */ + ctx.rule = rules.get(77); + tree.setAstTransformation(new AstTransformSubstitution(0)); + tree.setNudMorphemeCount(1); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); + } + else if (rule_first.get(78).contains(terminal_map.get(current.getId()))) { + /* (78) $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) */ + ctx.rule = rules.get(78); + tree.setAstTransformation(new AstTransformSubstitution(0)); + tree.setNudMorphemeCount(1); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); + } + else if (rule_first.get(79).contains(terminal_map.get(current.getId()))) { + /* (79) $type_e = :type */ + ctx.rule = rules.get(79); + tree.setAstTransformation(new AstTransformSubstitution(0)); + tree.setNudMorphemeCount(1); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); } return tree; } - public ParseTree parse_call_input(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_call_input(ctx); - } - private static ParseTree parse_call_input(ParserContext ctx) throws SyntaxError { + private static ParseTree led_type_e(ParseTree left, ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree( new NonTerminal(82, "type_e") ); Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[1][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(57, "call_input")); - ctx.nonterminal = "call_input"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "call_input", - nonterminal_first.get(57), - nonterminal_rules.get(57) - )); + ctx.nonterminal = "type_e"; + int modifier; + if (current.getId() == 43) { + /* $type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 ) */ + ctx.rule = rules.get(76); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("name", 0); + parameters.put("subtype", 2); + tree.setAstTransformation(new AstTransformNodeCreator("Type", parameters)); + tree.add(left); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LSQUARE)); + tree.add(parse__gen17(ctx)); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RSQUARE)); + return tree; } - if (rule == 91) { - /* $call_input = :input :colon $_gen25 -> Inputs( map=$2 ) */ - ctx.rule = rules.get(91); + if (current.getId() == 45) { + /* $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) */ + ctx.rule = rules.get(77); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("map", 2); - tree.setAstTransformation(new AstTransformNodeCreator("Inputs", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_INPUT); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); - tree.add(next); - subtree = parse__gen25(ctx); - tree.add(subtree); + parameters.put("innerType", 0); + tree.setAstTransformation(new AstTransformNodeCreator("OptionalType", parameters)); + tree.add(left); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_QMARK)); return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "call_input", - current, - nonterminal_first.get(57), - rules.get(91) - )); + if (current.getId() == 6) { + /* $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) */ + ctx.rule = rules.get(78); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("innerType", 0); + tree.setAstTransformation(new AstTransformNodeCreator("NonEmptyType", parameters)); + tree.add(left); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS)); + return tree; + } + return tree; } - public ParseTree parse_parameter_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen0(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_parameter_meta(ctx); + return parse__gen0(ctx); } - private static ParseTree parse_parameter_meta(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[2][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(58, "parameter_meta")); - ctx.nonterminal = "parameter_meta"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "parameter_meta", - nonterminal_first.get(58), - nonterminal_rules.get(58) - )); + private static ParseTree parse__gen0(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(79, "_gen0")); + tree.setList(true); + ctx.nonterminal = "_gen0"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(79).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(79).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 49) { - /* $parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 ) */ - ctx.rule = rules.get(49); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("map", 1); - tree.setAstTransformation(new AstTransformNodeCreator("ParameterMeta", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_PARAMETER_META); - tree.add(next); - subtree = parse_map(ctx); - tree.add(subtree); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "parameter_meta", - current, - nonterminal_first.get(58), - rules.get(49) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(79).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_import(ctx)); + ctx.nonterminal = "_gen0"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse_sections(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen1(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_sections(ctx); + return parse__gen1(ctx); } - private static ParseTree parse_sections(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[3][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(59, "sections")); - ctx.nonterminal = "sections"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "sections", - nonterminal_first.get(59), - nonterminal_rules.get(59) - )); - } - if (rule == 24) { - /* $sections = $command */ - ctx.rule = rules.get(24); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_command(ctx); - tree.add(subtree); + private static ParseTree parse__gen1(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(63, "_gen1")); + tree.setList(true); + ctx.nonterminal = "_gen1"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(63).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(63).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - else if (rule == 25) { - /* $sections = $outputs */ - ctx.rule = rules.get(25); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_outputs(ctx); - tree.add(subtree); + if (ctx.tokens.current() == null) { return tree; } - else if (rule == 26) { - /* $sections = $runtime */ - ctx.rule = rules.get(26); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_runtime(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(63).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_workflow_or_task_or_decl(ctx)); + ctx.nonterminal = "_gen1"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } - else if (rule == 27) { - /* $sections = $parameter_meta */ - ctx.rule = rules.get(27); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_parameter_meta(ctx); - tree.add(subtree); + return tree; + } + public ParseTree parse__gen10(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); + return parse__gen10(ctx); + } + private static ParseTree parse__gen10(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(73, "_gen10")); + tree.setList(true); + ctx.nonterminal = "_gen10"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(73).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(73).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - else if (rule == 28) { - /* $sections = $meta */ - ctx.rule = rules.get(28); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_meta(ctx); - tree.add(subtree); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "sections", - current, - nonterminal_first.get(59), - rules.get(28) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(73).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_wf_body_element(ctx)); + ctx.nonterminal = "_gen10"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; } public ParseTree parse__gen13(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); return parse__gen13(ctx); } private static ParseTree parse__gen13(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[4][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(60, "_gen13")); - ctx.nonterminal = "_gen13"; + ParseTree tree = new ParseTree(new NonTerminal(101, "_gen13")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(60).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(60).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen13"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(101).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(101).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 42) { - /* $_gen13 = $output_kv $_gen14 */ - ctx.rule = rules.get(42); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_output_kv(ctx); - tree.add(subtree); - subtree = parse__gen14(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(101).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_call_input(ctx)); + ctx.nonterminal = "_gen13"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen22(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen14(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen22(ctx); + return parse__gen14(ctx); } - private static ParseTree parse__gen22(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[5][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(61, "_gen22")); - ctx.nonterminal = "_gen22"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(61).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(61).contains(terminal_map.get(current.getId())) ) { + private static ParseTree parse__gen14(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(57, "_gen14")); + tree.setList(true); + tree.setListSeparator(30); + ctx.nonterminal = "_gen14"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(57).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(57).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 79) { - /* $_gen22 = $call_body */ - ctx.rule = rules.get(79); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_call_body(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(57).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_mapping(ctx)); + ctx.nonterminal = "_gen14"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen14", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen6(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen15(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen6(ctx); + return parse__gen15(ctx); } - private static ParseTree parse__gen6(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[6][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(62, "_gen6")); - ctx.nonterminal = "_gen6"; + private static ParseTree parse__gen15(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(61, "_gen15")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(62).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(62).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen15"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(61).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(61).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 16) { - /* $_gen6 = $declaration $_gen6 */ - ctx.rule = rules.get(16); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_declaration(ctx); - tree.add(subtree); - subtree = parse__gen6(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(61).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_wf_output(ctx)); + ctx.nonterminal = "_gen15"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen8(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen17(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen8(ctx); + return parse__gen17(ctx); } - private static ParseTree parse__gen8(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[7][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(63, "_gen8")); - ctx.nonterminal = "_gen8"; + private static ParseTree parse__gen17(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(84, "_gen17")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(63).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(63).contains(terminal_map.get(current.getId())) ) { + tree.setListSeparator(30); + ctx.nonterminal = "_gen17"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(84).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(84).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 20) { - /* $_gen8 = $sections $_gen8 */ - ctx.rule = rules.get(20); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_sections(ctx); - tree.add(subtree); - subtree = parse__gen8(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(84).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_type_e(ctx)); + ctx.nonterminal = "_gen17"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen17", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse_map(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen18(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_map(ctx); + return parse__gen18(ctx); } - private static ParseTree parse_map(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[8][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(64, "map")); - ctx.nonterminal = "map"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "map", - nonterminal_first.get(64), - nonterminal_rules.get(64) - )); + private static ParseTree parse__gen18(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(78, "_gen18")); + tree.setList(true); + tree.setListSeparator(30); + ctx.nonterminal = "_gen18"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(78).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(78).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 55) { - /* $map = :lbrace $_gen15 :rbrace -> $1 */ - ctx.rule = rules.get(55); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen15(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "map", - current, - nonterminal_first.get(64), - rules.get(55) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(78).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_e(ctx)); + ctx.nonterminal = "_gen18"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen18", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse_setter(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen19(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_setter(ctx); + return parse__gen19(ctx); } - private static ParseTree parse_setter(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[9][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(65, "setter")); - ctx.nonterminal = "setter"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "setter", - nonterminal_first.get(65), - nonterminal_rules.get(65) - )); + private static ParseTree parse__gen19(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(60, "_gen19")); + tree.setList(true); + tree.setListSeparator(30); + ctx.nonterminal = "_gen19"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(60).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(60).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 62) { - /* $setter = :equal $e -> $1 */ - ctx.rule = rules.get(62); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); - tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "setter", - current, - nonterminal_first.get(65), - rules.get(62) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(60).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_object_kv(ctx)); + ctx.nonterminal = "_gen19"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen19", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse_import_namespace(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen20(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_import_namespace(ctx); + return parse__gen20(ctx); } - private static ParseTree parse_import_namespace(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[10][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(66, "import_namespace")); - ctx.nonterminal = "import_namespace"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "import_namespace", - nonterminal_first.get(66), - nonterminal_rules.get(66) - )); + private static ParseTree parse__gen20(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(99, "_gen20")); + tree.setList(true); + tree.setListSeparator(30); + ctx.nonterminal = "_gen20"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(99).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(99).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 14) { - /* $import_namespace = :as :identifier -> $1 */ - ctx.rule = rules.get(14); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_AS); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "import_namespace", - current, - nonterminal_first.get(66), - rules.get(14) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(99).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_map_kv(ctx)); + ctx.nonterminal = "_gen20"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen20", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse_cmd_param(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen3(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_cmd_param(ctx); + return parse__gen3(ctx); } - private static ParseTree parse_cmd_param(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[11][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(67, "cmd_param")); - ctx.nonterminal = "cmd_param"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "cmd_param", - nonterminal_first.get(67), - nonterminal_rules.get(67) - )); + private static ParseTree parse__gen3(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(88, "_gen3")); + tree.setList(true); + ctx.nonterminal = "_gen3"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(88).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(88).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 40) { - /* $cmd_param = :cmd_param_start $_gen11 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 ) */ - ctx.rule = rules.get(40); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("attributes", 1); - parameters.put("expr", 2); - tree.setAstTransformation(new AstTransformNodeCreator("CommandParameter", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START); - tree.add(next); - subtree = parse__gen11(ctx); - tree.add(subtree); - subtree = parse_e(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PARAM_END); - tree.add(next); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "cmd_param", - current, - nonterminal_first.get(67), - rules.get(40) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(88).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_declaration(ctx)); + ctx.nonterminal = "_gen3"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse_mapping(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen4(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_mapping(ctx); + return parse__gen4(ctx); } - private static ParseTree parse_mapping(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[12][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(68, "mapping")); - ctx.nonterminal = "mapping"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "mapping", - nonterminal_first.get(68), - nonterminal_rules.get(68) - )); + private static ParseTree parse__gen4(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(85, "_gen4")); + tree.setList(true); + ctx.nonterminal = "_gen4"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(85).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(85).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 92) { - /* $mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 ) */ - ctx.rule = rules.get(92); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 0); - parameters.put("value", 2); - tree.setAstTransformation(new AstTransformNodeCreator("IOMapping", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); - tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "mapping", - current, - nonterminal_first.get(68), - rules.get(92) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(85).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_sections(ctx)); + ctx.nonterminal = "_gen4"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse__gen28(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen5(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen28(ctx); + return parse__gen5(ctx); } - private static ParseTree parse__gen28(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[13][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(69, "_gen28")); - ctx.nonterminal = "_gen28"; + private static ParseTree parse__gen5(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(90, "_gen5")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(69).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(69).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen5"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(90).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(90).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 95) { - /* $_gen28 = :comma $wf_output $_gen28 */ - ctx.rule = rules.get(95); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); - tree.add(next); - tree.setListSeparator(next); - subtree = parse_wf_output(ctx); - tree.add(subtree); - subtree = parse__gen28(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(90).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_command_part(ctx)); + ctx.nonterminal = "_gen5"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen20(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen6(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen20(ctx); + return parse__gen6(ctx); } - private static ParseTree parse__gen20(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[14][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(70, "_gen20")); - ctx.nonterminal = "_gen20"; + private static ParseTree parse__gen6(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(111, "_gen6")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(70).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(70).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen6"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(111).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(111).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 67) { - /* $_gen20 = $wf_body_element $_gen20 */ - ctx.rule = rules.get(67); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_body_element(ctx); - tree.add(subtree); - subtree = parse__gen20(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(111).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_cmd_param_kv(ctx)); + ctx.nonterminal = "_gen6"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } @@ -3629,105 +3318,106 @@ public ParseTree parse__gen7(List tokens, SyntaxErrorFormatter error_f return parse__gen7(ctx); } private static ParseTree parse__gen7(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[15][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(71, "_gen7")); - ctx.nonterminal = "_gen7"; + ParseTree tree = new ParseTree(new NonTerminal(67, "_gen7")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(71).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(71).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen7"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(67).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(67).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 19) { - /* $_gen7 = $sections $_gen8 */ - ctx.rule = rules.get(19); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_sections(ctx); - tree.add(subtree); - subtree = parse__gen8(ctx); - tree.add(subtree); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(67).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_output_kv(ctx)); + ctx.nonterminal = "_gen7"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; + } + public ParseTree parse__gen8(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); + return parse__gen8(ctx); + } + private static ParseTree parse__gen8(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(71, "_gen8")); + tree.setList(true); + ctx.nonterminal = "_gen8"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(71).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(71).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; + } + if (ctx.tokens.current() == null) { return tree; } + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(71).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_kv(ctx)); + ctx.nonterminal = "_gen8"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } return tree; } - public ParseTree parse_postfix_quantifier(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen11(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_postfix_quantifier(ctx); + return parse__gen11(ctx); } - private static ParseTree parse_postfix_quantifier(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen11(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[16][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(72, "postfix_quantifier")); - ctx.nonterminal = "postfix_quantifier"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "postfix_quantifier", - nonterminal_first.get(72), - nonterminal_rules.get(72) - )); + int rule = (current != null) ? table[27][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(83, "_gen11")); + ctx.nonterminal = "_gen11"; + if ( current != null && + !nonterminal_first.get(83).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(83).contains(terminal_map.get(current.getId())) ) { + return tree; } - if (rule == 63) { - /* $postfix_quantifier = :qmark */ - ctx.rule = rules.get(63); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_QMARK); - tree.add(next); + if (current == null) { return tree; } - else if (rule == 64) { - /* $postfix_quantifier = :plus */ - ctx.rule = rules.get(64); + if (rule == 49) { + /* $_gen11 = $alias */ + ctx.rule = rules.get(49); tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS); - tree.add(next); + subtree = parse_alias(ctx); + tree.add(subtree); return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "postfix_quantifier", - current, - nonterminal_first.get(72), - rules.get(64) - )); + return tree; } - public ParseTree parse__gen35(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen12(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen35(ctx); + return parse__gen12(ctx); } - private static ParseTree parse__gen35(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen12(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[17][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(73, "_gen35")); - ctx.nonterminal = "_gen35"; - tree.setList(true); + int rule = (current != null) ? table[57][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(113, "_gen12")); + ctx.nonterminal = "_gen12"; if ( current != null && - !nonterminal_first.get(73).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(73).contains(terminal_map.get(current.getId())) ) { + !nonterminal_first.get(113).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(113).contains(terminal_map.get(current.getId())) ) { return tree; } if (current == null) { return tree; } - if (rule == 137) { - /* $_gen35 = :comma $object_kv $_gen35 */ - ctx.rule = rules.get(137); + if (rule == 51) { + /* $_gen12 = $call_body */ + ctx.rule = rules.get(51); tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); - tree.add(next); - tree.setListSeparator(next); - subtree = parse_object_kv(ctx); - tree.add(subtree); - subtree = parse__gen35(ctx); + subtree = parse_call_body(ctx); tree.add(subtree); return tree; } @@ -3741,587 +3431,531 @@ private static ParseTree parse__gen16(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[18][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(74, "_gen16")); + int rule = (current != null) ? table[19][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(75, "_gen16")); ctx.nonterminal = "_gen16"; - tree.setList(true); if ( current != null && - !nonterminal_first.get(74).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(74).contains(terminal_map.get(current.getId())) ) { + !nonterminal_first.get(75).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(75).contains(terminal_map.get(current.getId())) ) { return tree; } if (current == null) { return tree; } - if (rule == 52) { - /* $_gen16 = $kv $_gen16 */ - ctx.rule = rules.get(52); + if (rule == 65) { + /* $_gen16 = $wf_output_wildcard */ + ctx.rule = rules.get(65); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_kv(ctx); - tree.add(subtree); - subtree = parse__gen16(ctx); + subtree = parse_wf_output_wildcard(ctx); tree.add(subtree); return tree; } return tree; } - public ParseTree parse_while_loop(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen2(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_while_loop(ctx); + return parse__gen2(ctx); } - private static ParseTree parse_while_loop(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen2(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[19][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(75, "while_loop")); - ctx.nonterminal = "while_loop"; - tree.setList(false); + int rule = (current != null) ? table[59][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(115, "_gen2")); + ctx.nonterminal = "_gen2"; + if ( current != null && + !nonterminal_first.get(115).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(115).contains(terminal_map.get(current.getId())) ) { + return tree; + } if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "while_loop", - nonterminal_first.get(75), - nonterminal_rules.get(75) - )); + return tree; } - if (rule == 103) { - /* $while_loop = :while :lparen $e :rparen :lbrace $_gen19 :rbrace -> WhileLoop( expression=$2, body=$5 ) */ - ctx.rule = rules.get(103); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("expression", 2); - parameters.put("body", 5); - tree.setAstTransformation(new AstTransformNodeCreator("WhileLoop", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_WHILE); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); - tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen19(ctx); + if (rule == 6) { + /* $_gen2 = $import_namespace */ + ctx.rule = rules.get(6); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_import_namespace(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "while_loop", - current, - nonterminal_first.get(75), - rules.get(103) - )); + return tree; } - public ParseTree parse__gen3(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen9(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen3(ctx); + return parse__gen9(ctx); } - private static ParseTree parse__gen3(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen9(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[21][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(77, "_gen3")); - ctx.nonterminal = "_gen3"; - tree.setList(true); + int rule = (current != null) ? table[51][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(107, "_gen9")); + ctx.nonterminal = "_gen9"; if ( current != null && - !nonterminal_first.get(77).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(77).contains(terminal_map.get(current.getId())) ) { + !nonterminal_first.get(107).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(107).contains(terminal_map.get(current.getId())) ) { return tree; } if (current == null) { return tree; } - if (rule == 5) { - /* $_gen3 = $workflow_or_task $_gen3 */ - ctx.rule = rules.get(5); + if (rule == 34) { + /* $_gen9 = $setter */ + ctx.rule = rules.get(34); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_workflow_or_task(ctx); - tree.add(subtree); - subtree = parse__gen3(ctx); + subtree = parse_setter(ctx); tree.add(subtree); return tree; } return tree; } - public ParseTree parse__gen30(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_alias(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen30(ctx); + return parse_alias(ctx); } - private static ParseTree parse__gen30(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_alias(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[22][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(78, "_gen30")); - ctx.nonterminal = "_gen30"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(78).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(78).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[44][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(100, "alias")); + ctx.nonterminal = "alias"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "alias", + nonterminal_first.get(100), + nonterminal_rules.get(100) + )); } - if (rule == 107) { - /* $_gen30 = $type_e $_gen31 */ - ctx.rule = rules.get(107); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_type_e(ctx); - tree.add(subtree); - subtree = parse__gen31(ctx); - tree.add(subtree); + if (rule == 59) { + /* $alias = :as :identifier -> $1 */ + ctx.rule = rules.get(59); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_AS); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "alias", + current, + nonterminal_first.get(100), + rules.get(59) + )); } - public ParseTree parse__gen36(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_call(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen36(ctx); + return parse_call(ctx); } - private static ParseTree parse__gen36(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_call(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[23][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(79, "_gen36")); - ctx.nonterminal = "_gen36"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(79).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(79).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[42][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(98, "call")); + ctx.nonterminal = "call"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "call", + nonterminal_first.get(98), + nonterminal_rules.get(98) + )); } - if (rule == 142) { - /* $_gen36 = $map_kv $_gen37 */ - ctx.rule = rules.get(142); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_map_kv(ctx); + if (rule == 53) { + /* $call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 ) */ + ctx.rule = rules.get(53); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("task", 1); + parameters.put("alias", 2); + parameters.put("body", 3); + tree.setAstTransformation(new AstTransformNodeCreator("Call", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CALL); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_FQN); + tree.add(next); + subtree = parse__gen11(ctx); tree.add(subtree); - subtree = parse__gen37(ctx); + subtree = parse__gen12(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "call", + current, + nonterminal_first.get(98), + rules.get(53) + )); } - public ParseTree parse_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_call_body(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_meta(ctx); + return parse_call_body(ctx); } - private static ParseTree parse_meta(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_call_body(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[24][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(80, "meta")); - ctx.nonterminal = "meta"; - tree.setList(false); + int rule = (current != null) ? table[41][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(97, "call_body")); + ctx.nonterminal = "call_body"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "meta", - nonterminal_first.get(80), - nonterminal_rules.get(80) + "call_body", + nonterminal_first.get(97), + nonterminal_rules.get(97) )); } - if (rule == 50) { - /* $meta = :meta $map -> Meta( map=$1 ) */ - ctx.rule = rules.get(50); + if (rule == 55) { + /* $call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 ) */ + ctx.rule = rules.get(55); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("map", 1); - tree.setAstTransformation(new AstTransformNodeCreator("Meta", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_META); + parameters.put("declarations", 1); + parameters.put("io", 2); + tree.setAstTransformation(new AstTransformNodeCreator("CallBody", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); tree.add(next); - subtree = parse_map(ctx); + subtree = parse__gen3(ctx); + tree.add(subtree); + subtree = parse__gen13(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "meta", + "call_body", current, - nonterminal_first.get(80), - rules.get(50) + nonterminal_first.get(97), + rules.get(55) )); } - public ParseTree parse__gen19(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_call_input(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen19(ctx); + return parse_call_input(ctx); } - private static ParseTree parse__gen19(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_call_input(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[25][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(81, "_gen19")); - ctx.nonterminal = "_gen19"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(81).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(81).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[49][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(105, "call_input")); + ctx.nonterminal = "call_input"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "call_input", + nonterminal_first.get(105), + nonterminal_rules.get(105) + )); } - if (rule == 66) { - /* $_gen19 = $wf_body_element $_gen20 */ - ctx.rule = rules.get(66); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_body_element(ctx); - tree.add(subtree); - subtree = parse__gen20(ctx); + if (rule == 57) { + /* $call_input = :input :colon $_gen14 -> Inputs( map=$2 ) */ + ctx.rule = rules.get(57); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 2); + tree.setAstTransformation(new AstTransformNodeCreator("Inputs", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_INPUT); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); + tree.add(next); + subtree = parse__gen14(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "call_input", + current, + nonterminal_first.get(105), + rules.get(57) + )); } - public ParseTree parse_output_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_cmd_param(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_output_kv(ctx); + return parse_cmd_param(ctx); } - private static ParseTree parse_output_kv(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_cmd_param(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[26][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(82, "output_kv")); - ctx.nonterminal = "output_kv"; - tree.setList(false); + int rule = (current != null) ? table[14][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(70, "cmd_param")); + ctx.nonterminal = "cmd_param"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "output_kv", - nonterminal_first.get(82), - nonterminal_rules.get(82) + "cmd_param", + nonterminal_first.get(70), + nonterminal_rules.get(70) )); } - if (rule == 47) { - /* $output_kv = $type_e :identifier :equal $e -> Output( type=$0, var=$1, expression=$3 ) */ - ctx.rule = rules.get(47); + if (rule == 23) { + /* $cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 ) */ + ctx.rule = rules.get(23); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("type", 0); - parameters.put("var", 1); - parameters.put("expression", 3); - tree.setAstTransformation(new AstTransformNodeCreator("Output", parameters)); - subtree = parse_type_e(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + parameters.put("attributes", 1); + parameters.put("expr", 2); + tree.setAstTransformation(new AstTransformNodeCreator("CommandParameter", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START); tree.add(next); + subtree = parse__gen6(ctx); + tree.add(subtree); subtree = parse_e(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PARAM_END); + tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "output_kv", + "cmd_param", current, - nonterminal_first.get(82), - rules.get(47) + nonterminal_first.get(70), + rules.get(23) )); } - public ParseTree parse__gen25(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_cmd_param_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen25(ctx); + return parse_cmd_param_kv(ctx); } - private static ParseTree parse__gen25(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_cmd_param_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[28][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(84, "_gen25")); - ctx.nonterminal = "_gen25"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(84).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(84).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[25][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(81, "cmd_param_kv")); + ctx.nonterminal = "cmd_param_kv"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "cmd_param_kv", + nonterminal_first.get(81), + nonterminal_rules.get(81) + )); } - if (rule == 87) { - /* $_gen25 = $mapping $_gen26 */ - ctx.rule = rules.get(87); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_mapping(ctx); - tree.add(subtree); - subtree = parse__gen26(ctx); + if (rule == 24) { + /* $cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 ) */ + ctx.rule = rules.get(24); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("key", 1); + parameters.put("value", 3); + tree.setAstTransformation(new AstTransformNodeCreator("CommandParameterAttr", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + tree.add(next); + subtree = parse_e(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "cmd_param_kv", + current, + nonterminal_first.get(81), + rules.get(24) + )); } - public ParseTree parse_object_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_command(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_object_kv(ctx); + return parse_command(ctx); } - private static ParseTree parse_object_kv(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_command(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[29][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(85, "object_kv")); - ctx.nonterminal = "object_kv"; - tree.setList(false); + int rule = (current != null) ? table[35][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(91, "command")); + ctx.nonterminal = "command"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "object_kv", - nonterminal_first.get(85), - nonterminal_rules.get(85) + "command", + nonterminal_first.get(91), + nonterminal_rules.get(91) )); } - if (rule == 106) { - /* $object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 ) */ - ctx.rule = rules.get(106); + if (rule == 19) { + /* $command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 ) */ + ctx.rule = rules.get(19); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 0); - parameters.put("value", 2); - tree.setAstTransformation(new AstTransformNodeCreator("ObjectKV", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + parameters.put("parts", 2); + tree.setAstTransformation(new AstTransformNodeCreator("RawCommand", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_CMD_START); tree.add(next); - subtree = parse_e(ctx); + subtree = parse__gen5(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_CMD_END); + tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "object_kv", + "command", current, - nonterminal_first.get(85), - rules.get(106) + nonterminal_first.get(91), + rules.get(19) )); } - public ParseTree parse__gen31(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_command_part(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen31(ctx); + return parse_command_part(ctx); } - private static ParseTree parse__gen31(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_command_part(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[30][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(86, "_gen31")); - ctx.nonterminal = "_gen31"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(86).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(86).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[54][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(110, "command_part")); + ctx.nonterminal = "command_part"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "command_part", + nonterminal_first.get(110), + nonterminal_rules.get(110) + )); } - if (rule == 108) { - /* $_gen31 = :comma $type_e $_gen31 */ - ctx.rule = rules.get(108); + if (rule == 20) { + /* $command_part = :cmd_part */ + ctx.rule = rules.get(20); tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PART); tree.add(next); - tree.setListSeparator(next); - subtree = parse_type_e(ctx); - tree.add(subtree); - subtree = parse__gen31(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse__gen0(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen0(ctx); - } - private static ParseTree parse__gen0(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[31][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(87, "_gen0")); - ctx.nonterminal = "_gen0"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(87).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(87).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { return tree; } - if (rule == 0) { - /* $_gen0 = $import $_gen1 */ - ctx.rule = rules.get(0); + else if (rule == 21) { + /* $command_part = $cmd_param */ + ctx.rule = rules.get(21); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_import(ctx); - tree.add(subtree); - subtree = parse__gen1(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_kv(ctx); - } - private static ParseTree parse_kv(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[32][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(88, "kv")); - ctx.nonterminal = "kv"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "kv", - nonterminal_first.get(88), - nonterminal_rules.get(88) - )); - } - if (rule == 56) { - /* $kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 ) */ - ctx.rule = rules.get(56); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 0); - parameters.put("value", 2); - tree.setAstTransformation(new AstTransformNodeCreator("RuntimeAttribute", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); - tree.add(next); - subtree = parse_e(ctx); + subtree = parse_cmd_param(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "kv", + "command_part", current, - nonterminal_first.get(88), - rules.get(56) + nonterminal_first.get(110), + rules.get(21) )); } - public ParseTree parse_workflow(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_declaration(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_workflow(ctx); + return parse_declaration(ctx); } - private static ParseTree parse_workflow(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_declaration(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[33][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(89, "workflow")); - ctx.nonterminal = "workflow"; - tree.setList(false); + int rule = (current != null) ? table[47][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(103, "declaration")); + ctx.nonterminal = "declaration"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "workflow", - nonterminal_first.get(89), - nonterminal_rules.get(89) + "declaration", + nonterminal_first.get(103), + nonterminal_rules.get(103) )); } - if (rule == 70) { - /* $workflow = :workflow :identifier :lbrace $_gen19 :rbrace -> Workflow( name=$1, body=$3 ) */ - ctx.rule = rules.get(70); + if (rule == 36) { + /* $declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 ) */ + ctx.rule = rules.get(36); LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("type", 0); parameters.put("name", 1); - parameters.put("body", 3); - tree.setAstTransformation(new AstTransformNodeCreator("Workflow", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_WORKFLOW); - tree.add(next); + parameters.put("expression", 2); + tree.setAstTransformation(new AstTransformNodeCreator("Declaration", parameters)); + subtree = parse_type_e(ctx); + tree.add(subtree); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen19(ctx); + subtree = parse__gen9(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "workflow", + "declaration", current, - nonterminal_first.get(89), - rules.get(70) + nonterminal_first.get(103), + rules.get(36) )); } - public ParseTree parse__gen5(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_document(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen5(ctx); + return parse_document(ctx); } - private static ParseTree parse__gen5(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_document(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[34][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(90, "_gen5")); - ctx.nonterminal = "_gen5"; - tree.setList(true); + int rule = (current != null) ? table[30][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(86, "document")); + ctx.nonterminal = "document"; if ( current != null && - !nonterminal_first.get(90).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(90).contains(terminal_map.get(current.getId())) ) { + !nonterminal_first.get(86).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(86).contains(terminal_map.get(current.getId())) ) { return tree; } if (current == null) { return tree; } - if (rule == 15) { - /* $_gen5 = $declaration $_gen6 */ - ctx.rule = rules.get(15); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_declaration(ctx); + if (rule == 2) { + /* $document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 ) */ + ctx.rule = rules.get(2); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("imports", 0); + parameters.put("body", 1); + tree.setAstTransformation(new AstTransformNodeCreator("Namespace", parameters)); + subtree = parse__gen0(ctx); tree.add(subtree); - subtree = parse__gen6(ctx); + subtree = parse__gen1(ctx); tree.add(subtree); return tree; } return tree; } - public ParseTree parse_command(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_if_stmt(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_command(ctx); + return parse_if_stmt(ctx); } - private static ParseTree parse_command(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_if_stmt(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[35][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(91, "command")); - ctx.nonterminal = "command"; - tree.setList(false); + int rule = (current != null) ? table[48][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(104, "if_stmt")); + ctx.nonterminal = "if_stmt"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "command", - nonterminal_first.get(91), - nonterminal_rules.get(91) + "if_stmt", + nonterminal_first.get(104), + nonterminal_rules.get(104) )); } - if (rule == 33) { - /* $command = :raw_command :raw_cmd_start $_gen9 :raw_cmd_end -> RawCommand( parts=$2 ) */ - ctx.rule = rules.get(33); + if (rule == 72) { + /* $if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 ) */ + ctx.rule = rules.get(72); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("parts", 2); - tree.setAstTransformation(new AstTransformNodeCreator("RawCommand", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND); + parameters.put("expression", 2); + parameters.put("body", 5); + tree.setAstTransformation(new AstTransformNodeCreator("If", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IF); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_CMD_START); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); tree.add(next); - subtree = parse__gen9(ctx); + subtree = parse_e(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_CMD_END); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen10(ctx); + tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "command", + "if_stmt", current, - nonterminal_first.get(91), - rules.get(33) + nonterminal_first.get(104), + rules.get(72) )); } public ParseTree parse_import(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { @@ -4332,20 +3966,19 @@ private static ParseTree parse_import(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[36][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(92, "import")); + int rule = (current != null) ? table[53][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(109, "import")); ctx.nonterminal = "import"; - tree.setList(false); if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( "import", - nonterminal_first.get(92), - nonterminal_rules.get(92) + nonterminal_first.get(109), + nonterminal_rules.get(109) )); } - if (rule == 13) { - /* $import = :import :string $_gen4 -> Import( uri=$1, namespace=$2 ) */ - ctx.rule = rules.get(13); + if (rule == 8) { + /* $import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 ) */ + ctx.rule = rules.get(8); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("uri", 1); parameters.put("namespace", 2); @@ -4354,482 +3987,442 @@ private static ParseTree parse_import(ParserContext ctx) throws SyntaxError { tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_STRING); tree.add(next); - subtree = parse__gen4(ctx); + subtree = parse__gen2(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( "import", current, - nonterminal_first.get(92), - rules.get(13) + nonterminal_first.get(109), + rules.get(8) )); } - public ParseTree parse_declaration(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_import_namespace(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_declaration(ctx); + return parse_import_namespace(ctx); } - private static ParseTree parse_declaration(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_import_namespace(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[37][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(93, "declaration")); - ctx.nonterminal = "declaration"; - tree.setList(false); + int rule = (current != null) ? table[56][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(112, "import_namespace")); + ctx.nonterminal = "import_namespace"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "declaration", - nonterminal_first.get(93), - nonterminal_rules.get(93) + "import_namespace", + nonterminal_first.get(112), + nonterminal_rules.get(112) )); } - if (rule == 61) { - /* $declaration = $type_e $_gen17 :identifier $_gen18 -> Declaration( type=$0, postfix=$1, name=$2, expression=$3 ) */ - ctx.rule = rules.get(61); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("type", 0); - parameters.put("postfix", 1); - parameters.put("name", 2); - parameters.put("expression", 3); - tree.setAstTransformation(new AstTransformNodeCreator("Declaration", parameters)); - subtree = parse_type_e(ctx); - tree.add(subtree); - subtree = parse__gen17(ctx); - tree.add(subtree); + if (rule == 9) { + /* $import_namespace = :as :identifier -> $1 */ + ctx.rule = rules.get(9); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_AS); + tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - subtree = parse__gen18(ctx); - tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "declaration", + "import_namespace", current, - nonterminal_first.get(93), - rules.get(61) + nonterminal_first.get(112), + rules.get(9) )); } - public ParseTree parse_outputs(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_outputs(ctx); + return parse_kv(ctx); } - private static ParseTree parse_outputs(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[38][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(94, "outputs")); - ctx.nonterminal = "outputs"; - tree.setList(false); + int rule = (current != null) ? table[16][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(72, "kv")); + ctx.nonterminal = "kv"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "outputs", - nonterminal_first.get(94), - nonterminal_rules.get(94) + "kv", + nonterminal_first.get(72), + nonterminal_rules.get(72) )); } - if (rule == 46) { - /* $outputs = :output :lbrace $_gen13 :rbrace -> Outputs( attributes=$2 ) */ - ctx.rule = rules.get(46); + if (rule == 33) { + /* $kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 ) */ + ctx.rule = rules.get(33); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("attributes", 2); - tree.setAstTransformation(new AstTransformNodeCreator("Outputs", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_OUTPUT); + parameters.put("key", 0); + parameters.put("value", 2); + tree.setAstTransformation(new AstTransformNodeCreator("RuntimeAttribute", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); tree.add(next); - subtree = parse__gen13(ctx); + subtree = parse_e(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "outputs", + "kv", current, - nonterminal_first.get(94), - rules.get(46) + nonterminal_first.get(72), + rules.get(33) )); } - public ParseTree parse__gen29(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_map(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen29(ctx); + return parse_map(ctx); } - private static ParseTree parse__gen29(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_map(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[39][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(95, "_gen29")); - ctx.nonterminal = "_gen29"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(95).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(95).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[21][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(77, "map")); + ctx.nonterminal = "map"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "map", + nonterminal_first.get(77), + nonterminal_rules.get(77) + )); } - if (rule == 99) { - /* $_gen29 = $wf_output_wildcard */ - ctx.rule = rules.get(99); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_output_wildcard(ctx); + if (rule == 32) { + /* $map = :lbrace $_gen8 :rbrace -> $1 */ + ctx.rule = rules.get(32); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen8(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "map", + current, + nonterminal_first.get(77), + rules.get(32) + )); } - public ParseTree parse_wf_output(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_map_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_wf_output(ctx); + return parse_map_kv(ctx); } - private static ParseTree parse_wf_output(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_map_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[40][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(96, "wf_output")); - ctx.nonterminal = "wf_output"; - tree.setList(false); + int rule = (current != null) ? table[10][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(66, "map_kv")); + ctx.nonterminal = "map_kv"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "wf_output", - nonterminal_first.get(96), - nonterminal_rules.get(96) + "map_kv", + nonterminal_first.get(66), + nonterminal_rules.get(66) )); } - if (rule == 101) { - /* $wf_output = :fqn $_gen29 -> WorkflowOutput( fqn=$0, wildcard=$1 ) */ - ctx.rule = rules.get(101); + if (rule == 38) { + /* $map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 ) */ + ctx.rule = rules.get(38); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("fqn", 0); - parameters.put("wildcard", 1); - tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutput", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_FQN); + parameters.put("key", 0); + parameters.put("value", 2); + tree.setAstTransformation(new AstTransformNodeCreator("MapLiteralKv", parameters)); + subtree = parse_e(ctx); + tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); tree.add(next); - subtree = parse__gen29(ctx); + subtree = parse_e(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "wf_output", + "map_kv", current, - nonterminal_first.get(96), - rules.get(101) + nonterminal_first.get(66), + rules.get(38) )); } - public ParseTree parse__gen17(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_mapping(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen17(ctx); + return parse_mapping(ctx); } - private static ParseTree parse__gen17(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_mapping(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[41][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(97, "_gen17")); - ctx.nonterminal = "_gen17"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(97).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(97).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[13][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(69, "mapping")); + ctx.nonterminal = "mapping"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "mapping", + nonterminal_first.get(69), + nonterminal_rules.get(69) + )); } - if (rule == 57) { - /* $_gen17 = $postfix_quantifier */ - ctx.rule = rules.get(57); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_postfix_quantifier(ctx); + if (rule == 58) { + /* $mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 ) */ + ctx.rule = rules.get(58); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("key", 0); + parameters.put("value", 2); + tree.setAstTransformation(new AstTransformNodeCreator("IOMapping", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + tree.add(next); + subtree = parse_e(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "mapping", + current, + nonterminal_first.get(69), + rules.get(58) + )); } - public ParseTree parse__gen33(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen33(ctx); + return parse_meta(ctx); } - private static ParseTree parse__gen33(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_meta(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[42][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(98, "_gen33")); - ctx.nonterminal = "_gen33"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(98).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(98).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[9][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(65, "meta")); + ctx.nonterminal = "meta"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "meta", + nonterminal_first.get(65), + nonterminal_rules.get(65) + )); } - if (rule == 130) { - /* $_gen33 = :comma $e $_gen33 */ - ctx.rule = rules.get(130); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); + if (rule == 30) { + /* $meta = :meta $map -> Meta( map=$1 ) */ + ctx.rule = rules.get(30); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("Meta", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_META); tree.add(next); - tree.setListSeparator(next); - subtree = parse_e(ctx); - tree.add(subtree); - subtree = parse__gen33(ctx); + subtree = parse_map(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "meta", + current, + nonterminal_first.get(65), + rules.get(30) + )); } - public ParseTree parse_call(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_object_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_call(ctx); + return parse_object_kv(ctx); } - private static ParseTree parse_call(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_object_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[43][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(99, "call")); - ctx.nonterminal = "call"; - tree.setList(false); + int rule = (current != null) ? table[3][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(59, "object_kv")); + ctx.nonterminal = "object_kv"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "call", - nonterminal_first.get(99), - nonterminal_rules.get(99) + "object_kv", + nonterminal_first.get(59), + nonterminal_rules.get(59) )); } - if (rule == 81) { - /* $call = :call :fqn $_gen21 $_gen22 -> Call( task=$1, alias=$2, body=$3 ) */ - ctx.rule = rules.get(81); + if (rule == 74) { + /* $object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 ) */ + ctx.rule = rules.get(74); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("task", 1); - parameters.put("alias", 2); - parameters.put("body", 3); - tree.setAstTransformation(new AstTransformNodeCreator("Call", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CALL); + parameters.put("key", 0); + parameters.put("value", 2); + tree.setAstTransformation(new AstTransformNodeCreator("ObjectKV", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_FQN); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); tree.add(next); - subtree = parse__gen21(ctx); - tree.add(subtree); - subtree = parse__gen22(ctx); + subtree = parse_e(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "call", + "object_kv", current, - nonterminal_first.get(99), - rules.get(81) + nonterminal_first.get(59), + rules.get(74) )); } - public ParseTree parse__gen26(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_output_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen26(ctx); + return parse_output_kv(ctx); } - private static ParseTree parse__gen26(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_output_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[44][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(100, "_gen26")); - ctx.nonterminal = "_gen26"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(100).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(100).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[37][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(93, "output_kv")); + ctx.nonterminal = "output_kv"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "output_kv", + nonterminal_first.get(93), + nonterminal_rules.get(93) + )); } - if (rule == 88) { - /* $_gen26 = :comma $mapping $_gen26 */ - ctx.rule = rules.get(88); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); - tree.add(next); - tree.setListSeparator(next); - subtree = parse_mapping(ctx); + if (rule == 27) { + /* $output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 ) */ + ctx.rule = rules.get(27); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("type", 0); + parameters.put("name", 1); + parameters.put("expression", 3); + tree.setAstTransformation(new AstTransformNodeCreator("Output", parameters)); + subtree = parse_type_e(ctx); tree.add(subtree); - subtree = parse__gen26(ctx); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + tree.add(next); + subtree = parse_e(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "output_kv", + current, + nonterminal_first.get(93), + rules.get(27) + )); } - public ParseTree parse__gen37(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_outputs(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen37(ctx); + return parse_outputs(ctx); } - private static ParseTree parse__gen37(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_outputs(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[45][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(101, "_gen37")); - ctx.nonterminal = "_gen37"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(101).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(101).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[58][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(114, "outputs")); + ctx.nonterminal = "outputs"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "outputs", + nonterminal_first.get(114), + nonterminal_rules.get(114) + )); } - if (rule == 143) { - /* $_gen37 = :comma $map_kv $_gen37 */ - ctx.rule = rules.get(143); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); + if (rule == 26) { + /* $outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 ) */ + ctx.rule = rules.get(26); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("attributes", 2); + tree.setAstTransformation(new AstTransformNodeCreator("Outputs", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_OUTPUT); tree.add(next); - tree.setListSeparator(next); - subtree = parse_map_kv(ctx); - tree.add(subtree); - subtree = parse__gen37(ctx); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen7(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "outputs", + current, + nonterminal_first.get(114), + rules.get(26) + )); } - public ParseTree parse__gen14(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_parameter_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen14(ctx); + return parse_parameter_meta(ctx); } - private static ParseTree parse__gen14(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_parameter_meta(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[46][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(102, "_gen14")); - ctx.nonterminal = "_gen14"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(102).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(102).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[33][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(89, "parameter_meta")); + ctx.nonterminal = "parameter_meta"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "parameter_meta", + nonterminal_first.get(89), + nonterminal_rules.get(89) + )); } - if (rule == 43) { - /* $_gen14 = $output_kv $_gen14 */ - ctx.rule = rules.get(43); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_output_kv(ctx); - tree.add(subtree); - subtree = parse__gen14(ctx); + if (rule == 29) { + /* $parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 ) */ + ctx.rule = rules.get(29); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("ParameterMeta", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_PARAMETER_META); + tree.add(next); + subtree = parse_map(ctx); tree.add(subtree); return tree; } - return tree; - } - public ParseTree parse__gen9(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen9(ctx); - } - private static ParseTree parse__gen9(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[47][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(103, "_gen9")); - ctx.nonterminal = "_gen9"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(103).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(103).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 29) { - /* $_gen9 = $command_part $_gen10 */ - ctx.rule = rules.get(29); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_command_part(ctx); - tree.add(subtree); - subtree = parse__gen10(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse__gen12(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen12(ctx); - } - private static ParseTree parse__gen12(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[48][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(104, "_gen12")); - ctx.nonterminal = "_gen12"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(104).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(104).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 37) { - /* $_gen12 = $cmd_param_kv $_gen12 */ - ctx.rule = rules.get(37); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_cmd_param_kv(ctx); - tree.add(subtree); - subtree = parse__gen12(ctx); - tree.add(subtree); - return tree; - } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "parameter_meta", + current, + nonterminal_first.get(89), + rules.get(29) + )); } - public ParseTree parse_wf_output_wildcard(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_runtime(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_wf_output_wildcard(ctx); + return parse_runtime(ctx); } - private static ParseTree parse_wf_output_wildcard(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_runtime(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[49][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(105, "wf_output_wildcard")); - ctx.nonterminal = "wf_output_wildcard"; - tree.setList(false); + int rule = (current != null) ? table[0][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(56, "runtime")); + ctx.nonterminal = "runtime"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "wf_output_wildcard", - nonterminal_first.get(105), - nonterminal_rules.get(105) + "runtime", + nonterminal_first.get(56), + nonterminal_rules.get(56) )); } - if (rule == 102) { - /* $wf_output_wildcard = :dot :asterisk -> $1 */ - ctx.rule = rules.get(102); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_DOT); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_ASTERISK); + if (rule == 28) { + /* $runtime = :runtime $map -> Runtime( map=$1 ) */ + ctx.rule = rules.get(28); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("Runtime", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RUNTIME); tree.add(next); + subtree = parse_map(ctx); + tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "wf_output_wildcard", + "runtime", current, - nonterminal_first.get(105), - rules.get(102) + nonterminal_first.get(56), + rules.get(28) )); } public ParseTree parse_scatter(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { @@ -4840,20 +4433,19 @@ private static ParseTree parse_scatter(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[50][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(106, "scatter")); + int rule = (current != null) ? table[36][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(92, "scatter")); ctx.nonterminal = "scatter"; - tree.setList(false); if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( "scatter", - nonterminal_first.get(106), - nonterminal_rules.get(106) + nonterminal_first.get(92), + nonterminal_rules.get(92) )); } - if (rule == 105) { - /* $scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen19 :rbrace -> Scatter( item=$2, collection=$4, body=$7 ) */ - ctx.rule = rules.get(105); + if (rule == 73) { + /* $scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 ) */ + ctx.rule = rules.get(73); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("item", 2); parameters.put("collection", 4); @@ -4873,7 +4465,7 @@ private static ParseTree parse_scatter(ParserContext ctx) throws SyntaxError { tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); tree.add(next); - subtree = parse__gen19(ctx); + subtree = parse__gen10(ctx); tree.add(subtree); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); @@ -4882,105 +4474,156 @@ private static ParseTree parse_scatter(ParserContext ctx) throws SyntaxError { throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( "scatter", current, - nonterminal_first.get(106), - rules.get(105) + nonterminal_first.get(92), + rules.get(73) )); } - public ParseTree parse__gen2(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_sections(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen2(ctx); + return parse_sections(ctx); } - private static ParseTree parse__gen2(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_sections(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[51][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(107, "_gen2")); - ctx.nonterminal = "_gen2"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(107).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(107).contains(terminal_map.get(current.getId())) ) { + int rule = (current != null) ? table[60][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(116, "sections")); + ctx.nonterminal = "sections"; + if (current == null) { + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "sections", + nonterminal_first.get(116), + nonterminal_rules.get(116) + )); + } + if (rule == 13) { + /* $sections = $command */ + ctx.rule = rules.get(13); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_command(ctx); + tree.add(subtree); return tree; } - if (current == null) { + else if (rule == 14) { + /* $sections = $outputs */ + ctx.rule = rules.get(14); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_outputs(ctx); + tree.add(subtree); return tree; } - if (rule == 4) { - /* $_gen2 = $workflow_or_task $_gen3 */ - ctx.rule = rules.get(4); + else if (rule == 15) { + /* $sections = $runtime */ + ctx.rule = rules.get(15); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_workflow_or_task(ctx); + subtree = parse_runtime(ctx); tree.add(subtree); - subtree = parse__gen3(ctx); + return tree; + } + else if (rule == 16) { + /* $sections = $parameter_meta */ + ctx.rule = rules.get(16); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_parameter_meta(ctx); tree.add(subtree); return tree; } - return tree; + else if (rule == 17) { + /* $sections = $meta */ + ctx.rule = rules.get(17); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_meta(ctx); + tree.add(subtree); + return tree; + } + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "sections", + current, + nonterminal_first.get(116), + rules.get(17) + )); } - public ParseTree parse__gen1(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_setter(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen1(ctx); + return parse_setter(ctx); } - private static ParseTree parse__gen1(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_setter(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[52][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(108, "_gen1")); - ctx.nonterminal = "_gen1"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(108).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(108).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[6][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(62, "setter")); + ctx.nonterminal = "setter"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "setter", + nonterminal_first.get(62), + nonterminal_rules.get(62) + )); } - if (rule == 1) { - /* $_gen1 = $import $_gen1 */ - ctx.rule = rules.get(1); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_import(ctx); - tree.add(subtree); - subtree = parse__gen1(ctx); + if (rule == 37) { + /* $setter = :equal $e -> $1 */ + ctx.rule = rules.get(37); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + tree.add(next); + subtree = parse_e(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "setter", + current, + nonterminal_first.get(62), + rules.get(37) + )); } - public ParseTree parse__gen10(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_task(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen10(ctx); + return parse_task(ctx); } - private static ParseTree parse__gen10(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_task(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[53][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(109, "_gen10")); - ctx.nonterminal = "_gen10"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(109).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(109).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[39][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(95, "task")); + ctx.nonterminal = "task"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "task", + nonterminal_first.get(95), + nonterminal_rules.get(95) + )); } - if (rule == 30) { - /* $_gen10 = $command_part $_gen10 */ - ctx.rule = rules.get(30); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_command_part(ctx); + if (rule == 12) { + /* $task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 ) */ + ctx.rule = rules.get(12); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("name", 1); + parameters.put("declarations", 3); + parameters.put("sections", 4); + tree.setAstTransformation(new AstTransformNodeCreator("Task", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_TASK); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen3(ctx); tree.add(subtree); - subtree = parse__gen10(ctx); + subtree = parse__gen4(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "task", + current, + nonterminal_first.get(95), + rules.get(12) + )); } public ParseTree parse_wf_body_element(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); @@ -4990,617 +4633,385 @@ private static ParseTree parse_wf_body_element(ParserContext ctx) throws SyntaxE Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[54][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(110, "wf_body_element")); + int rule = (current != null) ? table[12][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(68, "wf_body_element")); ctx.nonterminal = "wf_body_element"; - tree.setList(false); if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( "wf_body_element", - nonterminal_first.get(110), - nonterminal_rules.get(110) + nonterminal_first.get(68), + nonterminal_rules.get(68) )); } - if (rule == 71) { + if (rule == 41) { /* $wf_body_element = $call */ - ctx.rule = rules.get(71); + ctx.rule = rules.get(41); tree.setAstTransformation(new AstTransformSubstitution(0)); subtree = parse_call(ctx); tree.add(subtree); return tree; } - else if (rule == 72) { + else if (rule == 42) { /* $wf_body_element = $declaration */ - ctx.rule = rules.get(72); + ctx.rule = rules.get(42); tree.setAstTransformation(new AstTransformSubstitution(0)); subtree = parse_declaration(ctx); tree.add(subtree); return tree; } - else if (rule == 73) { + else if (rule == 43) { /* $wf_body_element = $while_loop */ - ctx.rule = rules.get(73); + ctx.rule = rules.get(43); tree.setAstTransformation(new AstTransformSubstitution(0)); subtree = parse_while_loop(ctx); tree.add(subtree); return tree; } - else if (rule == 74) { + else if (rule == 44) { /* $wf_body_element = $if_stmt */ - ctx.rule = rules.get(74); + ctx.rule = rules.get(44); tree.setAstTransformation(new AstTransformSubstitution(0)); subtree = parse_if_stmt(ctx); tree.add(subtree); return tree; } - else if (rule == 75) { + else if (rule == 45) { /* $wf_body_element = $scatter */ - ctx.rule = rules.get(75); + ctx.rule = rules.get(45); tree.setAstTransformation(new AstTransformSubstitution(0)); subtree = parse_scatter(ctx); tree.add(subtree); return tree; } - else if (rule == 76) { + else if (rule == 46) { /* $wf_body_element = $wf_outputs */ - ctx.rule = rules.get(76); + ctx.rule = rules.get(46); tree.setAstTransformation(new AstTransformSubstitution(0)); subtree = parse_wf_outputs(ctx); tree.add(subtree); return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "wf_body_element", - current, - nonterminal_first.get(110), - rules.get(76) - )); - } - public ParseTree parse__gen24(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen24(ctx); - } - private static ParseTree parse__gen24(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[55][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(111, "_gen24")); - ctx.nonterminal = "_gen24"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(111).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(111).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { + else if (rule == 47) { + /* $wf_body_element = $wf_parameter_meta */ + ctx.rule = rules.get(47); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_wf_parameter_meta(ctx); + tree.add(subtree); return tree; } - if (rule == 83) { - /* $_gen24 = $call_input $_gen24 */ - ctx.rule = rules.get(83); + else if (rule == 48) { + /* $wf_body_element = $wf_meta */ + ctx.rule = rules.get(48); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_call_input(ctx); - tree.add(subtree); - subtree = parse__gen24(ctx); + subtree = parse_wf_meta(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "wf_body_element", + current, + nonterminal_first.get(68), + rules.get(48) + )); } - public ParseTree parse__gen32(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen32(ctx); + return parse_wf_meta(ctx); } - private static ParseTree parse__gen32(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_meta(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[56][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(112, "_gen32")); - ctx.nonterminal = "_gen32"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(112).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(112).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[18][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(74, "wf_meta")); + ctx.nonterminal = "wf_meta"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "wf_meta", + nonterminal_first.get(74), + nonterminal_rules.get(74) + )); } - if (rule == 129) { - /* $_gen32 = $e $_gen33 */ - ctx.rule = rules.get(129); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_e(ctx); - tree.add(subtree); - subtree = parse__gen33(ctx); + if (rule == 70) { + /* $wf_meta = :meta $map -> Meta( map=$1 ) */ + ctx.rule = rules.get(70); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("Meta", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_META); + tree.add(next); + subtree = parse_map(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "wf_meta", + current, + nonterminal_first.get(74), + rules.get(70) + )); } - public ParseTree parse__gen21(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_output(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen21(ctx); + return parse_wf_output(ctx); } - private static ParseTree parse__gen21(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_output(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[57][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(113, "_gen21")); - ctx.nonterminal = "_gen21"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(113).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(113).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[40][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(96, "wf_output")); + ctx.nonterminal = "wf_output"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "wf_output", + nonterminal_first.get(96), + nonterminal_rules.get(96) + )); } - if (rule == 77) { - /* $_gen21 = $alias */ - ctx.rule = rules.get(77); + if (rule == 62) { + /* $wf_output = $wf_output_declaration_syntax */ + ctx.rule = rules.get(62); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_alias(ctx); + subtree = parse_wf_output_declaration_syntax(ctx); tree.add(subtree); return tree; } - return tree; - } - public ParseTree parse__gen15(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen15(ctx); - } - private static ParseTree parse__gen15(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[58][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(114, "_gen15")); - ctx.nonterminal = "_gen15"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(114).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(114).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 51) { - /* $_gen15 = $kv $_gen16 */ - ctx.rule = rules.get(51); + else if (rule == 63) { + /* $wf_output = $wf_output_wildcard_syntax */ + ctx.rule = rules.get(63); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_kv(ctx); - tree.add(subtree); - subtree = parse__gen16(ctx); + subtree = parse_wf_output_wildcard_syntax(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "wf_output", + current, + nonterminal_first.get(96), + rules.get(63) + )); } - public ParseTree parse_workflow_or_task(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_output_declaration_syntax(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_workflow_or_task(ctx); + return parse_wf_output_declaration_syntax(ctx); } - private static ParseTree parse_workflow_or_task(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_output_declaration_syntax(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[59][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(115, "workflow_or_task")); - ctx.nonterminal = "workflow_or_task"; - tree.setList(false); + int rule = (current != null) ? table[2][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(58, "wf_output_declaration_syntax")); + ctx.nonterminal = "wf_output_declaration_syntax"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "workflow_or_task", - nonterminal_first.get(115), - nonterminal_rules.get(115) + "wf_output_declaration_syntax", + nonterminal_first.get(58), + nonterminal_rules.get(58) )); } - if (rule == 9) { - /* $workflow_or_task = $workflow */ - ctx.rule = rules.get(9); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_workflow(ctx); + if (rule == 64) { + /* $wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 ) */ + ctx.rule = rules.get(64); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("type", 0); + parameters.put("name", 1); + parameters.put("expression", 3); + tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutputDeclaration", parameters)); + subtree = parse_type_e(ctx); tree.add(subtree); - return tree; - } - else if (rule == 10) { - /* $workflow_or_task = $task */ - ctx.rule = rules.get(10); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_task(ctx); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + tree.add(next); + subtree = parse_e(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "workflow_or_task", + "wf_output_declaration_syntax", current, - nonterminal_first.get(115), - rules.get(10) + nonterminal_first.get(58), + rules.get(64) )); } - public ParseTree parse_call_body(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_output_wildcard(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_call_body(ctx); + return parse_wf_output_wildcard(ctx); } - private static ParseTree parse_call_body(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_output_wildcard(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[60][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(116, "call_body")); - ctx.nonterminal = "call_body"; - tree.setList(false); + int rule = (current != null) ? table[46][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(102, "wf_output_wildcard")); + ctx.nonterminal = "wf_output_wildcard"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "call_body", - nonterminal_first.get(116), - nonterminal_rules.get(116) + "wf_output_wildcard", + nonterminal_first.get(102), + nonterminal_rules.get(102) )); } - if (rule == 86) { - /* $call_body = :lbrace $_gen5 $_gen23 :rbrace -> CallBody( declarations=$1, io=$2 ) */ - ctx.rule = rules.get(86); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("declarations", 1); - parameters.put("io", 2); - tree.setAstTransformation(new AstTransformNodeCreator("CallBody", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + if (rule == 68) { + /* $wf_output_wildcard = :dot :asterisk -> $1 */ + ctx.rule = rules.get(68); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_DOT); tree.add(next); - subtree = parse__gen5(ctx); - tree.add(subtree); - subtree = parse__gen23(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_ASTERISK); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "call_body", + "wf_output_wildcard", current, - nonterminal_first.get(116), - rules.get(86) + nonterminal_first.get(102), + rules.get(68) )); } - public ParseTree parse_command_part(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_output_wildcard_syntax(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_command_part(ctx); + return parse_wf_output_wildcard_syntax(ctx); } - private static ParseTree parse_command_part(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_output_wildcard_syntax(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[61][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(117, "command_part")); - ctx.nonterminal = "command_part"; - tree.setList(false); + int rule = (current != null) ? table[50][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(106, "wf_output_wildcard_syntax")); + ctx.nonterminal = "wf_output_wildcard_syntax"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "command_part", - nonterminal_first.get(117), - nonterminal_rules.get(117) + "wf_output_wildcard_syntax", + nonterminal_first.get(106), + nonterminal_rules.get(106) )); } - if (rule == 34) { - /* $command_part = :cmd_part */ - ctx.rule = rules.get(34); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PART); + if (rule == 67) { + /* $wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 ) */ + ctx.rule = rules.get(67); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("fqn", 0); + parameters.put("wildcard", 1); + tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutputWildcard", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_FQN); tree.add(next); - return tree; - } - else if (rule == 35) { - /* $command_part = $cmd_param */ - ctx.rule = rules.get(35); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_cmd_param(ctx); + subtree = parse__gen16(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "command_part", + "wf_output_wildcard_syntax", current, - nonterminal_first.get(117), - rules.get(35) + nonterminal_first.get(106), + rules.get(67) )); } - public ParseTree parse_document(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_outputs(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_document(ctx); + return parse_wf_outputs(ctx); } - private static ParseTree parse_document(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_outputs(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[62][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(118, "document")); - ctx.nonterminal = "document"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(118).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(118).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[20][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(76, "wf_outputs")); + ctx.nonterminal = "wf_outputs"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "wf_outputs", + nonterminal_first.get(76), + nonterminal_rules.get(76) + )); } - if (rule == 8) { - /* $document = $_gen0 $_gen2 -> Document( imports=$0, definitions=$1 ) */ - ctx.rule = rules.get(8); + if (rule == 61) { + /* $wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 ) */ + ctx.rule = rules.get(61); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("imports", 0); - parameters.put("definitions", 1); - tree.setAstTransformation(new AstTransformNodeCreator("Document", parameters)); - subtree = parse__gen0(ctx); - tree.add(subtree); - subtree = parse__gen2(ctx); + parameters.put("outputs", 2); + tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutputs", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_OUTPUT); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen15(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "wf_outputs", + current, + nonterminal_first.get(76), + rules.get(61) + )); } - public ParseTree parse_runtime(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_parameter_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_runtime(ctx); + return parse_wf_parameter_meta(ctx); } - private static ParseTree parse_runtime(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_parameter_meta(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[63][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(119, "runtime")); - ctx.nonterminal = "runtime"; - tree.setList(false); + int rule = (current != null) ? table[38][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(94, "wf_parameter_meta")); + ctx.nonterminal = "wf_parameter_meta"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "runtime", - nonterminal_first.get(119), - nonterminal_rules.get(119) + "wf_parameter_meta", + nonterminal_first.get(94), + nonterminal_rules.get(94) )); } - if (rule == 48) { - /* $runtime = :runtime $map -> Runtime( map=$1 ) */ - ctx.rule = rules.get(48); + if (rule == 69) { + /* $wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 ) */ + ctx.rule = rules.get(69); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("map", 1); - tree.setAstTransformation(new AstTransformNodeCreator("Runtime", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RUNTIME); + tree.setAstTransformation(new AstTransformNodeCreator("ParameterMeta", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_PARAMETER_META); tree.add(next); subtree = parse_map(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "runtime", + "wf_parameter_meta", current, - nonterminal_first.get(119), - rules.get(48) + nonterminal_first.get(94), + rules.get(69) )); } - public ParseTree parse__gen4(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_while_loop(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen4(ctx); + return parse_while_loop(ctx); } - private static ParseTree parse__gen4(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_while_loop(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[64][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(120, "_gen4")); - ctx.nonterminal = "_gen4"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(120).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(120).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[8][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(64, "while_loop")); + ctx.nonterminal = "while_loop"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "while_loop", + nonterminal_first.get(64), + nonterminal_rules.get(64) + )); } - if (rule == 11) { - /* $_gen4 = $import_namespace */ - ctx.rule = rules.get(11); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_import_namespace(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse_map_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_map_kv(ctx); - } - private static ParseTree parse_map_kv(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[65][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(121, "map_kv")); - ctx.nonterminal = "map_kv"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "map_kv", - nonterminal_first.get(121), - nonterminal_rules.get(121) - )); - } - if (rule == 65) { - /* $map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 ) */ - ctx.rule = rules.get(65); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 0); - parameters.put("value", 2); - tree.setAstTransformation(new AstTransformNodeCreator("MapLiteralKv", parameters)); - subtree = parse_e(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); - tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); - return tree; - } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "map_kv", - current, - nonterminal_first.get(121), - rules.get(65) - )); - } - public ParseTree parse_cmd_param_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_cmd_param_kv(ctx); - } - private static ParseTree parse_cmd_param_kv(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[66][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(122, "cmd_param_kv")); - ctx.nonterminal = "cmd_param_kv"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "cmd_param_kv", - nonterminal_first.get(122), - nonterminal_rules.get(122) - )); - } - if (rule == 41) { - /* $cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 ) */ - ctx.rule = rules.get(41); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 1); - parameters.put("value", 3); - tree.setAstTransformation(new AstTransformNodeCreator("CommandParameterAttr", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); - tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); - return tree; - } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "cmd_param_kv", - current, - nonterminal_first.get(122), - rules.get(41) - )); - } - public ParseTree parse_wf_outputs(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_wf_outputs(ctx); - } - private static ParseTree parse_wf_outputs(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[67][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(123, "wf_outputs")); - ctx.nonterminal = "wf_outputs"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "wf_outputs", - nonterminal_first.get(123), - nonterminal_rules.get(123) - )); - } - if (rule == 98) { - /* $wf_outputs = :output :lbrace $_gen27 :rbrace -> WorkflowOutputs( outputs=$2 ) */ - ctx.rule = rules.get(98); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("outputs", 2); - tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutputs", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_OUTPUT); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen27(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); - return tree; - } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "wf_outputs", - current, - nonterminal_first.get(123), - rules.get(98) - )); - } - public ParseTree parse_alias(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_alias(ctx); - } - private static ParseTree parse_alias(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[68][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(124, "alias")); - ctx.nonterminal = "alias"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "alias", - nonterminal_first.get(124), - nonterminal_rules.get(124) - )); - } - if (rule == 93) { - /* $alias = :as :identifier -> $1 */ - ctx.rule = rules.get(93); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_AS); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - return tree; - } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "alias", - current, - nonterminal_first.get(124), - rules.get(93) - )); - } - public ParseTree parse_if_stmt(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_if_stmt(ctx); - } - private static ParseTree parse_if_stmt(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[69][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(125, "if_stmt")); - ctx.nonterminal = "if_stmt"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "if_stmt", - nonterminal_first.get(125), - nonterminal_rules.get(125) - )); - } - if (rule == 104) { - /* $if_stmt = :if :lparen $e :rparen :lbrace $_gen19 :rbrace -> If( expression=$2, body=$5 ) */ - ctx.rule = rules.get(104); + if (rule == 71) { + /* $while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 ) */ + ctx.rule = rules.get(71); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("expression", 2); parameters.put("body", 5); - tree.setAstTransformation(new AstTransformNodeCreator("If", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IF); + tree.setAstTransformation(new AstTransformNodeCreator("WhileLoop", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_WHILE); tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); tree.add(next); @@ -5610,192 +5021,111 @@ private static ParseTree parse_if_stmt(ParserContext ctx) throws SyntaxError { tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); tree.add(next); - subtree = parse__gen19(ctx); + subtree = parse__gen10(ctx); tree.add(subtree); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "if_stmt", + "while_loop", current, - nonterminal_first.get(125), - rules.get(104) + nonterminal_first.get(64), + rules.get(71) )); } - public ParseTree parse__gen23(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen23(ctx); - } - private static ParseTree parse__gen23(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[70][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(126, "_gen23")); - ctx.nonterminal = "_gen23"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(126).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(126).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 82) { - /* $_gen23 = $call_input $_gen24 */ - ctx.rule = rules.get(82); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_call_input(ctx); - tree.add(subtree); - subtree = parse__gen24(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse_task(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_workflow(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_task(ctx); + return parse_workflow(ctx); } - private static ParseTree parse_task(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_workflow(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[71][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(127, "task")); - ctx.nonterminal = "task"; - tree.setList(false); + int rule = (current != null) ? table[31][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(87, "workflow")); + ctx.nonterminal = "workflow"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "task", - nonterminal_first.get(127), - nonterminal_rules.get(127) + "workflow", + nonterminal_first.get(87), + nonterminal_rules.get(87) )); } - if (rule == 23) { - /* $task = :task :identifier :lbrace $_gen5 $_gen7 :rbrace -> Task( name=$1, declarations=$3, sections=$4 ) */ - ctx.rule = rules.get(23); + if (rule == 40) { + /* $workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 ) */ + ctx.rule = rules.get(40); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("name", 1); - parameters.put("declarations", 3); - parameters.put("sections", 4); - tree.setAstTransformation(new AstTransformNodeCreator("Task", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_TASK); + parameters.put("body", 3); + tree.setAstTransformation(new AstTransformNodeCreator("Workflow", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_WORKFLOW); tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); tree.add(next); - subtree = parse__gen5(ctx); - tree.add(subtree); - subtree = parse__gen7(ctx); + subtree = parse__gen10(ctx); tree.add(subtree); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "task", + "workflow", current, - nonterminal_first.get(127), - rules.get(23) + nonterminal_first.get(87), + rules.get(40) )); } - public ParseTree parse__gen18(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_workflow_or_task_or_decl(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen18(ctx); + return parse_workflow_or_task_or_decl(ctx); } - private static ParseTree parse__gen18(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_workflow_or_task_or_decl(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[72][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(128, "_gen18")); - ctx.nonterminal = "_gen18"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(128).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(128).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[52][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(108, "workflow_or_task_or_decl")); + ctx.nonterminal = "workflow_or_task_or_decl"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "workflow_or_task_or_decl", + nonterminal_first.get(108), + nonterminal_rules.get(108) + )); } - if (rule == 59) { - /* $_gen18 = $setter */ - ctx.rule = rules.get(59); + if (rule == 3) { + /* $workflow_or_task_or_decl = $workflow */ + ctx.rule = rules.get(3); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_setter(ctx); + subtree = parse_workflow(ctx); tree.add(subtree); return tree; } - return tree; - } - public ParseTree parse__gen27(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen27(ctx); - } - private static ParseTree parse__gen27(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[73][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(129, "_gen27")); - ctx.nonterminal = "_gen27"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(129).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(129).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { + else if (rule == 4) { + /* $workflow_or_task_or_decl = $task */ + ctx.rule = rules.get(4); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_task(ctx); + tree.add(subtree); return tree; } - if (rule == 94) { - /* $_gen27 = $wf_output $_gen28 */ - ctx.rule = rules.get(94); + else if (rule == 5) { + /* $workflow_or_task_or_decl = $declaration */ + ctx.rule = rules.get(5); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_output(ctx); - tree.add(subtree); - subtree = parse__gen28(ctx); + subtree = parse_declaration(ctx); tree.add(subtree); return tree; } - return tree; - } - public ParseTree parse__gen34(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen34(ctx); - } - private static ParseTree parse__gen34(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[74][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(130, "_gen34")); - ctx.nonterminal = "_gen34"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(130).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(130).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 136) { - /* $_gen34 = $object_kv $_gen35 */ - ctx.rule = rules.get(136); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_object_kv(ctx); - tree.add(subtree); - subtree = parse__gen35(ctx); - tree.add(subtree); - return tree; - } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "workflow_or_task_or_decl", + current, + nonterminal_first.get(108), + rules.get(5) + )); } /* Section: Lexer */ private Map> regex = null; @@ -5922,7 +5252,7 @@ public void output(LexerContext ctx, TerminalIdentifier terminal, String source_ } default_action(ctx, terminal, source_string, line, col); } -public void unescape(LexerContext ctx, TerminalIdentifier terminal, String source_string, int line, int col) { +public void wdl_unescape(LexerContext ctx, TerminalIdentifier terminal, String source_string, int line, int col) { default_action(ctx, terminal, StringEscapeUtils.unescapeJava(source_string.substring(1, source_string.length() - 1)), line, col); } /* END USER CODE */ @@ -5947,236 +5277,704 @@ private void lexer_init() throws SyntaxError { this.regex = new HashMap>(); this.regex.put("default", Arrays.asList(new HermesRegex[] { new HermesRegex( - Pattern.compile("\\s+"), + Pattern.compile("\\s+"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("/\\*(.*?)\\*/", Pattern.DOTALL), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("#.*"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("task(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_TASK, + 0, + getFunction("task") + ), + }) + ), + new HermesRegex( + Pattern.compile("(call)\\s+"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_CALL, + 1, + getFunction("default_action") + ), + new LexerStackPush("task_fqn"), + }) + ), + new HermesRegex( + Pattern.compile("workflow(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + 0, + getFunction("workflow") + ), + }) + ), + new HermesRegex( + Pattern.compile("import(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_IMPORT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("input(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_INPUT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("output(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_OUTPUT, + 0, + getFunction("output") + ), + }) + ), + new HermesRegex( + Pattern.compile("as(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_AS, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("if(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_IF, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("while(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_WHILE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("runtime(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RUNTIME, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("scatter(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_SCATTER, + 0, + getFunction("default_action") + ), + new LexerStackPush("scatter"), + }) + ), + new HermesRegex( + Pattern.compile("command\\s*(?=<<<)"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + 0, + getFunction("default_action") + ), + new LexerStackPush("raw_command2"), + }) + ), + new HermesRegex( + Pattern.compile("command\\s*(?=\\{)"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + 0, + getFunction("default_action") + ), + new LexerStackPush("raw_command"), + }) + ), + new HermesRegex( + Pattern.compile("parameter_meta(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("meta(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_META, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("(object)\\s*(\\{)"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_OBJECT, + 0, + getFunction("default_action") + ), + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LBRACE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_TYPE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\\"(?>[^\\\\\\\"\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\\\""), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_STRING, + 0, + getFunction("wdl_unescape") + ), + }) + ), + new HermesRegex( + Pattern.compile("'(?>[^\\\\\\'\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*'"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_STRING, + 0, + getFunction("wdl_unescape") + ), + }) + ), + new HermesRegex( + Pattern.compile(":"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_COLON, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile(","), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_COMMA, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("=="), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOUBLE_EQUAL, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\|\\|"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOUBLE_PIPE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\&\\&"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOUBLE_AMPERSAND, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("!="), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_NOT_EQUAL, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("="), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_EQUAL, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\."), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\{"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LBRACE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\}"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RBRACE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\("), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LPAREN, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\)"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RPAREN, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\["), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LSQUARE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\]"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RSQUARE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\+"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_PLUS, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\*"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_ASTERISK, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("-"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DASH, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("/"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_SLASH, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("%"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_PERCENT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("<="), Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LTEQ, + 0, + getFunction("default_action") + ), }) ), new HermesRegex( - Pattern.compile("/\\*(.*?)\\*/", Pattern.DOTALL), + Pattern.compile("<"), Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LT, + 0, + getFunction("default_action") + ), }) ), new HermesRegex( - Pattern.compile("#.*"), + Pattern.compile(">="), Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_GTEQ, + 0, + getFunction("default_action") + ), }) ), new HermesRegex( - Pattern.compile("task(?![a-zA-Z0-9_])"), + Pattern.compile(">"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_GT, 0, - getFunction("task") + getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(call)\\s+"), + Pattern.compile("!"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_CALL, - 1, + WdlTerminalIdentifier.TERMINAL_NOT, + 0, getFunction("default_action") ), - new LexerStackPush("task_fqn"), }) ), new HermesRegex( - Pattern.compile("workflow(?![a-zA-Z0-9_])"), + Pattern.compile("\\?"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + WdlTerminalIdentifier.TERMINAL_QMARK, 0, - getFunction("workflow") + getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("import(?![a-zA-Z0-9_])"), + Pattern.compile("-?[0-9]+\\.[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_IMPORT, + WdlTerminalIdentifier.TERMINAL_FLOAT, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("input(?![a-zA-Z0-9_])"), + Pattern.compile("[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_INTEGER, 0, getFunction("default_action") ), }) ), + })); + this.regex.put("wf_output", Arrays.asList(new HermesRegex[] { new HermesRegex( - Pattern.compile("output(?![a-zA-Z0-9_])"), + Pattern.compile("\\s+"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("#.*"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_TYPE, 0, - getFunction("output") + getFunction("default_action") ), + new LexerAction("pop"), + new LexerStackPush("wf_output_declaration"), }) ), new HermesRegex( - Pattern.compile("as(?![a-zA-Z0-9_])"), + Pattern.compile("\\{"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_AS, + WdlTerminalIdentifier.TERMINAL_LBRACE, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("if(?![a-zA-Z0-9_])"), + Pattern.compile("\\}"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_RBRACE, 0, getFunction("default_action") ), + new LexerAction("pop"), }) ), new HermesRegex( - Pattern.compile("while(?![a-zA-Z0-9_])"), + Pattern.compile(","), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_COMMA, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("runtime(?![a-zA-Z0-9_])"), + Pattern.compile("\\."), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_DOT, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("scatter(?![a-zA-Z0-9_])"), + Pattern.compile("\\*"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_ASTERISK, 0, getFunction("default_action") ), - new LexerStackPush("scatter"), }) ), new HermesRegex( - Pattern.compile("command\\s*(?=<<<)"), + Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*(\\.[a-zA-Z]([a-zA-Z0-9_])*)*"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_FQN, 0, getFunction("default_action") ), - new LexerStackPush("raw_command2"), }) ), + })); + this.regex.put("wf_output_declaration", Arrays.asList(new HermesRegex[] { new HermesRegex( - Pattern.compile("command\\s*(?=\\{)"), + Pattern.compile("\\s+"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("#.*"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("\\}"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, 0, getFunction("default_action") ), - new LexerStackPush("raw_command"), + new LexerAction("pop"), }) ), new HermesRegex( - Pattern.compile("parameter_meta(?![a-zA-Z0-9_])"), + Pattern.compile("\\["), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_LSQUARE, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("meta(?![a-zA-Z0-9_])"), + Pattern.compile("\\]"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_RSQUARE, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), + Pattern.compile("="), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_EQUAL, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(object)\\s*(\\{)"), + Pattern.compile("\\+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, 0, getFunction("default_action") ), + }) + ), + new HermesRegex( + Pattern.compile("\\*"), + Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_ASTERISK, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(Array|Map|Object|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), + Pattern.compile("[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_INTEGER, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*"), + Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_BOOLEAN, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("\\\"(?>[^\\\\\\\"\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\\\""), + Pattern.compile("(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_STRING, + WdlTerminalIdentifier.TERMINAL_TYPE, 0, - getFunction("unescape") + getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("'(?>[^\\\\\\'\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*'"), + Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_STRING, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, 0, - getFunction("unescape") + getFunction("default_action") ), }) ), @@ -6201,6 +5999,16 @@ private void lexer_init() throws SyntaxError { }) ), new HermesRegex( + Pattern.compile("\\."), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( Pattern.compile("=="), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( @@ -6271,16 +6079,6 @@ private void lexer_init() throws SyntaxError { }) ), new HermesRegex( - Pattern.compile("\\}"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RBRACE, - 0, - getFunction("default_action") - ), - }) - ), - new HermesRegex( Pattern.compile("\\("), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( @@ -6431,88 +6229,40 @@ private void lexer_init() throws SyntaxError { }) ), new HermesRegex( - Pattern.compile("-?[0-9]+\\.[0-9]+"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_FLOAT, - 0, - getFunction("default_action") - ), - }) - ), - new HermesRegex( - Pattern.compile("[0-9]+"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_INTEGER, - 0, - getFunction("default_action") - ), - }) - ), - })); - this.regex.put("wf_output", Arrays.asList(new HermesRegex[] { - new HermesRegex( - Pattern.compile("\\s+"), - Arrays.asList(new LexerOutput[] { - }) - ), - new HermesRegex( - Pattern.compile("\\{"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_LBRACE, - 0, - getFunction("default_action") - ), - }) - ), - new HermesRegex( - Pattern.compile("\\}"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RBRACE, - 0, - getFunction("default_action") - ), - new LexerAction("pop"), - }) - ), - new HermesRegex( - Pattern.compile(","), + Pattern.compile("\\\"(?>[^\\\\\\\"\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\\\""), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_STRING, 0, - getFunction("default_action") + getFunction("wdl_unescape") ), }) ), new HermesRegex( - Pattern.compile("\\."), + Pattern.compile("'(?>[^\\\\\\'\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*'"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_DOT, + WdlTerminalIdentifier.TERMINAL_STRING, 0, - getFunction("default_action") + getFunction("wdl_unescape") ), }) ), new HermesRegex( - Pattern.compile("\\*"), + Pattern.compile("-?[0-9]+\\.[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_ASTERISK, + WdlTerminalIdentifier.TERMINAL_FLOAT, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*(\\.[a-zA-Z]([a-zA-Z0-9_])*)*"), + Pattern.compile("[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_INTEGER, 0, getFunction("default_action") ), @@ -6781,35 +6531,35 @@ private void lexer_init() throws SyntaxError { }) ), new HermesRegex( - Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), + Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*(?=\\s*=)"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + -1, + getFunction("default_action") + ), + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(Array|Map|Object|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), + Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_BOOLEAN, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*(?=\\s*=)"), + Pattern.compile("(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - -1, - getFunction("default_action") - ), - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_TYPE, 0, getFunction("default_action") ), @@ -7071,7 +6821,7 @@ private void lexer_init() throws SyntaxError { new LexerRegexOutput( WdlTerminalIdentifier.TERMINAL_STRING, 0, - getFunction("unescape") + getFunction("wdl_unescape") ), }) ), @@ -7081,7 +6831,7 @@ private void lexer_init() throws SyntaxError { new LexerRegexOutput( WdlTerminalIdentifier.TERMINAL_STRING, 0, - getFunction("unescape") + getFunction("wdl_unescape") ), }) ), diff --git a/java/java7/WdlParser.java b/parsers/java/java8/WdlParser.java similarity index 71% rename from java/java7/WdlParser.java rename to parsers/java/java8/WdlParser.java index eecd1b7..6a831d9 100644 --- a/java/java7/WdlParser.java +++ b/parsers/java/java8/WdlParser.java @@ -8,7 +8,6 @@ import java.nio.*; import java.nio.channels.FileChannel; import java.nio.charset.Charset; -import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringEscapeUtils; import java.util.regex.Pattern; import java.util.regex.Matcher; @@ -82,6 +81,10 @@ public SyntaxError(String message) { String noMoreTokens(String method, TerminalIdentifier expecting, Terminal last); /* Invalid terminal is found in the token stream. */ String invalidTerminal(String method, Terminal invalid); + /* For lists that have a minimum required size which is not met */ + String missingListItems(String method, int required, int found, Terminal last); + /* For lists that require a terminal to terminate each element in the list */ + String missingTerminator(String method, TerminalIdentifier terminator, Terminal last); } public static class TokenStream extends ArrayList { private int index; @@ -278,7 +281,7 @@ public String toString() { this.getLine(), this.getColumn(), this.getTerminalStr(), - Base64.encodeBase64String(source_string_bytes) + Base64.getEncoder().encodeToString(source_string_bytes) ); } public String toPrettyString() { @@ -294,7 +297,7 @@ public String toPrettyString(int indent) { private ArrayList children; private boolean isExpr, isNud, isPrefix, isInfix, isExprNud; private int nudMorphemeCount; - private Terminal listSeparator; + private int listSeparatorId; private boolean list; private AstTransform astTransform; ParseTree(NonTerminal nonterminal) { @@ -307,7 +310,7 @@ public String toPrettyString(int indent) { this.isInfix = false; this.isExprNud = false; this.nudMorphemeCount = 0; - this.listSeparator = null; + this.listSeparatorId = -1; this.list = false; } public void setExpr(boolean value) { this.isExpr = value; } @@ -318,7 +321,7 @@ public String toPrettyString(int indent) { public void setAstTransformation(AstTransform value) { this.astTransform = value; } public void setNudMorphemeCount(int value) { this.nudMorphemeCount = value; } public void setList(boolean value) { this.list = value; } - public void setListSeparator(Terminal value) { this.listSeparator = value; } + public void setListSeparator(int value) { this.listSeparatorId = value; } public int getNudMorphemeCount() { return this.nudMorphemeCount; } public List getChildren() { return this.children; } public boolean isInfix() { return this.isInfix; } @@ -344,16 +347,16 @@ private boolean isCompoundNud() { public AstNode toAst() { if ( this.list == true ) { AstList astList = new AstList(); - int end = this.children.size() - 1; if ( this.children.size() == 0 ) { return astList; } - for (int i = 0; i < this.children.size() - 1; i++) { - if (this.children.get(i) instanceof Terminal && this.listSeparator != null && ((Terminal)this.children.get(i)).id == this.listSeparator.id) + for (int i = 0; i < this.children.size(); i++) { + if (this.children.get(i) instanceof Terminal && this.listSeparatorId >= 0 && + ((Terminal) this.children.get(i)).id == this.listSeparatorId) { continue; + } astList.add(this.children.get(i).toAst()); } - astList.addAll((AstList) this.children.get(this.children.size() - 1).toAst()); return astList; } else if ( this.isExpr ) { if ( this.astTransform instanceof AstTransformSubstitution ) { @@ -462,6 +465,12 @@ public String noMoreTokens(String method, TerminalIdentifier expecting, Terminal public String invalidTerminal(String method, Terminal invalid) { return "Invalid symbol ID: "+invalid.getId()+" ("+invalid.getTerminalStr()+")"; } + public String missingListItems(String method, int required, int found, Terminal last) { + return "List for "+method+" requires "+required+" items but only "+found+" were found."; + } + public String missingTerminator(String method, TerminalIdentifier terminator, Terminal last) { + return "List for "+method+" is missing a terminator"; + } } public interface TerminalMap { TerminalIdentifier get(String string); @@ -492,62 +501,62 @@ public String invalidTerminal(String method, Terminal invalid) { public String string(); } public enum WdlTerminalIdentifier implements TerminalIdentifier { - TERMINAL_DASH(0, "dash"), - TERMINAL_IDENTIFIER(1, "identifier"), - TERMINAL_AS(2, "as"), - TERMINAL_SCATTER(3, "scatter"), - TERMINAL_E(4, "e"), - TERMINAL_PARAMETER_META(5, "parameter_meta"), - TERMINAL_IN(6, "in"), - TERMINAL_QMARK(7, "qmark"), - TERMINAL_RSQUARE(8, "rsquare"), - TERMINAL_LT(9, "lt"), - TERMINAL_GTEQ(10, "gteq"), - TERMINAL_WORKFLOW(11, "workflow"), - TERMINAL_RPAREN(12, "rparen"), - TERMINAL_INTEGER(13, "integer"), - TERMINAL_LSQUARE(14, "lsquare"), - TERMINAL_NOT(15, "not"), - TERMINAL_TASK(16, "task"), - TERMINAL_OBJECT(17, "object"), - TERMINAL_LBRACE(18, "lbrace"), - TERMINAL_RAW_COMMAND(19, "raw_command"), - TERMINAL_TYPE(20, "type"), - TERMINAL_NOT_EQUAL(21, "not_equal"), - TERMINAL_RUNTIME(22, "runtime"), - TERMINAL_CMD_PARAM_END(23, "cmd_param_end"), - TERMINAL_CMD_PART(24, "cmd_part"), - TERMINAL_CALL(25, "call"), - TERMINAL_DOT(26, "dot"), - TERMINAL_RBRACE(27, "rbrace"), - TERMINAL_IMPORT(28, "import"), - TERMINAL_STRING(29, "string"), - TERMINAL_COMMA(30, "comma"), - TERMINAL_EQUAL(31, "equal"), - TERMINAL_LPAREN(32, "lparen"), - TERMINAL_CMD_ATTR_HINT(33, "cmd_attr_hint"), - TERMINAL_DOUBLE_PIPE(34, "double_pipe"), - TERMINAL_PLUS(35, "plus"), - TERMINAL_DOUBLE_AMPERSAND(36, "double_ampersand"), - TERMINAL_SLASH(37, "slash"), - TERMINAL_FQN(38, "fqn"), - TERMINAL_WHILE(39, "while"), - TERMINAL_TYPE_E(40, "type_e"), - TERMINAL_COLON(41, "colon"), - TERMINAL_RAW_CMD_END(42, "raw_cmd_end"), - TERMINAL_INPUT(43, "input"), - TERMINAL_GT(44, "gt"), - TERMINAL_IF(45, "if"), - TERMINAL_META(46, "meta"), - TERMINAL_LTEQ(47, "lteq"), - TERMINAL_DOUBLE_EQUAL(48, "double_equal"), - TERMINAL_PERCENT(49, "percent"), - TERMINAL_CMD_PARAM_START(50, "cmd_param_start"), - TERMINAL_ASTERISK(51, "asterisk"), - TERMINAL_BOOLEAN(52, "boolean"), - TERMINAL_RAW_CMD_START(53, "raw_cmd_start"), - TERMINAL_FLOAT(54, "float"), - TERMINAL_OUTPUT(55, "output"), + TERMINAL_AS(13, "as"), + TERMINAL_ASTERISK(46, "asterisk"), + TERMINAL_BOOLEAN(38, "boolean"), + TERMINAL_CALL(28, "call"), + TERMINAL_CMD_ATTR_HINT(19, "cmd_attr_hint"), + TERMINAL_CMD_PARAM_END(10, "cmd_param_end"), + TERMINAL_CMD_PARAM_START(55, "cmd_param_start"), + TERMINAL_CMD_PART(9, "cmd_part"), + TERMINAL_COLON(50, "colon"), + TERMINAL_COMMA(27, "comma"), + TERMINAL_DASH(24, "dash"), + TERMINAL_DOT(51, "dot"), + TERMINAL_DOUBLE_AMPERSAND(14, "double_ampersand"), + TERMINAL_DOUBLE_EQUAL(23, "double_equal"), + TERMINAL_DOUBLE_PIPE(6, "double_pipe"), + TERMINAL_E(54, "e"), + TERMINAL_EQUAL(48, "equal"), + TERMINAL_FLOAT(39, "float"), + TERMINAL_FQN(2, "fqn"), + TERMINAL_GT(25, "gt"), + TERMINAL_GTEQ(37, "gteq"), + TERMINAL_IDENTIFIER(42, "identifier"), + TERMINAL_IF(36, "if"), + TERMINAL_IMPORT(17, "import"), + TERMINAL_IN(21, "in"), + TERMINAL_INPUT(31, "input"), + TERMINAL_INTEGER(16, "integer"), + TERMINAL_LBRACE(41, "lbrace"), + TERMINAL_LPAREN(53, "lparen"), + TERMINAL_LSQUARE(29, "lsquare"), + TERMINAL_LT(30, "lt"), + TERMINAL_LTEQ(7, "lteq"), + TERMINAL_META(18, "meta"), + TERMINAL_NOT(5, "not"), + TERMINAL_NOT_EQUAL(3, "not_equal"), + TERMINAL_OBJECT(1, "object"), + TERMINAL_OUTPUT(52, "output"), + TERMINAL_PARAMETER_META(49, "parameter_meta"), + TERMINAL_PERCENT(4, "percent"), + TERMINAL_PLUS(26, "plus"), + TERMINAL_QMARK(44, "qmark"), + TERMINAL_RAW_CMD_END(0, "raw_cmd_end"), + TERMINAL_RAW_CMD_START(20, "raw_cmd_start"), + TERMINAL_RAW_COMMAND(33, "raw_command"), + TERMINAL_RBRACE(34, "rbrace"), + TERMINAL_RPAREN(22, "rparen"), + TERMINAL_RSQUARE(12, "rsquare"), + TERMINAL_RUNTIME(47, "runtime"), + TERMINAL_SCATTER(45, "scatter"), + TERMINAL_SLASH(15, "slash"), + TERMINAL_STRING(32, "string"), + TERMINAL_TASK(40, "task"), + TERMINAL_TYPE(43, "type"), + TERMINAL_TYPE_E(11, "type_e"), + TERMINAL_WHILE(35, "while"), + TERMINAL_WORKFLOW(8, "workflow"), END_SENTINAL(-3, "END_SENTINAL"); private final int id; private final String string; @@ -560,897 +569,856 @@ public String invalidTerminal(String method, Terminal invalid) { } /* table[nonterminal][terminal] = rule */ private static final int[][] table = { - { 142, 142, -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, -1, 142, 142, 142, -1, 142, 142, -1, -1, -1, -1, -1, -1, -1, -1, 145, -1, 142, -1, -1, 142, -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 142, -1, 142, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, 60, -1, 60, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 60, -1, 60, -1, -1, 60, -1, 60, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, 60, 60, -1, -1, 60, -1, 60, 60, -1, -1, -1, -1, -1, -1, -1, -1, 60 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 85, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { 38, 38, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, 38, 38, 38, -1, 38, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, 38, 37, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, 38, -1 }, - { -1, -1, -1, -1, -1, 18, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 18, 15, -1, 18, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, -1, -1, 18, -1, -1, 18, -1, -1, -1, -1, -1, -1, -1, -1, 18 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, 16, -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, 17, -1, -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, 17 }, - { -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, -1, -1, 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, 137, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 79, -1, 80, -1, -1, -1, -1, 80, -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 80, -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80 }, - { -1, -1, -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, 52, 52, 52, -1, -1, -1, -1, 51, -1, 52, -1, 52, -1, -1, -1, 52, -1, -1, 52, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, 49, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, 50, 50, 50, -1, -1, -1, -1, 50, -1, 50, -1, 50, -1, -1, -1, 50, -1, -1, 50, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, 43, 44, -1, -1, -1, -1, -1, -1, 42, -1, 45, -1, -1, -1, 47, -1, -1, 46, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, 38, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, 38, -1, 38, -1, -1, 38, -1, -1, 38, -1, -1, -1, -1, -1, 38, 38, -1, 38, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, 38, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, 7, -1, 6, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21 }, + { -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, 35, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, 35, -1, 35, 35, 35, 35, -1, -1, -1, 35, -1, -1, 35, -1, 35, -1, 35, 34, 35, -1, -1, 35, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 2, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, -1, 16, -1, -1, 14, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, 131, -1, -1, -1, 131, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 46 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, 67, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 67, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67 }, - { -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, -1, 19, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, 19 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 144, -1, -1, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 101, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, 58, -1, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { 39, 39, -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, -1, 39, 39, 39, -1, 39, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, 39, 36, -1, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, 39, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, 92, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 99, 100, -1, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, 136, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 139, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { 129, 129, -1, -1, 129, -1, -1, -1, 132, -1, -1, -1, 132, 129, 129, 129, -1, 129, 129, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 129, -1, -1, 129, -1, -1, 129, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 129, -1, 129, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { 65, 65, -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, 65, 65, 65, -1, 65, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, 65, -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, 65, -1 }, - { -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, -1, 26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1, 25 }, - { -1, -1, -1, -1, -1, -1, -1, -1, 110, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, 66, -1, 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, 66, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 98 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, 11, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, -1, -1 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 73, 72, -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, 76 }, - { -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, 20, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, 20 }, - { -1, -1, 77, 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, -1, 78, -1, -1, -1, -1, 78, -1, 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, 78, -1, -1, -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78 }, - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, - { -1, -1, -1, -1, -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, }; static { Map> map = new HashMap>(); - map.put(56, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, - })); - map.put(57, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, + map.put(106, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, })); - map.put(58, Arrays.asList(new TerminalIdentifier[] { + map.put(87, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(59, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, + map.put(108, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(60, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_EQUAL, + map.put(71, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(61, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, + map.put(70, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(62, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(115, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INPUT, })); - map.put(63, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + map.put(88, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(64, Arrays.asList(new TerminalIdentifier[] { + map.put(113, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(65, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + map.put(92, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DOT, })); - map.put(66, Arrays.asList(new TerminalIdentifier[] { + map.put(67, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(67, Arrays.asList(new TerminalIdentifier[] { + map.put(96, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(68, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(69, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(70, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CALL, - })); - map.put(71, Arrays.asList(new TerminalIdentifier[] { + map.put(110, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(72, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(73, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(83, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(74, Arrays.asList(new TerminalIdentifier[] { + map.put(104, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, - })); - map.put(75, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - WdlTerminalIdentifier.TERMINAL_CMD_PART, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(76, Arrays.asList(new TerminalIdentifier[] { + map.put(64, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(77, Arrays.asList(new TerminalIdentifier[] { + map.put(89, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(78, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IF, - })); - map.put(79, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(112, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(80, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(105, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, })); - map.put(81, Arrays.asList(new TerminalIdentifier[] { + map.put(65, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(82, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_QMARK, + map.put(102, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(83, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(98, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_EQUAL, })); - map.put(84, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_WHILE, + map.put(79, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, + })); + map.put(116, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_OUTPUT, })); - map.put(85, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, + map.put(74, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(86, Arrays.asList(new TerminalIdentifier[] { + map.put(78, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_INPUT, })); - map.put(87, Arrays.asList(new TerminalIdentifier[] { + map.put(56, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(88, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + map.put(103, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, })); - map.put(89, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(61, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, })); - map.put(90, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); map.put(91, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(92, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, + map.put(77, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(93, Arrays.asList(new TerminalIdentifier[] { + map.put(100, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(94, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FQN, + map.put(97, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(81, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IF, })); map.put(95, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IMPORT, })); - map.put(96, Arrays.asList(new TerminalIdentifier[] { + map.put(68, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(97, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_QMARK, + map.put(107, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(98, Arrays.asList(new TerminalIdentifier[] { + map.put(75, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(99, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - })); - map.put(100, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - })); - map.put(101, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_EQUAL, + map.put(82, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(102, Arrays.asList(new TerminalIdentifier[] { + map.put(63, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(103, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DOT, + map.put(85, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, })); - map.put(104, Arrays.asList(new TerminalIdentifier[] { + map.put(114, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(105, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_FLOAT, + map.put(72, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(106, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, + map.put(93, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, })); - map.put(107, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + map.put(57, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, })); - map.put(108, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(94, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(109, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + map.put(76, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, })); - map.put(110, Arrays.asList(new TerminalIdentifier[] { + map.put(101, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(111, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(86, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_EQUAL, })); - map.put(112, Arrays.asList(new TerminalIdentifier[] { + map.put(62, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(113, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - WdlTerminalIdentifier.TERMINAL_CMD_PART, - })); - map.put(114, Arrays.asList(new TerminalIdentifier[] { + map.put(73, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(115, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_WHILE, + map.put(80, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(116, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(117, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DOT, - })); - map.put(118, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - })); - map.put(119, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - })); - map.put(120, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(121, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, - })); - map.put(122, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(123, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(124, Arrays.asList(new TerminalIdentifier[] { + map.put(69, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_META, })); - map.put(125, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + map.put(111, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(126, Arrays.asList(new TerminalIdentifier[] { + map.put(66, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_WHILE, WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_IF, + })); + map.put(109, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DOT, + })); + map.put(90, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + })); + map.put(60, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_OUTPUT, })); - map.put(127, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(99, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, })); - map.put(128, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, + map.put(58, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(129, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FQN, + map.put(84, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(130, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(59, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); nonterminal_first = Collections.unmodifiableMap(map); } static { Map> map = new HashMap>(); - map.put(56, Arrays.asList(new TerminalIdentifier[] { + map.put(106, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + map.put(87, Arrays.asList(new TerminalIdentifier[] { + })); + map.put(108, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(57, Arrays.asList(new TerminalIdentifier[] { + map.put(71, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(70, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(115, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RBRACE, + })); + map.put(88, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_RBRACE, + })); + map.put(113, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RBRACE, + })); + map.put(92, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(58, Arrays.asList(new TerminalIdentifier[] { + map.put(67, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RSQUARE, })); - map.put(59, Arrays.asList(new TerminalIdentifier[] { + map.put(96, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RPAREN, + WdlTerminalIdentifier.TERMINAL_RSQUARE, + })); + map.put(110, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RBRACE, + })); + map.put(83, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IMPORT, WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(60, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(104, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(64, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_INPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(61, Arrays.asList(new TerminalIdentifier[] { + map.put(89, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(62, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, + map.put(112, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, })); - map.put(63, Arrays.asList(new TerminalIdentifier[] { + map.put(105, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(64, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + map.put(65, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RBRACE, + })); + map.put(102, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RBRACE, + })); + map.put(98, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_INPUT, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(65, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, + map.put(79, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, - })); - map.put(66, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_INPUT, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - })); - map.put(67, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(68, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(69, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(70, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(116, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(71, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(72, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(74, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(73, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, + })); + map.put(78, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INPUT, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_OUTPUT, })); - map.put(74, Arrays.asList(new TerminalIdentifier[] { + map.put(56, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, + WdlTerminalIdentifier.TERMINAL_CMD_PART, + WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, + })); + map.put(103, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_GTEQ, - WdlTerminalIdentifier.TERMINAL_LT, - WdlTerminalIdentifier.TERMINAL_RSQUARE, - WdlTerminalIdentifier.TERMINAL_RPAREN, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_NOT_EQUAL, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_END, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - WdlTerminalIdentifier.TERMINAL_DOUBLE_PIPE, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_DOUBLE_AMPERSAND, - WdlTerminalIdentifier.TERMINAL_SLASH, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_COLON, - WdlTerminalIdentifier.TERMINAL_GT, - WdlTerminalIdentifier.TERMINAL_INPUT, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_LTEQ, + WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(61, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_DOUBLE_EQUAL, - WdlTerminalIdentifier.TERMINAL_PERCENT, - WdlTerminalIdentifier.TERMINAL_ASTERISK, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(75, Arrays.asList(new TerminalIdentifier[] { + map.put(91, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, WdlTerminalIdentifier.TERMINAL_CMD_PART, - })); - map.put(76, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, })); map.put(77, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_INPUT, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(78, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + map.put(100, Arrays.asList(new TerminalIdentifier[] { + })); + map.put(97, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_ASTERISK, + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_END, + WdlTerminalIdentifier.TERMINAL_COLON, + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_DOUBLE_AMPERSAND, + WdlTerminalIdentifier.TERMINAL_DOUBLE_EQUAL, + WdlTerminalIdentifier.TERMINAL_DOUBLE_PIPE, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_GT, + WdlTerminalIdentifier.TERMINAL_GTEQ, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_LT, + WdlTerminalIdentifier.TERMINAL_LTEQ, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_NOT_EQUAL, + WdlTerminalIdentifier.TERMINAL_OBJECT, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(79, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_PERCENT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_RPAREN, WdlTerminalIdentifier.TERMINAL_RSQUARE, - })); - map.put(80, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_SLASH, + WdlTerminalIdentifier.TERMINAL_STRING, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); map.put(81, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(82, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(95, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(83, Arrays.asList(new TerminalIdentifier[] { + map.put(68, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(84, Arrays.asList(new TerminalIdentifier[] { + map.put(107, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(85, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_WHILE, + map.put(75, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(86, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(87, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, + map.put(82, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(88, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(63, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_INPUT, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + })); + map.put(85, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(89, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(90, Arrays.asList(new TerminalIdentifier[] { + map.put(114, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_COMMA, WdlTerminalIdentifier.TERMINAL_RBRACE, })); - map.put(91, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, - WdlTerminalIdentifier.TERMINAL_CMD_PART, - })); - map.put(92, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, + map.put(72, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); map.put(93, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - })); - map.put(94, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(95, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - })); - map.put(96, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - })); - map.put(97, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(98, Arrays.asList(new TerminalIdentifier[] { + map.put(57, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(99, Arrays.asList(new TerminalIdentifier[] { + map.put(94, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(100, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, - })); - map.put(101, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_RUNTIME, + })); + map.put(76, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_INPUT, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(102, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(103, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(104, Arrays.asList(new TerminalIdentifier[] { + map.put(101, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(105, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RSQUARE, - WdlTerminalIdentifier.TERMINAL_RPAREN, - })); - map.put(106, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, + map.put(86, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(107, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(108, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(109, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(110, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(111, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RSQUARE, - })); - map.put(112, Arrays.asList(new TerminalIdentifier[] { + map.put(62, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(113, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RAW_CMD_END, + map.put(73, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_RSQUARE, })); - map.put(114, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_WHILE, + map.put(80, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_INPUT, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_RUNTIME, - })); - map.put(115, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(116, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(69, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(117, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(118, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(119, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(111, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(120, Arrays.asList(new TerminalIdentifier[] { + map.put(66, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(121, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - })); - map.put(122, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RSQUARE, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_COMMA, - WdlTerminalIdentifier.TERMINAL_QMARK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(123, Arrays.asList(new TerminalIdentifier[] { + map.put(109, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(124, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, + map.put(90, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, WdlTerminalIdentifier.TERMINAL_RBRACE, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(60, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(125, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - })); - map.put(126, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RBRACE, + WdlTerminalIdentifier.TERMINAL_SCATTER, WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(99, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(127, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(128, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(58, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_RBRACE, WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(129, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, WdlTerminalIdentifier.TERMINAL_RBRACE, - })); - map.put(130, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RSQUARE, - })); + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(84, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + map.put(59, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); nonterminal_follow = Collections.unmodifiableMap(map); } static { @@ -1459,1039 +1427,844 @@ public String invalidTerminal(String method, Terminal invalid) { WdlTerminalIdentifier.TERMINAL_IMPORT, })); map.put(1, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - })); - map.put(2, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(3, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(4, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - })); - map.put(5, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(6, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(7, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(8, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, - WdlTerminalIdentifier.TERMINAL_TASK, - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + map.put(39, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WHILE, })); - map.put(9, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + map.put(49, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(10, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(50, Arrays.asList(new TerminalIdentifier[] { })); - map.put(11, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, + map.put(51, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(12, Arrays.asList(new TerminalIdentifier[] { + map.put(52, Arrays.asList(new TerminalIdentifier[] { })); - map.put(13, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IMPORT, + map.put(54, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INPUT, })); - map.put(14, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, + map.put(56, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(15, Arrays.asList(new TerminalIdentifier[] { + map.put(60, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(16, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, + map.put(65, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DOT, })); - map.put(17, Arrays.asList(new TerminalIdentifier[] { + map.put(66, Arrays.asList(new TerminalIdentifier[] { })); - map.put(18, Arrays.asList(new TerminalIdentifier[] { + map.put(75, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(19, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(96, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(20, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - WdlTerminalIdentifier.TERMINAL_META, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(100, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(21, Arrays.asList(new TerminalIdentifier[] { + map.put(6, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(22, Arrays.asList(new TerminalIdentifier[] { + map.put(7, Arrays.asList(new TerminalIdentifier[] { })); - map.put(23, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TASK, + map.put(103, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(24, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(10, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(25, Arrays.asList(new TerminalIdentifier[] { + map.put(11, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(26, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - })); - map.put(27, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(28, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_META, - })); - map.put(29, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, - WdlTerminalIdentifier.TERMINAL_CMD_PART, - })); - map.put(30, Arrays.asList(new TerminalIdentifier[] { + map.put(18, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(31, Arrays.asList(new TerminalIdentifier[] { + map.put(22, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, })); - map.put(32, Arrays.asList(new TerminalIdentifier[] { + map.put(25, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(33, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + map.put(31, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); map.put(34, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PART, + WdlTerminalIdentifier.TERMINAL_EQUAL, })); map.put(35, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, })); - map.put(36, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + map.put(59, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, })); - map.put(37, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + map.put(53, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, })); - map.put(38, Arrays.asList(new TerminalIdentifier[] { + map.put(55, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(39, Arrays.asList(new TerminalIdentifier[] { + map.put(57, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INPUT, })); - map.put(40, Arrays.asList(new TerminalIdentifier[] { + map.put(23, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, })); - map.put(41, Arrays.asList(new TerminalIdentifier[] { + map.put(24, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, })); - map.put(42, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - })); - map.put(43, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - })); - map.put(44, Arrays.asList(new TerminalIdentifier[] { + map.put(19, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, })); - map.put(45, Arrays.asList(new TerminalIdentifier[] { + map.put(21, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START, })); - map.put(46, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, + map.put(20, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CMD_PART, })); - map.put(47, Arrays.asList(new TerminalIdentifier[] { + map.put(36, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_TYPE, WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(48, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_RUNTIME, - })); - map.put(49, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, - })); - map.put(50, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_META, + map.put(2, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, + WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + WdlTerminalIdentifier.TERMINAL_WORKFLOW, })); - map.put(51, Arrays.asList(new TerminalIdentifier[] { + map.put(90, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_INTEGER, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(52, Arrays.asList(new TerminalIdentifier[] { + map.put(89, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(53, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(54, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(55, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_INTEGER, WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, + WdlTerminalIdentifier.TERMINAL_LSQUARE, + WdlTerminalIdentifier.TERMINAL_NOT, + WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(56, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(57, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_QMARK, - })); - map.put(58, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(59, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_EQUAL, - })); - map.put(60, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(61, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - })); - map.put(62, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_EQUAL, - })); - map.put(63, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_QMARK, - })); - map.put(64, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, - })); - map.put(65, Arrays.asList(new TerminalIdentifier[] { + map.put(81, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, - })); - map.put(66, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(67, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_WHILE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - WdlTerminalIdentifier.TERMINAL_CALL, - WdlTerminalIdentifier.TERMINAL_SCATTER, - WdlTerminalIdentifier.TERMINAL_IF, - WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(68, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(69, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(70, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WORKFLOW, - })); - map.put(71, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CALL, - })); - map.put(72, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - })); - map.put(73, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - })); - map.put(74, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IF, - })); - map.put(75, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_SCATTER, - })); - map.put(76, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(77, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, - })); - map.put(78, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(79, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(80, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(81, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_CALL, + WdlTerminalIdentifier.TERMINAL_STRING, })); map.put(82, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(83, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(84, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(85, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(86, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, - })); - map.put(87, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(88, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(89, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(90, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(91, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INPUT, - })); - map.put(92, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(93, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_AS, - })); - map.put(94, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FQN, - })); - map.put(95, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(96, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(97, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(98, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OUTPUT, - })); - map.put(99, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DOT, - })); - map.put(100, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(101, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FQN, - })); - map.put(102, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DOT, - })); - map.put(103, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_WHILE, - })); - map.put(104, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IF, - })); - map.put(105, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_SCATTER, - })); - map.put(106, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - })); - map.put(107, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - WdlTerminalIdentifier.TERMINAL_TYPE_E, - })); - map.put(108, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, - })); - map.put(109, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(110, Arrays.asList(new TerminalIdentifier[] { - })); - map.put(111, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - })); - map.put(112, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_TYPE, - })); - map.put(113, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(114, Arrays.asList(new TerminalIdentifier[] { + map.put(80, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(115, Arrays.asList(new TerminalIdentifier[] { + map.put(86, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(116, Arrays.asList(new TerminalIdentifier[] { + map.put(87, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(117, Arrays.asList(new TerminalIdentifier[] { + map.put(84, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(118, Arrays.asList(new TerminalIdentifier[] { + map.put(85, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, })); - map.put(119, Arrays.asList(new TerminalIdentifier[] { + map.put(83, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_INTEGER, WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, WdlTerminalIdentifier.TERMINAL_FLOAT, - })); - map.put(120, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(121, Arrays.asList(new TerminalIdentifier[] { + map.put(92, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(122, Arrays.asList(new TerminalIdentifier[] { + map.put(88, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(123, Arrays.asList(new TerminalIdentifier[] { + map.put(91, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, + })); + map.put(108, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, })); - map.put(124, Arrays.asList(new TerminalIdentifier[] { + map.put(95, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_DASH, + })); + map.put(110, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FLOAT, + })); + map.put(107, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + })); + map.put(99, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + })); + map.put(97, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + })); + map.put(98, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + })); + map.put(109, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, + })); + map.put(104, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_LBRACE, + })); + map.put(105, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, })); - map.put(125, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + map.put(102, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_LSQUARE, + })); + map.put(93, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_NOT, + })); + map.put(101, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + })); + map.put(94, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, })); - map.put(126, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_NOT, + map.put(106, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(127, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_PLUS, + map.put(72, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IF, })); - map.put(128, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, + map.put(8, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IMPORT, + })); + map.put(9, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_AS, + })); + map.put(33, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + })); + map.put(32, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_LBRACE, })); - map.put(129, Arrays.asList(new TerminalIdentifier[] { + map.put(38, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_DASH, + WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_FLOAT, WdlTerminalIdentifier.TERMINAL_IDENTIFIER, WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, + WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_LPAREN, WdlTerminalIdentifier.TERMINAL_LSQUARE, WdlTerminalIdentifier.TERMINAL_NOT, WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, - })); - map.put(130, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_STRING, })); - map.put(131, Arrays.asList(new TerminalIdentifier[] { + map.put(58, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(132, Arrays.asList(new TerminalIdentifier[] { + map.put(30, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, })); - map.put(133, Arrays.asList(new TerminalIdentifier[] { + map.put(74, Arrays.asList(new TerminalIdentifier[] { WdlTerminalIdentifier.TERMINAL_IDENTIFIER, })); - map.put(134, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(27, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(135, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(26, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, })); - map.put(136, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(29, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, })); - map.put(137, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(28, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(138, Arrays.asList(new TerminalIdentifier[] { + map.put(73, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, })); - map.put(139, Arrays.asList(new TerminalIdentifier[] { + map.put(13, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, })); - map.put(140, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_OBJECT, + map.put(17, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, })); - map.put(141, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LSQUARE, + map.put(14, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, })); - map.put(142, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_DASH, - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, - WdlTerminalIdentifier.TERMINAL_INTEGER, - WdlTerminalIdentifier.TERMINAL_E, - WdlTerminalIdentifier.TERMINAL_LSQUARE, - WdlTerminalIdentifier.TERMINAL_NOT, - WdlTerminalIdentifier.TERMINAL_OBJECT, - WdlTerminalIdentifier.TERMINAL_STRING, - WdlTerminalIdentifier.TERMINAL_LBRACE, - WdlTerminalIdentifier.TERMINAL_LPAREN, - WdlTerminalIdentifier.TERMINAL_BOOLEAN, - WdlTerminalIdentifier.TERMINAL_PLUS, - WdlTerminalIdentifier.TERMINAL_FLOAT, + map.put(16, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, })); - map.put(143, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_COMMA, + map.put(15, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_RUNTIME, })); - map.put(144, Arrays.asList(new TerminalIdentifier[] { + map.put(37, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_EQUAL, })); - map.put(145, Arrays.asList(new TerminalIdentifier[] { + map.put(12, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, })); - map.put(146, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LBRACE, + map.put(79, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, })); - map.put(147, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_LPAREN, + map.put(76, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, })); - map.put(148, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_STRING, + map.put(78, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, })); - map.put(149, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + map.put(77, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, })); - map.put(150, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + map.put(41, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_CALL, })); - map.put(151, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_INTEGER, + map.put(42, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, })); - map.put(152, Arrays.asList(new TerminalIdentifier[] { - WdlTerminalIdentifier.TERMINAL_FLOAT, + map.put(44, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_IF, })); - rule_first = Collections.unmodifiableMap(map); - } - static { - Map> map = new HashMap>(); - map.put(56, new ArrayList()); - map.put(57, new ArrayList()); - map.put(58, new ArrayList()); - map.put(59, new ArrayList()); - map.put(60, new ArrayList()); - map.put(61, new ArrayList()); - map.put(62, new ArrayList()); - map.put(63, new ArrayList()); - map.put(64, new ArrayList()); - map.put(65, new ArrayList()); - map.put(66, new ArrayList()); - map.put(67, new ArrayList()); - map.put(68, new ArrayList()); - map.put(69, new ArrayList()); - map.put(70, new ArrayList()); - map.put(71, new ArrayList()); - map.put(72, new ArrayList()); - map.put(73, new ArrayList()); - map.put(74, new ArrayList()); - map.put(75, new ArrayList()); - map.put(76, new ArrayList()); - map.put(77, new ArrayList()); - map.put(78, new ArrayList()); - map.put(79, new ArrayList()); - map.put(80, new ArrayList()); - map.put(81, new ArrayList()); - map.put(82, new ArrayList()); - map.put(83, new ArrayList()); - map.put(84, new ArrayList()); - map.put(85, new ArrayList()); - map.put(86, new ArrayList()); - map.put(87, new ArrayList()); - map.put(88, new ArrayList()); - map.put(89, new ArrayList()); - map.put(90, new ArrayList()); - map.put(91, new ArrayList()); + map.put(45, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_SCATTER, + })); + map.put(48, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + })); + map.put(46, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + })); + map.put(47, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + })); + map.put(43, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(70, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_META, + })); + map.put(62, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(63, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + })); + map.put(64, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(68, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_DOT, + })); + map.put(67, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_FQN, + })); + map.put(61, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_OUTPUT, + })); + map.put(69, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + })); + map.put(71, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WHILE, + })); + map.put(40, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + map.put(5, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_TYPE_E, + })); + map.put(4, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_TASK, + })); + map.put(3, Arrays.asList(new TerminalIdentifier[] { + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + })); + rule_first = Collections.unmodifiableMap(map); + } + static { + Map> map = new HashMap>(); + map.put(106, new ArrayList()); + map.put(87, new ArrayList()); + map.put(108, new ArrayList()); + map.put(71, new ArrayList()); + map.put(70, new ArrayList()); + map.put(115, new ArrayList()); + map.put(88, new ArrayList()); + map.put(113, new ArrayList()); map.put(92, new ArrayList()); - map.put(93, new ArrayList()); - map.put(94, new ArrayList()); - map.put(95, new ArrayList()); + map.put(67, new ArrayList()); map.put(96, new ArrayList()); - map.put(97, new ArrayList()); - map.put(98, new ArrayList()); - map.put(99, new ArrayList()); - map.put(100, new ArrayList()); - map.put(101, new ArrayList()); - map.put(102, new ArrayList()); - map.put(103, new ArrayList()); + map.put(110, new ArrayList()); + map.put(83, new ArrayList()); map.put(104, new ArrayList()); + map.put(64, new ArrayList()); + map.put(89, new ArrayList()); + map.put(112, new ArrayList()); map.put(105, new ArrayList()); - map.put(106, new ArrayList()); + map.put(65, new ArrayList()); + map.put(102, new ArrayList()); + map.put(98, new ArrayList()); + map.put(79, new ArrayList()); + map.put(116, new ArrayList()); + map.put(74, new ArrayList()); + map.put(78, new ArrayList()); + map.put(56, new ArrayList()); + map.put(103, new ArrayList()); + map.put(61, new ArrayList()); + map.put(91, new ArrayList()); + map.put(77, new ArrayList()); + map.put(100, new ArrayList()); + map.put(97, new ArrayList()); + map.put(81, new ArrayList()); + map.put(95, new ArrayList()); + map.put(68, new ArrayList()); map.put(107, new ArrayList()); - map.put(108, new ArrayList()); - map.put(109, new ArrayList()); - map.put(110, new ArrayList()); - map.put(111, new ArrayList()); - map.put(112, new ArrayList()); - map.put(113, new ArrayList()); + map.put(75, new ArrayList()); + map.put(82, new ArrayList()); + map.put(63, new ArrayList()); + map.put(85, new ArrayList()); map.put(114, new ArrayList()); - map.put(115, new ArrayList()); - map.put(116, new ArrayList()); - map.put(117, new ArrayList()); - map.put(118, new ArrayList()); - map.put(119, new ArrayList()); - map.put(120, new ArrayList()); - map.put(121, new ArrayList()); - map.put(122, new ArrayList()); - map.put(123, new ArrayList()); - map.put(124, new ArrayList()); - map.put(125, new ArrayList()); - map.put(126, new ArrayList()); - map.put(127, new ArrayList()); - map.put(128, new ArrayList()); - map.put(129, new ArrayList()); - map.put(130, new ArrayList()); - map.get(95).add("$_gen0 = $import $_gen1"); - map.get(118).add("$_gen1 = $import $_gen1"); - map.get(118).add("$_gen1 = :_empty"); - map.get(95).add("$_gen0 = :_empty"); - map.get(112).add("$_gen2 = $workflow_or_task $_gen3"); - map.get(58).add("$_gen3 = $workflow_or_task $_gen3"); - map.get(58).add("$_gen3 = :_empty"); - map.get(112).add("$_gen2 = :_empty"); - map.get(107).add("$document = $_gen0 $_gen2 -> Document( imports=$0, definitions=$1 )"); - map.get(93).add("$workflow_or_task = $workflow"); - map.get(93).add("$workflow_or_task = $task"); - map.get(121).add("$_gen4 = $import_namespace"); - map.get(121).add("$_gen4 = :_empty"); - map.get(59).add("$import = :import :string $_gen4 -> Import( uri=$1, namespace=$2 )"); - map.get(96).add("$import_namespace = :as :identifier -> $1"); - map.get(64).add("$_gen5 = $declaration $_gen6"); - map.get(66).add("$_gen6 = $declaration $_gen6"); - map.get(66).add("$_gen6 = :_empty"); - map.get(64).add("$_gen5 = :_empty"); - map.get(89).add("$_gen7 = $sections $_gen8"); - map.get(127).add("$_gen8 = $sections $_gen8"); - map.get(127).add("$_gen8 = :_empty"); - map.get(89).add("$_gen7 = :_empty"); - map.get(83).add("$task = :task :identifier :lbrace $_gen5 $_gen7 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )"); - map.get(110).add("$sections = $command"); - map.get(110).add("$sections = $outputs"); - map.get(110).add("$sections = $runtime"); - map.get(110).add("$sections = $parameter_meta"); - map.get(110).add("$sections = $meta"); - map.get(87).add("$_gen9 = $command_part $_gen10"); - map.get(113).add("$_gen10 = $command_part $_gen10"); - map.get(113).add("$_gen10 = :_empty"); - map.get(87).add("$_gen9 = :_empty"); - map.get(77).add("$command = :raw_command :raw_cmd_start $_gen9 :raw_cmd_end -> RawCommand( parts=$2 )"); - map.get(75).add("$command_part = :cmd_part"); - map.get(75).add("$command_part = $cmd_param"); - map.get(100).add("$_gen11 = $cmd_param_kv $_gen12"); - map.get(63).add("$_gen12 = $cmd_param_kv $_gen12"); - map.get(63).add("$_gen12 = :_empty"); - map.get(100).add("$_gen11 = :_empty"); - map.get(91).add("$cmd_param = :cmd_param_start $_gen11 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )"); - map.get(65).add("$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )"); - map.get(81).add("$_gen13 = $output_kv $_gen14"); - map.get(99).add("$_gen14 = $output_kv $_gen14"); - map.get(99).add("$_gen14 = :_empty"); - map.get(81).add("$_gen13 = :_empty"); - map.get(80).add("$outputs = :output :lbrace $_gen13 :rbrace -> Outputs( attributes=$2 )"); - map.get(76).add("$output_kv = $type_e :identifier :equal $e -> Output( type=$0, var=$1, expression=$3 )"); - map.get(119).add("$runtime = :runtime $map -> Runtime( map=$1 )"); - map.get(88).add("$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); - map.get(124).add("$meta = :meta $map -> Meta( map=$1 )"); - map.get(67).add("$_gen15 = $kv $_gen16"); - map.get(123).add("$_gen16 = $kv $_gen16"); - map.get(123).add("$_gen16 = :_empty"); - map.get(67).add("$_gen15 = :_empty"); - map.get(98).add("$map = :lbrace $_gen15 :rbrace -> $1"); - map.get(108).add("$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )"); - map.get(97).add("$_gen17 = $postfix_quantifier"); - map.get(97).add("$_gen17 = :_empty"); - map.get(60).add("$_gen18 = $setter"); - map.get(60).add("$_gen18 = :_empty"); - map.get(114).add("$declaration = $type_e $_gen17 :identifier $_gen18 -> Declaration( type=$0, postfix=$1, name=$2, expression=$3 )"); - map.get(101).add("$setter = :equal $e -> $1"); - map.get(82).add("$postfix_quantifier = :qmark"); - map.get(82).add("$postfix_quantifier = :plus"); - map.get(109).add("$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )"); - map.get(115).add("$_gen19 = $wf_body_element $_gen20"); - map.get(84).add("$_gen20 = $wf_body_element $_gen20"); - map.get(84).add("$_gen20 = :_empty"); - map.get(115).add("$_gen19 = :_empty"); - map.get(125).add("$workflow = :workflow :identifier :lbrace $_gen19 :rbrace -> Workflow( name=$1, body=$3 )"); - map.get(126).add("$wf_body_element = $call"); - map.get(126).add("$wf_body_element = $declaration"); - map.get(126).add("$wf_body_element = $while_loop"); - map.get(126).add("$wf_body_element = $if_stmt"); - map.get(126).add("$wf_body_element = $scatter"); - map.get(126).add("$wf_body_element = $wf_outputs"); - map.get(128).add("$_gen21 = $alias"); - map.get(128).add("$_gen21 = :_empty"); - map.get(72).add("$_gen22 = $call_body"); - map.get(72).add("$_gen22 = :_empty"); - map.get(70).add("$call = :call :fqn $_gen21 $_gen22 -> Call( task=$1, alias=$2, body=$3 )"); - map.get(61).add("$_gen23 = $call_input $_gen24"); - map.get(86).add("$_gen24 = $call_input $_gen24"); - map.get(86).add("$_gen24 = :_empty"); - map.get(61).add("$_gen23 = :_empty"); - map.get(57).add("$call_body = :lbrace $_gen5 $_gen23 :rbrace -> CallBody( declarations=$1, io=$2 )"); - map.get(71).add("$_gen25 = $mapping $_gen26"); - map.get(68).add("$_gen26 = :comma $mapping $_gen26"); - map.get(68).add("$_gen26 = :_empty"); - map.get(71).add("$_gen25 = :_empty"); - map.get(106).add("$call_input = :input :colon $_gen25 -> Inputs( map=$2 )"); - map.get(102).add("$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )"); - map.get(85).add("$alias = :as :identifier -> $1"); - map.get(129).add("$_gen27 = $wf_output $_gen28"); - map.get(62).add("$_gen28 = :comma $wf_output $_gen28"); - map.get(62).add("$_gen28 = :_empty"); - map.get(129).add("$_gen27 = :_empty"); - map.get(116).add("$wf_outputs = :output :lbrace $_gen27 :rbrace -> WorkflowOutputs( outputs=$2 )"); - map.get(103).add("$_gen29 = $wf_output_wildcard"); - map.get(103).add("$_gen29 = :_empty"); - map.get(94).add("$wf_output = :fqn $_gen29 -> WorkflowOutput( fqn=$0, wildcard=$1 )"); - map.get(117).add("$wf_output_wildcard = :dot :asterisk -> $1"); - map.get(92).add("$while_loop = :while :lparen $e :rparen :lbrace $_gen19 :rbrace -> WhileLoop( expression=$2, body=$5 )"); - map.get(78).add("$if_stmt = :if :lparen $e :rparen :lbrace $_gen19 :rbrace -> If( expression=$2, body=$5 )"); - map.get(73).add("$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen19 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )"); - map.get(120).add("$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )"); - map.get(111).add("$_gen30 = $type_e $_gen31"); - map.get(130).add("$_gen31 = :comma $type_e $_gen31"); - map.get(130).add("$_gen31 = :_empty"); - map.get(111).add("$_gen30 = :_empty"); - map.get(122).add("$type_e = :type <=> :lsquare $_gen30 :rsquare -> Type( name=$0, subtype=$2 )"); - map.get(122).add("$type_e = :type"); - map.get(74).add("$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = :not $e -> LogicalNot( expression=$1 )"); - map.get(74).add("$e = :plus $e -> UnaryPlus( expression=$1 )"); - map.get(74).add("$e = :dash $e -> UnaryNegation( expression=$1 )"); - map.get(105).add("$_gen32 = $e $_gen33"); - map.get(79).add("$_gen33 = :comma $e $_gen33"); - map.get(79).add("$_gen33 = :_empty"); - map.get(105).add("$_gen32 = :_empty"); - map.get(74).add("$e = :identifier <=> :lparen $_gen32 :rparen -> FunctionCall( name=$0, params=$2 )"); - map.get(74).add("$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )"); - map.get(74).add("$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )"); - map.get(104).add("$_gen34 = $object_kv $_gen35"); - map.get(69).add("$_gen35 = :comma $object_kv $_gen35"); - map.get(69).add("$_gen35 = :_empty"); - map.get(104).add("$_gen34 = :_empty"); - map.get(74).add("$e = :object :lbrace $_gen34 :rbrace -> ObjectLiteral( map=$2 )"); - map.get(74).add("$e = :lsquare $_gen32 :rsquare -> ArrayLiteral( values=$1 )"); - map.get(56).add("$_gen36 = $map_kv $_gen37"); - map.get(90).add("$_gen37 = :comma $map_kv $_gen37"); - map.get(90).add("$_gen37 = :_empty"); - map.get(56).add("$_gen36 = :_empty"); - map.get(74).add("$e = :lbrace $_gen36 :rbrace -> MapLiteral( map=$1 )"); - map.get(74).add("$e = :lparen $e :rparen -> $1"); - map.get(74).add("$e = :string"); - map.get(74).add("$e = :identifier"); - map.get(74).add("$e = :boolean"); - map.get(74).add("$e = :integer"); - map.get(74).add("$e = :float"); + map.put(72, new ArrayList()); + map.put(93, new ArrayList()); + map.put(57, new ArrayList()); + map.put(94, new ArrayList()); + map.put(76, new ArrayList()); + map.put(101, new ArrayList()); + map.put(86, new ArrayList()); + map.put(62, new ArrayList()); + map.put(73, new ArrayList()); + map.put(80, new ArrayList()); + map.put(69, new ArrayList()); + map.put(111, new ArrayList()); + map.put(66, new ArrayList()); + map.put(109, new ArrayList()); + map.put(90, new ArrayList()); + map.put(60, new ArrayList()); + map.put(99, new ArrayList()); + map.put(58, new ArrayList()); + map.put(84, new ArrayList()); + map.put(59, new ArrayList()); + map.get(106).add("$_gen0 = list($import)"); + map.get(87).add("$_gen1 = list($workflow_or_task_or_decl)"); + map.get(108).add("$_gen10 = list($wf_body_element)"); + map.get(71).add("$_gen11 = $alias"); + map.get(71).add("$_gen11 = :_empty"); + map.get(70).add("$_gen12 = $call_body"); + map.get(70).add("$_gen12 = :_empty"); + map.get(115).add("$_gen13 = list($call_input)"); + map.get(88).add("$_gen14 = list($mapping, :comma)"); + map.get(113).add("$_gen15 = list($wf_output)"); + map.get(92).add("$_gen16 = $wf_output_wildcard"); + map.get(92).add("$_gen16 = :_empty"); + map.get(67).add("$_gen17 = list($type_e, :comma)"); + map.get(96).add("$_gen18 = list($e, :comma)"); + map.get(110).add("$_gen19 = list($object_kv, :comma)"); + map.get(83).add("$_gen2 = $import_namespace"); + map.get(83).add("$_gen2 = :_empty"); + map.get(104).add("$_gen20 = list($map_kv, :comma)"); + map.get(64).add("$_gen3 = list($declaration)"); + map.get(89).add("$_gen4 = list($sections)"); + map.get(112).add("$_gen5 = list($command_part)"); + map.get(105).add("$_gen6 = list($cmd_param_kv)"); + map.get(65).add("$_gen7 = list($output_kv)"); + map.get(102).add("$_gen8 = list($kv)"); + map.get(98).add("$_gen9 = $setter"); + map.get(98).add("$_gen9 = :_empty"); + map.get(79).add("$alias = :as :identifier -> $1"); + map.get(116).add("$call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 )"); + map.get(74).add("$call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 )"); + map.get(78).add("$call_input = :input :colon $_gen14 -> Inputs( map=$2 )"); + map.get(56).add("$cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )"); + map.get(103).add("$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )"); + map.get(61).add("$command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 )"); + map.get(91).add("$command_part = $cmd_param"); + map.get(91).add("$command_part = :cmd_part"); + map.get(77).add("$declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 )"); + map.get(100).add("$document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 )"); + map.get(97).add("$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = :boolean"); + map.get(97).add("$e = :dash $e -> UnaryNegation( expression=$1 )"); + map.get(97).add("$e = :float"); + map.get(97).add("$e = :identifier"); + map.get(97).add("$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )"); + map.get(97).add("$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )"); + map.get(97).add("$e = :integer"); + map.get(97).add("$e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 )"); + map.get(97).add("$e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 )"); + map.get(97).add("$e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 )"); + map.get(97).add("$e = :not $e -> LogicalNot( expression=$1 )"); + map.get(97).add("$e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 )"); + map.get(97).add("$e = :plus $e -> UnaryPlus( expression=$1 )"); + map.get(97).add("$e = :string"); + map.get(81).add("$if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 )"); + map.get(95).add("$import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 )"); + map.get(68).add("$import_namespace = :as :identifier -> $1"); + map.get(107).add("$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )"); + map.get(75).add("$map = :lbrace $_gen8 :rbrace -> $1"); + map.get(82).add("$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )"); + map.get(63).add("$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )"); + map.get(85).add("$meta = :meta $map -> Meta( map=$1 )"); + map.get(114).add("$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )"); + map.get(72).add("$output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 )"); + map.get(93).add("$outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 )"); + map.get(57).add("$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); + map.get(94).add("$runtime = :runtime $map -> Runtime( map=$1 )"); + map.get(76).add("$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )"); + map.get(101).add("$sections = $command"); + map.get(101).add("$sections = $meta"); + map.get(101).add("$sections = $outputs"); + map.get(101).add("$sections = $parameter_meta"); + map.get(101).add("$sections = $runtime"); + map.get(86).add("$setter = :equal $e -> $1"); + map.get(62).add("$task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )"); + map.get(73).add("$type_e = :type"); + map.get(73).add("$type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 )"); + map.get(73).add("$type_e = :type <=> :plus -> NonEmptyType( innerType=$0 )"); + map.get(73).add("$type_e = :type <=> :qmark -> OptionalType( innerType=$0 )"); + map.get(80).add("$wf_body_element = $call"); + map.get(80).add("$wf_body_element = $declaration"); + map.get(80).add("$wf_body_element = $if_stmt"); + map.get(80).add("$wf_body_element = $scatter"); + map.get(80).add("$wf_body_element = $wf_meta"); + map.get(80).add("$wf_body_element = $wf_outputs"); + map.get(80).add("$wf_body_element = $wf_parameter_meta"); + map.get(80).add("$wf_body_element = $while_loop"); + map.get(69).add("$wf_meta = :meta $map -> Meta( map=$1 )"); + map.get(111).add("$wf_output = $wf_output_declaration_syntax"); + map.get(111).add("$wf_output = $wf_output_wildcard_syntax"); + map.get(66).add("$wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 )"); + map.get(109).add("$wf_output_wildcard = :dot :asterisk -> $1"); + map.get(90).add("$wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 )"); + map.get(60).add("$wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 )"); + map.get(99).add("$wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); + map.get(58).add("$while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 )"); + map.get(84).add("$workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 )"); + map.get(59).add("$workflow_or_task_or_decl = $declaration"); + map.get(59).add("$workflow_or_task_or_decl = $task"); + map.get(59).add("$workflow_or_task_or_decl = $workflow"); nonterminal_rules = Collections.unmodifiableMap(map); } static { Map map = new HashMap(); - map.put(new Integer(0), "$_gen0 = $import $_gen1"); - map.put(new Integer(1), "$_gen1 = $import $_gen1"); - map.put(new Integer(2), "$_gen1 = :_empty"); - map.put(new Integer(3), "$_gen0 = :_empty"); - map.put(new Integer(4), "$_gen2 = $workflow_or_task $_gen3"); - map.put(new Integer(5), "$_gen3 = $workflow_or_task $_gen3"); - map.put(new Integer(6), "$_gen3 = :_empty"); + map.put(new Integer(0), "$_gen0 = list($import)"); + map.put(new Integer(1), "$_gen1 = list($workflow_or_task_or_decl)"); + map.put(new Integer(39), "$_gen10 = list($wf_body_element)"); + map.put(new Integer(49), "$_gen11 = $alias"); + map.put(new Integer(50), "$_gen11 = :_empty"); + map.put(new Integer(51), "$_gen12 = $call_body"); + map.put(new Integer(52), "$_gen12 = :_empty"); + map.put(new Integer(54), "$_gen13 = list($call_input)"); + map.put(new Integer(56), "$_gen14 = list($mapping, :comma)"); + map.put(new Integer(60), "$_gen15 = list($wf_output)"); + map.put(new Integer(65), "$_gen16 = $wf_output_wildcard"); + map.put(new Integer(66), "$_gen16 = :_empty"); + map.put(new Integer(75), "$_gen17 = list($type_e, :comma)"); + map.put(new Integer(96), "$_gen18 = list($e, :comma)"); + map.put(new Integer(100), "$_gen19 = list($object_kv, :comma)"); + map.put(new Integer(6), "$_gen2 = $import_namespace"); map.put(new Integer(7), "$_gen2 = :_empty"); - map.put(new Integer(8), "$document = $_gen0 $_gen2 -> Document( imports=$0, definitions=$1 )"); - map.put(new Integer(9), "$workflow_or_task = $workflow"); - map.put(new Integer(10), "$workflow_or_task = $task"); - map.put(new Integer(11), "$_gen4 = $import_namespace"); - map.put(new Integer(12), "$_gen4 = :_empty"); - map.put(new Integer(13), "$import = :import :string $_gen4 -> Import( uri=$1, namespace=$2 )"); - map.put(new Integer(14), "$import_namespace = :as :identifier -> $1"); - map.put(new Integer(15), "$_gen5 = $declaration $_gen6"); - map.put(new Integer(16), "$_gen6 = $declaration $_gen6"); - map.put(new Integer(17), "$_gen6 = :_empty"); - map.put(new Integer(18), "$_gen5 = :_empty"); - map.put(new Integer(19), "$_gen7 = $sections $_gen8"); - map.put(new Integer(20), "$_gen8 = $sections $_gen8"); - map.put(new Integer(21), "$_gen8 = :_empty"); - map.put(new Integer(22), "$_gen7 = :_empty"); - map.put(new Integer(23), "$task = :task :identifier :lbrace $_gen5 $_gen7 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )"); - map.put(new Integer(24), "$sections = $command"); - map.put(new Integer(25), "$sections = $outputs"); - map.put(new Integer(26), "$sections = $runtime"); - map.put(new Integer(27), "$sections = $parameter_meta"); - map.put(new Integer(28), "$sections = $meta"); - map.put(new Integer(29), "$_gen9 = $command_part $_gen10"); - map.put(new Integer(30), "$_gen10 = $command_part $_gen10"); - map.put(new Integer(31), "$_gen10 = :_empty"); - map.put(new Integer(32), "$_gen9 = :_empty"); - map.put(new Integer(33), "$command = :raw_command :raw_cmd_start $_gen9 :raw_cmd_end -> RawCommand( parts=$2 )"); - map.put(new Integer(34), "$command_part = :cmd_part"); - map.put(new Integer(35), "$command_part = $cmd_param"); - map.put(new Integer(36), "$_gen11 = $cmd_param_kv $_gen12"); - map.put(new Integer(37), "$_gen12 = $cmd_param_kv $_gen12"); - map.put(new Integer(38), "$_gen12 = :_empty"); - map.put(new Integer(39), "$_gen11 = :_empty"); - map.put(new Integer(40), "$cmd_param = :cmd_param_start $_gen11 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )"); - map.put(new Integer(41), "$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )"); - map.put(new Integer(42), "$_gen13 = $output_kv $_gen14"); - map.put(new Integer(43), "$_gen14 = $output_kv $_gen14"); - map.put(new Integer(44), "$_gen14 = :_empty"); - map.put(new Integer(45), "$_gen13 = :_empty"); - map.put(new Integer(46), "$outputs = :output :lbrace $_gen13 :rbrace -> Outputs( attributes=$2 )"); - map.put(new Integer(47), "$output_kv = $type_e :identifier :equal $e -> Output( type=$0, var=$1, expression=$3 )"); - map.put(new Integer(48), "$runtime = :runtime $map -> Runtime( map=$1 )"); - map.put(new Integer(49), "$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); - map.put(new Integer(50), "$meta = :meta $map -> Meta( map=$1 )"); - map.put(new Integer(51), "$_gen15 = $kv $_gen16"); - map.put(new Integer(52), "$_gen16 = $kv $_gen16"); - map.put(new Integer(53), "$_gen16 = :_empty"); - map.put(new Integer(54), "$_gen15 = :_empty"); - map.put(new Integer(55), "$map = :lbrace $_gen15 :rbrace -> $1"); - map.put(new Integer(56), "$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )"); - map.put(new Integer(57), "$_gen17 = $postfix_quantifier"); - map.put(new Integer(58), "$_gen17 = :_empty"); - map.put(new Integer(59), "$_gen18 = $setter"); - map.put(new Integer(60), "$_gen18 = :_empty"); - map.put(new Integer(61), "$declaration = $type_e $_gen17 :identifier $_gen18 -> Declaration( type=$0, postfix=$1, name=$2, expression=$3 )"); - map.put(new Integer(62), "$setter = :equal $e -> $1"); - map.put(new Integer(63), "$postfix_quantifier = :qmark"); - map.put(new Integer(64), "$postfix_quantifier = :plus"); - map.put(new Integer(65), "$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )"); - map.put(new Integer(66), "$_gen19 = $wf_body_element $_gen20"); - map.put(new Integer(67), "$_gen20 = $wf_body_element $_gen20"); - map.put(new Integer(68), "$_gen20 = :_empty"); - map.put(new Integer(69), "$_gen19 = :_empty"); - map.put(new Integer(70), "$workflow = :workflow :identifier :lbrace $_gen19 :rbrace -> Workflow( name=$1, body=$3 )"); - map.put(new Integer(71), "$wf_body_element = $call"); - map.put(new Integer(72), "$wf_body_element = $declaration"); - map.put(new Integer(73), "$wf_body_element = $while_loop"); - map.put(new Integer(74), "$wf_body_element = $if_stmt"); - map.put(new Integer(75), "$wf_body_element = $scatter"); - map.put(new Integer(76), "$wf_body_element = $wf_outputs"); - map.put(new Integer(77), "$_gen21 = $alias"); - map.put(new Integer(78), "$_gen21 = :_empty"); - map.put(new Integer(79), "$_gen22 = $call_body"); - map.put(new Integer(80), "$_gen22 = :_empty"); - map.put(new Integer(81), "$call = :call :fqn $_gen21 $_gen22 -> Call( task=$1, alias=$2, body=$3 )"); - map.put(new Integer(82), "$_gen23 = $call_input $_gen24"); - map.put(new Integer(83), "$_gen24 = $call_input $_gen24"); - map.put(new Integer(84), "$_gen24 = :_empty"); - map.put(new Integer(85), "$_gen23 = :_empty"); - map.put(new Integer(86), "$call_body = :lbrace $_gen5 $_gen23 :rbrace -> CallBody( declarations=$1, io=$2 )"); - map.put(new Integer(87), "$_gen25 = $mapping $_gen26"); - map.put(new Integer(88), "$_gen26 = :comma $mapping $_gen26"); - map.put(new Integer(89), "$_gen26 = :_empty"); - map.put(new Integer(90), "$_gen25 = :_empty"); - map.put(new Integer(91), "$call_input = :input :colon $_gen25 -> Inputs( map=$2 )"); - map.put(new Integer(92), "$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )"); - map.put(new Integer(93), "$alias = :as :identifier -> $1"); - map.put(new Integer(94), "$_gen27 = $wf_output $_gen28"); - map.put(new Integer(95), "$_gen28 = :comma $wf_output $_gen28"); - map.put(new Integer(96), "$_gen28 = :_empty"); - map.put(new Integer(97), "$_gen27 = :_empty"); - map.put(new Integer(98), "$wf_outputs = :output :lbrace $_gen27 :rbrace -> WorkflowOutputs( outputs=$2 )"); - map.put(new Integer(99), "$_gen29 = $wf_output_wildcard"); - map.put(new Integer(100), "$_gen29 = :_empty"); - map.put(new Integer(101), "$wf_output = :fqn $_gen29 -> WorkflowOutput( fqn=$0, wildcard=$1 )"); - map.put(new Integer(102), "$wf_output_wildcard = :dot :asterisk -> $1"); - map.put(new Integer(103), "$while_loop = :while :lparen $e :rparen :lbrace $_gen19 :rbrace -> WhileLoop( expression=$2, body=$5 )"); - map.put(new Integer(104), "$if_stmt = :if :lparen $e :rparen :lbrace $_gen19 :rbrace -> If( expression=$2, body=$5 )"); - map.put(new Integer(105), "$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen19 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )"); - map.put(new Integer(106), "$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )"); - map.put(new Integer(107), "$_gen30 = $type_e $_gen31"); - map.put(new Integer(108), "$_gen31 = :comma $type_e $_gen31"); - map.put(new Integer(109), "$_gen31 = :_empty"); - map.put(new Integer(110), "$_gen30 = :_empty"); - map.put(new Integer(111), "$type_e = :type <=> :lsquare $_gen30 :rsquare -> Type( name=$0, subtype=$2 )"); - map.put(new Integer(112), "$type_e = :type"); - map.put(new Integer(113), "$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )"); - map.put(new Integer(114), "$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )"); - map.put(new Integer(115), "$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )"); - map.put(new Integer(116), "$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )"); - map.put(new Integer(117), "$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )"); - map.put(new Integer(118), "$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )"); - map.put(new Integer(119), "$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )"); - map.put(new Integer(120), "$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )"); - map.put(new Integer(121), "$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )"); - map.put(new Integer(122), "$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )"); - map.put(new Integer(123), "$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )"); - map.put(new Integer(124), "$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )"); - map.put(new Integer(125), "$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )"); - map.put(new Integer(126), "$e = :not $e -> LogicalNot( expression=$1 )"); - map.put(new Integer(127), "$e = :plus $e -> UnaryPlus( expression=$1 )"); - map.put(new Integer(128), "$e = :dash $e -> UnaryNegation( expression=$1 )"); - map.put(new Integer(129), "$_gen32 = $e $_gen33"); - map.put(new Integer(130), "$_gen33 = :comma $e $_gen33"); - map.put(new Integer(131), "$_gen33 = :_empty"); - map.put(new Integer(132), "$_gen32 = :_empty"); - map.put(new Integer(133), "$e = :identifier <=> :lparen $_gen32 :rparen -> FunctionCall( name=$0, params=$2 )"); - map.put(new Integer(134), "$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )"); - map.put(new Integer(135), "$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )"); - map.put(new Integer(136), "$_gen34 = $object_kv $_gen35"); - map.put(new Integer(137), "$_gen35 = :comma $object_kv $_gen35"); - map.put(new Integer(138), "$_gen35 = :_empty"); - map.put(new Integer(139), "$_gen34 = :_empty"); - map.put(new Integer(140), "$e = :object :lbrace $_gen34 :rbrace -> ObjectLiteral( map=$2 )"); - map.put(new Integer(141), "$e = :lsquare $_gen32 :rsquare -> ArrayLiteral( values=$1 )"); - map.put(new Integer(142), "$_gen36 = $map_kv $_gen37"); - map.put(new Integer(143), "$_gen37 = :comma $map_kv $_gen37"); - map.put(new Integer(144), "$_gen37 = :_empty"); - map.put(new Integer(145), "$_gen36 = :_empty"); - map.put(new Integer(146), "$e = :lbrace $_gen36 :rbrace -> MapLiteral( map=$1 )"); - map.put(new Integer(147), "$e = :lparen $e :rparen -> $1"); - map.put(new Integer(148), "$e = :string"); - map.put(new Integer(149), "$e = :identifier"); - map.put(new Integer(150), "$e = :boolean"); - map.put(new Integer(151), "$e = :integer"); - map.put(new Integer(152), "$e = :float"); + map.put(new Integer(103), "$_gen20 = list($map_kv, :comma)"); + map.put(new Integer(10), "$_gen3 = list($declaration)"); + map.put(new Integer(11), "$_gen4 = list($sections)"); + map.put(new Integer(18), "$_gen5 = list($command_part)"); + map.put(new Integer(22), "$_gen6 = list($cmd_param_kv)"); + map.put(new Integer(25), "$_gen7 = list($output_kv)"); + map.put(new Integer(31), "$_gen8 = list($kv)"); + map.put(new Integer(34), "$_gen9 = $setter"); + map.put(new Integer(35), "$_gen9 = :_empty"); + map.put(new Integer(59), "$alias = :as :identifier -> $1"); + map.put(new Integer(53), "$call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 )"); + map.put(new Integer(55), "$call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 )"); + map.put(new Integer(57), "$call_input = :input :colon $_gen14 -> Inputs( map=$2 )"); + map.put(new Integer(23), "$cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )"); + map.put(new Integer(24), "$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )"); + map.put(new Integer(19), "$command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 )"); + map.put(new Integer(21), "$command_part = $cmd_param"); + map.put(new Integer(20), "$command_part = :cmd_part"); + map.put(new Integer(36), "$declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 )"); + map.put(new Integer(2), "$document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 )"); + map.put(new Integer(90), "$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )"); + map.put(new Integer(89), "$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )"); + map.put(new Integer(81), "$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )"); + map.put(new Integer(82), "$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )"); + map.put(new Integer(80), "$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )"); + map.put(new Integer(86), "$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )"); + map.put(new Integer(87), "$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )"); + map.put(new Integer(84), "$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )"); + map.put(new Integer(85), "$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )"); + map.put(new Integer(83), "$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )"); + map.put(new Integer(92), "$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )"); + map.put(new Integer(88), "$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )"); + map.put(new Integer(91), "$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )"); + map.put(new Integer(108), "$e = :boolean"); + map.put(new Integer(95), "$e = :dash $e -> UnaryNegation( expression=$1 )"); + map.put(new Integer(110), "$e = :float"); + map.put(new Integer(107), "$e = :identifier"); + map.put(new Integer(99), "$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )"); + map.put(new Integer(97), "$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )"); + map.put(new Integer(98), "$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )"); + map.put(new Integer(109), "$e = :integer"); + map.put(new Integer(104), "$e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 )"); + map.put(new Integer(105), "$e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 )"); + map.put(new Integer(102), "$e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 )"); + map.put(new Integer(93), "$e = :not $e -> LogicalNot( expression=$1 )"); + map.put(new Integer(101), "$e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 )"); + map.put(new Integer(94), "$e = :plus $e -> UnaryPlus( expression=$1 )"); + map.put(new Integer(106), "$e = :string"); + map.put(new Integer(72), "$if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 )"); + map.put(new Integer(8), "$import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 )"); + map.put(new Integer(9), "$import_namespace = :as :identifier -> $1"); + map.put(new Integer(33), "$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )"); + map.put(new Integer(32), "$map = :lbrace $_gen8 :rbrace -> $1"); + map.put(new Integer(38), "$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )"); + map.put(new Integer(58), "$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )"); + map.put(new Integer(30), "$meta = :meta $map -> Meta( map=$1 )"); + map.put(new Integer(74), "$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )"); + map.put(new Integer(27), "$output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 )"); + map.put(new Integer(26), "$outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 )"); + map.put(new Integer(29), "$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); + map.put(new Integer(28), "$runtime = :runtime $map -> Runtime( map=$1 )"); + map.put(new Integer(73), "$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )"); + map.put(new Integer(13), "$sections = $command"); + map.put(new Integer(17), "$sections = $meta"); + map.put(new Integer(14), "$sections = $outputs"); + map.put(new Integer(16), "$sections = $parameter_meta"); + map.put(new Integer(15), "$sections = $runtime"); + map.put(new Integer(37), "$setter = :equal $e -> $1"); + map.put(new Integer(12), "$task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )"); + map.put(new Integer(79), "$type_e = :type"); + map.put(new Integer(76), "$type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 )"); + map.put(new Integer(78), "$type_e = :type <=> :plus -> NonEmptyType( innerType=$0 )"); + map.put(new Integer(77), "$type_e = :type <=> :qmark -> OptionalType( innerType=$0 )"); + map.put(new Integer(41), "$wf_body_element = $call"); + map.put(new Integer(42), "$wf_body_element = $declaration"); + map.put(new Integer(44), "$wf_body_element = $if_stmt"); + map.put(new Integer(45), "$wf_body_element = $scatter"); + map.put(new Integer(48), "$wf_body_element = $wf_meta"); + map.put(new Integer(46), "$wf_body_element = $wf_outputs"); + map.put(new Integer(47), "$wf_body_element = $wf_parameter_meta"); + map.put(new Integer(43), "$wf_body_element = $while_loop"); + map.put(new Integer(70), "$wf_meta = :meta $map -> Meta( map=$1 )"); + map.put(new Integer(62), "$wf_output = $wf_output_declaration_syntax"); + map.put(new Integer(63), "$wf_output = $wf_output_wildcard_syntax"); + map.put(new Integer(64), "$wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 )"); + map.put(new Integer(68), "$wf_output_wildcard = :dot :asterisk -> $1"); + map.put(new Integer(67), "$wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 )"); + map.put(new Integer(61), "$wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 )"); + map.put(new Integer(69), "$wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )"); + map.put(new Integer(71), "$while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 )"); + map.put(new Integer(40), "$workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 )"); + map.put(new Integer(5), "$workflow_or_task_or_decl = $declaration"); + map.put(new Integer(4), "$workflow_or_task_or_decl = $task"); + map.put(new Integer(3), "$workflow_or_task_or_decl = $workflow"); rules = Collections.unmodifiableMap(map); } public static boolean is_terminal(int id) { @@ -2535,29 +2308,29 @@ private static Terminal expect(ParserContext ctx, TerminalIdentifier expecting) private static Map prefix_binding_power_e; static { Map map = new HashMap(); - map.put(34, 2000); /* $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) */ - map.put(36, 3000); /* $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) */ - map.put(48, 4000); /* $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) */ - map.put(21, 4000); /* $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) */ - map.put(9, 5000); /* $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) */ - map.put(47, 5000); /* $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) */ - map.put(44, 5000); /* $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) */ - map.put(10, 5000); /* $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) */ - map.put(35, 6000); /* $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) */ - map.put(0, 6000); /* $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) */ - map.put(51, 7000); /* $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) */ - map.put(37, 7000); /* $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) */ - map.put(49, 7000); /* $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) */ - map.put(32, 9000); /* $e = :identifier <=> :lparen list(nt=$e, sep=:comma, min=0, sep_terminates=False) :rparen -> FunctionCall( name=$0, params=$2 ) */ - map.put(14, 10000); /* $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ - map.put(26, 11000); /* $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ + map.put(6, 4000); /* $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) */ + map.put(14, 5000); /* $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) */ + map.put(23, 6000); /* $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) */ + map.put(3, 6000); /* $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) */ + map.put(30, 7000); /* $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) */ + map.put(7, 7000); /* $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) */ + map.put(25, 7000); /* $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) */ + map.put(37, 7000); /* $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) */ + map.put(26, 8000); /* $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) */ + map.put(24, 8000); /* $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) */ + map.put(46, 9000); /* $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) */ + map.put(15, 9000); /* $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) */ + map.put(4, 9000); /* $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) */ + map.put(53, 11000); /* $e = :identifier <=> :lparen list($e, :comma) :rparen -> FunctionCall( name=$0, params=$2 ) */ + map.put(29, 12000); /* $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ + map.put(51, 13000); /* $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ infix_binding_power_e = Collections.unmodifiableMap(map); } static { Map map = new HashMap(); - map.put(15, 8000); /* $e = :not $e -> LogicalNot( expression=$1 ) */ - map.put(35, 8000); /* $e = :plus $e -> UnaryPlus( expression=$1 ) */ - map.put(0, 8000); /* $e = :dash $e -> UnaryNegation( expression=$1 ) */ + map.put(5, 10000); /* $e = :not $e -> LogicalNot( expression=$1 ) */ + map.put(26, 10000); /* $e = :plus $e -> UnaryPlus( expression=$1 ) */ + map.put(24, 10000); /* $e = :dash $e -> UnaryNegation( expression=$1 ) */ prefix_binding_power_e = Collections.unmodifiableMap(map); } static int get_infix_binding_power_e(int terminal_id) { @@ -2594,140 +2367,142 @@ public static ParseTree parse_e_internal(ParserContext ctx, int rbp) throws Synt return left; } private static ParseTree nud_e(ParserContext ctx) throws SyntaxError { - ParseTree tree = new ParseTree( new NonTerminal(74, "e") ); + ParseTree tree = new ParseTree( new NonTerminal(97, "e") ); Terminal current = ctx.tokens.current(); ctx.nonterminal = "e"; if (current == null) { return tree; } - else if (rule_first.get(126).contains(terminal_map.get(current.getId()))) { - /* (126) $e = :not $e -> LogicalNot( expression=$1 ) */ - ctx.rule = rules.get(126); + else if (rule_first.get(93).contains(terminal_map.get(current.getId()))) { + /* (93) $e = :not $e -> LogicalNot( expression=$1 ) */ + ctx.rule = rules.get(93); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("expression", 1); tree.setAstTransformation(new AstTransformNodeCreator("LogicalNot", parameters)); tree.setNudMorphemeCount(2); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_NOT)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(15))); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(5))); tree.setPrefix(true); } - else if (rule_first.get(127).contains(terminal_map.get(current.getId()))) { - /* (127) $e = :plus $e -> UnaryPlus( expression=$1 ) */ - ctx.rule = rules.get(127); + else if (rule_first.get(94).contains(terminal_map.get(current.getId()))) { + /* (94) $e = :plus $e -> UnaryPlus( expression=$1 ) */ + ctx.rule = rules.get(94); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("expression", 1); tree.setAstTransformation(new AstTransformNodeCreator("UnaryPlus", parameters)); tree.setNudMorphemeCount(2); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(35))); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(26))); tree.setPrefix(true); } - else if (rule_first.get(128).contains(terminal_map.get(current.getId()))) { - /* (128) $e = :dash $e -> UnaryNegation( expression=$1 ) */ - ctx.rule = rules.get(128); + else if (rule_first.get(95).contains(terminal_map.get(current.getId()))) { + /* (95) $e = :dash $e -> UnaryNegation( expression=$1 ) */ + ctx.rule = rules.get(95); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("expression", 1); tree.setAstTransformation(new AstTransformNodeCreator("UnaryNegation", parameters)); tree.setNudMorphemeCount(2); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DASH)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(0))); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(24))); tree.setPrefix(true); } - else if (rule_first.get(133).contains(terminal_map.get(current.getId()))) { - /* (133) $e = :identifier <=> :lparen $_gen32 :rparen -> FunctionCall( name=$0, params=$2 ) */ - ctx.rule = rules.get(133); + else if (rule_first.get(97).contains(terminal_map.get(current.getId()))) { + /* (97) $e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 ) */ + ctx.rule = rules.get(97); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); } - else if (rule_first.get(134).contains(terminal_map.get(current.getId()))) { - /* (134) $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(134); + else if (rule_first.get(98).contains(terminal_map.get(current.getId()))) { + /* (98) $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ + ctx.rule = rules.get(98); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); } - else if (rule_first.get(135).contains(terminal_map.get(current.getId()))) { - /* (135) $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(135); + else if (rule_first.get(99).contains(terminal_map.get(current.getId()))) { + /* (99) $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ + ctx.rule = rules.get(99); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); } - else if (rule_first.get(140).contains(terminal_map.get(current.getId()))) { - /* (140) $e = :object :lbrace $_gen34 :rbrace -> ObjectLiteral( map=$2 ) */ - ctx.rule = rules.get(140); + else if (rule_first.get(101).contains(terminal_map.get(current.getId()))) { + /* (101) $e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 ) */ + ctx.rule = rules.get(101); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("map", 2); tree.setAstTransformation(new AstTransformNodeCreator("ObjectLiteral", parameters)); tree.setNudMorphemeCount(4); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_OBJECT)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE)); - tree.add(parse__gen34(ctx)); + tree.add(parse__gen19(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE)); } - else if (rule_first.get(141).contains(terminal_map.get(current.getId()))) { - /* (141) $e = :lsquare $_gen32 :rsquare -> ArrayLiteral( values=$1 ) */ - ctx.rule = rules.get(141); + else if (rule_first.get(102).contains(terminal_map.get(current.getId()))) { + /* (102) $e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 ) */ + ctx.rule = rules.get(102); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("values", 1); tree.setAstTransformation(new AstTransformNodeCreator("ArrayLiteral", parameters)); tree.setNudMorphemeCount(3); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LSQUARE)); - tree.add(parse__gen32(ctx)); + tree.add(parse__gen18(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RSQUARE)); } - else if (rule_first.get(146).contains(terminal_map.get(current.getId()))) { - /* (146) $e = :lbrace $_gen36 :rbrace -> MapLiteral( map=$1 ) */ - ctx.rule = rules.get(146); + else if (rule_first.get(104).contains(terminal_map.get(current.getId()))) { + /* (104) $e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 ) */ + ctx.rule = rules.get(104); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("map", 1); tree.setAstTransformation(new AstTransformNodeCreator("MapLiteral", parameters)); tree.setNudMorphemeCount(3); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE)); - tree.add(parse__gen36(ctx)); + tree.add(parse__gen20(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE)); } - else if (rule_first.get(147).contains(terminal_map.get(current.getId()))) { - /* (147) $e = :lparen $e :rparen -> $1 */ - ctx.rule = rules.get(147); - tree.setAstTransformation(new AstTransformSubstitution(1)); + else if (rule_first.get(105).contains(terminal_map.get(current.getId()))) { + /* (105) $e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 ) */ + ctx.rule = rules.get(105); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("values", 1); + tree.setAstTransformation(new AstTransformNodeCreator("TupleLiteral", parameters)); tree.setNudMorphemeCount(3); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN)); - tree.add(parse_e(ctx)); + tree.add(parse__gen18(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN)); } - else if (rule_first.get(148).contains(terminal_map.get(current.getId()))) { - /* (148) $e = :string */ - ctx.rule = rules.get(148); + else if (rule_first.get(106).contains(terminal_map.get(current.getId()))) { + /* (106) $e = :string */ + ctx.rule = rules.get(106); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_STRING)); } - else if (rule_first.get(149).contains(terminal_map.get(current.getId()))) { - /* (149) $e = :identifier */ - ctx.rule = rules.get(149); + else if (rule_first.get(107).contains(terminal_map.get(current.getId()))) { + /* (107) $e = :identifier */ + ctx.rule = rules.get(107); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER)); } - else if (rule_first.get(150).contains(terminal_map.get(current.getId()))) { - /* (150) $e = :boolean */ - ctx.rule = rules.get(150); + else if (rule_first.get(108).contains(terminal_map.get(current.getId()))) { + /* (108) $e = :boolean */ + ctx.rule = rules.get(108); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_BOOLEAN)); } - else if (rule_first.get(151).contains(terminal_map.get(current.getId()))) { - /* (151) $e = :integer */ - ctx.rule = rules.get(151); + else if (rule_first.get(109).contains(terminal_map.get(current.getId()))) { + /* (109) $e = :integer */ + ctx.rule = rules.get(109); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_INTEGER)); } - else if (rule_first.get(152).contains(terminal_map.get(current.getId()))) { - /* (152) $e = :float */ - ctx.rule = rules.get(152); + else if (rule_first.get(110).contains(terminal_map.get(current.getId()))) { + /* (110) $e = :float */ + ctx.rule = rules.get(110); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_FLOAT)); @@ -2735,13 +2510,13 @@ else if (rule_first.get(152).contains(terminal_map.get(current.getId()))) { return tree; } private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxError { - ParseTree tree = new ParseTree( new NonTerminal(74, "e") ); + ParseTree tree = new ParseTree( new NonTerminal(97, "e") ); Terminal current = ctx.tokens.current(); ctx.nonterminal = "e"; int modifier; - if (current.getId() == 34) { + if (current.getId() == 6) { /* $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(113); + ctx.rule = rules.get(80); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2751,12 +2526,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DOUBLE_PIPE)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(34) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(6) - modifier)); return tree; } - if (current.getId() == 36) { + if (current.getId() == 14) { /* $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(114); + ctx.rule = rules.get(81); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2766,12 +2541,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DOUBLE_AMPERSAND)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(36) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(14) - modifier)); return tree; } - if (current.getId() == 48) { + if (current.getId() == 23) { /* $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(115); + ctx.rule = rules.get(82); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2781,12 +2556,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DOUBLE_EQUAL)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(48) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(23) - modifier)); return tree; } - if (current.getId() == 21) { + if (current.getId() == 3) { /* $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(116); + ctx.rule = rules.get(83); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2796,12 +2571,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_NOT_EQUAL)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(21) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(3) - modifier)); return tree; } - if (current.getId() == 9) { + if (current.getId() == 30) { /* $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(117); + ctx.rule = rules.get(84); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2811,12 +2586,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LT)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(9) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(30) - modifier)); return tree; } - if (current.getId() == 47) { + if (current.getId() == 7) { /* $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(118); + ctx.rule = rules.get(85); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2826,12 +2601,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LTEQ)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(47) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(7) - modifier)); return tree; } - if (current.getId() == 44) { + if (current.getId() == 25) { /* $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(119); + ctx.rule = rules.get(86); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2841,12 +2616,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_GT)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(44) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(25) - modifier)); return tree; } - if (current.getId() == 10) { + if (current.getId() == 37) { /* $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(120); + ctx.rule = rules.get(87); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2856,12 +2631,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_GTEQ)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(10) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(37) - modifier)); return tree; } - if (current.getId() == 35) { + if (current.getId() == 26) { /* $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(121); + ctx.rule = rules.get(88); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2871,12 +2646,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(35) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(26) - modifier)); return tree; } - if (current.getId() == 0) { + if (current.getId() == 24) { /* $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(122); + ctx.rule = rules.get(89); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2886,12 +2661,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_DASH)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(0) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(24) - modifier)); return tree; } - if (current.getId() == 51) { + if (current.getId() == 46) { /* $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(123); + ctx.rule = rules.get(90); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2901,12 +2676,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_ASTERISK)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(51) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(46) - modifier)); return tree; } - if (current.getId() == 37) { + if (current.getId() == 15) { /* $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(124); + ctx.rule = rules.get(91); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2916,12 +2691,12 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_SLASH)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(37) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(15) - modifier)); return tree; } - if (current.getId() == 49) { + if (current.getId() == 4) { /* $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(125); + ctx.rule = rules.get(92); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2931,25 +2706,25 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PERCENT)); modifier = 0; tree.setInfix(true); - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(49) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(4) - modifier)); return tree; } - if (current.getId() == 32) { - /* $e = :identifier <=> :lparen $_gen32 :rparen -> FunctionCall( name=$0, params=$2 ) */ - ctx.rule = rules.get(133); + if (current.getId() == 53) { + /* $e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 ) */ + ctx.rule = rules.get(97); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("name", 0); parameters.put("params", 2); tree.setAstTransformation(new AstTransformNodeCreator("FunctionCall", parameters)); tree.add(left); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN)); - tree.add(parse__gen32(ctx)); + tree.add(parse__gen18(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN)); return tree; } - if (current.getId() == 14) { + if (current.getId() == 29) { /* $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(134); + ctx.rule = rules.get(98); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2957,13 +2732,13 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE tree.add(left); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LSQUARE)); modifier = 0; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(14) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(29) - modifier)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RSQUARE)); return tree; } - if (current.getId() == 26) { + if (current.getId() == 51) { /* $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) */ - ctx.rule = rules.get(135); + ctx.rule = rules.get(99); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("lhs", 0); parameters.put("rhs", 2); @@ -2979,7 +2754,9 @@ private static ParseTree led_e(ParseTree left, ParserContext ctx) throws SyntaxE private static Map prefix_binding_power_type_e; static { Map map = new HashMap(); - map.put(14, 1000); /* $type_e = :type <=> :lsquare list(nt=$type_e, sep=:comma, min=0, sep_terminates=False) :rsquare -> Type( name=$0, subtype=$2 ) */ + map.put(29, 1000); /* $type_e = :type <=> :lsquare list($type_e, :comma) :rsquare -> Type( name=$0, subtype=$2 ) */ + map.put(44, 2000); /* $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) */ + map.put(26, 3000); /* $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) */ infix_binding_power_type_e = Collections.unmodifiableMap(map); } static { @@ -3020,22 +2797,36 @@ public static ParseTree parse_type_e_internal(ParserContext ctx, int rbp) throws return left; } private static ParseTree nud_type_e(ParserContext ctx) throws SyntaxError { - ParseTree tree = new ParseTree( new NonTerminal(122, "type_e") ); + ParseTree tree = new ParseTree( new NonTerminal(73, "type_e") ); Terminal current = ctx.tokens.current(); ctx.nonterminal = "type_e"; if (current == null) { return tree; } - if (rule_first.get(111).contains(terminal_map.get(current.getId()))) { - /* (111) $type_e = :type <=> :lsquare $_gen30 :rsquare -> Type( name=$0, subtype=$2 ) */ - ctx.rule = rules.get(111); + if (rule_first.get(76).contains(terminal_map.get(current.getId()))) { + /* (76) $type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 ) */ + ctx.rule = rules.get(76); + tree.setAstTransformation(new AstTransformSubstitution(0)); + tree.setNudMorphemeCount(1); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); + } + else if (rule_first.get(77).contains(terminal_map.get(current.getId()))) { + /* (77) $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) */ + ctx.rule = rules.get(77); + tree.setAstTransformation(new AstTransformSubstitution(0)); + tree.setNudMorphemeCount(1); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); + } + else if (rule_first.get(78).contains(terminal_map.get(current.getId()))) { + /* (78) $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) */ + ctx.rule = rules.get(78); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); } - else if (rule_first.get(112).contains(terminal_map.get(current.getId()))) { - /* (112) $type_e = :type */ - ctx.rule = rules.get(112); + else if (rule_first.get(79).contains(terminal_map.get(current.getId()))) { + /* (79) $type_e = :type */ + ctx.rule = rules.get(79); tree.setAstTransformation(new AstTransformSubstitution(0)); tree.setNudMorphemeCount(1); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_TYPE)); @@ -3043,1656 +2834,1713 @@ else if (rule_first.get(112).contains(terminal_map.get(current.getId()))) { return tree; } private static ParseTree led_type_e(ParseTree left, ParserContext ctx) throws SyntaxError { - ParseTree tree = new ParseTree( new NonTerminal(122, "type_e") ); + ParseTree tree = new ParseTree( new NonTerminal(73, "type_e") ); Terminal current = ctx.tokens.current(); ctx.nonterminal = "type_e"; int modifier; - if (current.getId() == 14) { - /* $type_e = :type <=> :lsquare $_gen30 :rsquare -> Type( name=$0, subtype=$2 ) */ - ctx.rule = rules.get(111); + if (current.getId() == 29) { + /* $type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 ) */ + ctx.rule = rules.get(76); LinkedHashMap parameters = new LinkedHashMap(); parameters.put("name", 0); parameters.put("subtype", 2); tree.setAstTransformation(new AstTransformNodeCreator("Type", parameters)); tree.add(left); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_LSQUARE)); - tree.add(parse__gen30(ctx)); + tree.add(parse__gen17(ctx)); tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_RSQUARE)); return tree; } + if (current.getId() == 44) { + /* $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) */ + ctx.rule = rules.get(77); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("innerType", 0); + tree.setAstTransformation(new AstTransformNodeCreator("OptionalType", parameters)); + tree.add(left); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_QMARK)); + return tree; + } + if (current.getId() == 26) { + /* $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) */ + ctx.rule = rules.get(78); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("innerType", 0); + tree.setAstTransformation(new AstTransformNodeCreator("NonEmptyType", parameters)); + tree.add(left); + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS)); + return tree; + } return tree; } - public ParseTree parse__gen36(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen0(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen36(ctx); + return parse__gen0(ctx); } - private static ParseTree parse__gen36(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[0][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(56, "_gen36")); - ctx.nonterminal = "_gen36"; + private static ParseTree parse__gen0(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(106, "_gen0")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(56).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(56).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen0"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(106).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(106).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 142) { - /* $_gen36 = $map_kv $_gen37 */ - ctx.rule = rules.get(142); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_map_kv(ctx); - tree.add(subtree); - subtree = parse__gen37(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(106).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_import(ctx)); + ctx.nonterminal = "_gen0"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse_call_body(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen1(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_call_body(ctx); + return parse__gen1(ctx); } - private static ParseTree parse_call_body(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[1][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(57, "call_body")); - ctx.nonterminal = "call_body"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "call_body", - nonterminal_first.get(57), - nonterminal_rules.get(57) - )); + private static ParseTree parse__gen1(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(87, "_gen1")); + tree.setList(true); + ctx.nonterminal = "_gen1"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(87).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(87).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 86) { - /* $call_body = :lbrace $_gen5 $_gen23 :rbrace -> CallBody( declarations=$1, io=$2 ) */ - ctx.rule = rules.get(86); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("declarations", 1); - parameters.put("io", 2); - tree.setAstTransformation(new AstTransformNodeCreator("CallBody", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen5(ctx); - tree.add(subtree); - subtree = parse__gen23(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "call_body", - current, - nonterminal_first.get(57), - rules.get(86) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(87).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_workflow_or_task_or_decl(ctx)); + ctx.nonterminal = "_gen1"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse__gen3(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen10(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen3(ctx); + return parse__gen10(ctx); } - private static ParseTree parse__gen3(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[2][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(58, "_gen3")); - ctx.nonterminal = "_gen3"; + private static ParseTree parse__gen10(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(108, "_gen10")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(58).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(58).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen10"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(108).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(108).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 5) { - /* $_gen3 = $workflow_or_task $_gen3 */ - ctx.rule = rules.get(5); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_workflow_or_task(ctx); - tree.add(subtree); - subtree = parse__gen3(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(108).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_wf_body_element(ctx)); + ctx.nonterminal = "_gen10"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse_import(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen13(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_import(ctx); + return parse__gen13(ctx); } - private static ParseTree parse_import(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[3][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(59, "import")); - ctx.nonterminal = "import"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "import", - nonterminal_first.get(59), - nonterminal_rules.get(59) - )); + private static ParseTree parse__gen13(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(115, "_gen13")); + tree.setList(true); + ctx.nonterminal = "_gen13"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(115).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(115).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 13) { - /* $import = :import :string $_gen4 -> Import( uri=$1, namespace=$2 ) */ - ctx.rule = rules.get(13); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("uri", 1); - parameters.put("namespace", 2); - tree.setAstTransformation(new AstTransformNodeCreator("Import", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IMPORT); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_STRING); - tree.add(next); - subtree = parse__gen4(ctx); - tree.add(subtree); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "import", - current, - nonterminal_first.get(59), - rules.get(13) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(115).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_call_input(ctx)); + ctx.nonterminal = "_gen13"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse__gen18(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen14(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen18(ctx); + return parse__gen14(ctx); } - private static ParseTree parse__gen18(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[4][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(60, "_gen18")); - ctx.nonterminal = "_gen18"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(60).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(60).contains(terminal_map.get(current.getId())) ) { + private static ParseTree parse__gen14(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(88, "_gen14")); + tree.setList(true); + tree.setListSeparator(27); + ctx.nonterminal = "_gen14"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(88).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(88).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 59) { - /* $_gen18 = $setter */ - ctx.rule = rules.get(59); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_setter(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(88).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_mapping(ctx)); + ctx.nonterminal = "_gen14"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen14", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen23(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen15(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen23(ctx); + return parse__gen15(ctx); } - private static ParseTree parse__gen23(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[5][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(61, "_gen23")); - ctx.nonterminal = "_gen23"; + private static ParseTree parse__gen15(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(113, "_gen15")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(61).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(61).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen15"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(113).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(113).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 82) { - /* $_gen23 = $call_input $_gen24 */ - ctx.rule = rules.get(82); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_call_input(ctx); - tree.add(subtree); - subtree = parse__gen24(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(113).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_wf_output(ctx)); + ctx.nonterminal = "_gen15"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen28(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen17(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen28(ctx); + return parse__gen17(ctx); } - private static ParseTree parse__gen28(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[6][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(62, "_gen28")); - ctx.nonterminal = "_gen28"; + private static ParseTree parse__gen17(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(67, "_gen17")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(62).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(62).contains(terminal_map.get(current.getId())) ) { + tree.setListSeparator(27); + ctx.nonterminal = "_gen17"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(67).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(67).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 95) { - /* $_gen28 = :comma $wf_output $_gen28 */ - ctx.rule = rules.get(95); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); - tree.add(next); - tree.setListSeparator(next); - subtree = parse_wf_output(ctx); - tree.add(subtree); - subtree = parse__gen28(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(67).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_type_e(ctx)); + ctx.nonterminal = "_gen17"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen17", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen12(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen18(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen12(ctx); + return parse__gen18(ctx); } - private static ParseTree parse__gen12(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[7][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(63, "_gen12")); - ctx.nonterminal = "_gen12"; + private static ParseTree parse__gen18(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(96, "_gen18")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(63).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(63).contains(terminal_map.get(current.getId())) ) { + tree.setListSeparator(27); + ctx.nonterminal = "_gen18"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(96).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(96).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 37) { - /* $_gen12 = $cmd_param_kv $_gen12 */ - ctx.rule = rules.get(37); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_cmd_param_kv(ctx); - tree.add(subtree); - subtree = parse__gen12(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(96).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_e(ctx)); + ctx.nonterminal = "_gen18"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen18", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen5(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen19(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen5(ctx); + return parse__gen19(ctx); } - private static ParseTree parse__gen5(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[8][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(64, "_gen5")); - ctx.nonterminal = "_gen5"; + private static ParseTree parse__gen19(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(110, "_gen19")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(64).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(64).contains(terminal_map.get(current.getId())) ) { + tree.setListSeparator(27); + ctx.nonterminal = "_gen19"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(110).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(110).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 15) { - /* $_gen5 = $declaration $_gen6 */ - ctx.rule = rules.get(15); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_declaration(ctx); - tree.add(subtree); - subtree = parse__gen6(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(110).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_object_kv(ctx)); + ctx.nonterminal = "_gen19"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen19", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse_cmd_param_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen20(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_cmd_param_kv(ctx); + return parse__gen20(ctx); } - private static ParseTree parse_cmd_param_kv(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[9][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(65, "cmd_param_kv")); - ctx.nonterminal = "cmd_param_kv"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "cmd_param_kv", - nonterminal_first.get(65), - nonterminal_rules.get(65) - )); + private static ParseTree parse__gen20(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(104, "_gen20")); + tree.setList(true); + tree.setListSeparator(27); + ctx.nonterminal = "_gen20"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(104).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(104).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; } - if (rule == 41) { - /* $cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 ) */ - ctx.rule = rules.get(41); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 1); - parameters.put("value", 3); - tree.setAstTransformation(new AstTransformNodeCreator("CommandParameterAttr", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); - tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); + if (ctx.tokens.current() == null) { return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "cmd_param_kv", - current, - nonterminal_first.get(65), - rules.get(41) - )); + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(104).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_map_kv(ctx)); + ctx.nonterminal = "_gen20"; // because parse_* can reset this + if (ctx.tokens.current() != null && + ctx.tokens.current().getId() == WdlTerminalIdentifier.TERMINAL_COMMA.id()) { + tree.add(expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA)); + } else { + if (minimum > 1) { + throw new SyntaxError(ctx.error_formatter.missingListItems( + "_gen20", + 0, + 0 - minimum + 1, + null + )); + } + break; + } + minimum = Math.max(minimum - 1, 0); + } + return tree; } - public ParseTree parse__gen6(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen3(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen6(ctx); + return parse__gen3(ctx); } - private static ParseTree parse__gen6(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[10][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(66, "_gen6")); - ctx.nonterminal = "_gen6"; + private static ParseTree parse__gen3(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(64, "_gen3")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(66).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(66).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen3"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(64).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(64).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 16) { - /* $_gen6 = $declaration $_gen6 */ - ctx.rule = rules.get(16); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_declaration(ctx); - tree.add(subtree); - subtree = parse__gen6(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(64).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_declaration(ctx)); + ctx.nonterminal = "_gen3"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen15(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen4(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen15(ctx); + return parse__gen4(ctx); } - private static ParseTree parse__gen15(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[11][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(67, "_gen15")); - ctx.nonterminal = "_gen15"; + private static ParseTree parse__gen4(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(89, "_gen4")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(67).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(67).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen4"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(89).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(89).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 51) { - /* $_gen15 = $kv $_gen16 */ - ctx.rule = rules.get(51); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_kv(ctx); - tree.add(subtree); - subtree = parse__gen16(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(89).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_sections(ctx)); + ctx.nonterminal = "_gen4"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen26(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen5(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen26(ctx); + return parse__gen5(ctx); } - private static ParseTree parse__gen26(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[12][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(68, "_gen26")); - ctx.nonterminal = "_gen26"; + private static ParseTree parse__gen5(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(112, "_gen5")); tree.setList(true); - if ( current != null && - !nonterminal_first.get(68).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(68).contains(terminal_map.get(current.getId())) ) { + ctx.nonterminal = "_gen5"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(112).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(112).contains(terminal_map.get(ctx.tokens.current().getId())) ) { return tree; } - if (current == null) { + if (ctx.tokens.current() == null) { return tree; } - if (rule == 88) { - /* $_gen26 = :comma $mapping $_gen26 */ - ctx.rule = rules.get(88); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); - tree.add(next); - tree.setListSeparator(next); - subtree = parse_mapping(ctx); - tree.add(subtree); - subtree = parse__gen26(ctx); - tree.add(subtree); - return tree; + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(112).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_command_part(ctx)); + ctx.nonterminal = "_gen5"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); } return tree; } - public ParseTree parse__gen35(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen6(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen35(ctx); + return parse__gen6(ctx); + } + private static ParseTree parse__gen6(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(105, "_gen6")); + tree.setList(true); + ctx.nonterminal = "_gen6"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(105).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(105).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; + } + if (ctx.tokens.current() == null) { + return tree; + } + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(105).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_cmd_param_kv(ctx)); + ctx.nonterminal = "_gen6"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; + } + public ParseTree parse__gen7(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); + return parse__gen7(ctx); + } + private static ParseTree parse__gen7(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(65, "_gen7")); + tree.setList(true); + ctx.nonterminal = "_gen7"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(65).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(65).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; + } + if (ctx.tokens.current() == null) { + return tree; + } + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(65).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_output_kv(ctx)); + ctx.nonterminal = "_gen7"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; + } + public ParseTree parse__gen8(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); + return parse__gen8(ctx); + } + private static ParseTree parse__gen8(ParserContext ctx) throws SyntaxError { + ParseTree tree = new ParseTree(new NonTerminal(102, "_gen8")); + tree.setList(true); + ctx.nonterminal = "_gen8"; + if ( ctx.tokens.current() != null && + !nonterminal_first.get(102).contains(terminal_map.get(ctx.tokens.current().getId())) && + nonterminal_follow.get(102).contains(terminal_map.get(ctx.tokens.current().getId())) ) { + return tree; + } + if (ctx.tokens.current() == null) { + return tree; + } + int minimum = 0; + while (minimum > 0 || + (ctx.tokens.current() != null && + nonterminal_first.get(102).contains(terminal_map.get(ctx.tokens.current().getId())))) { + tree.add(parse_kv(ctx)); + ctx.nonterminal = "_gen8"; // because parse_* can reset this + minimum = Math.max(minimum - 1, 0); + } + return tree; + } + public ParseTree parse__gen11(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); + return parse__gen11(ctx); } - private static ParseTree parse__gen35(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen11(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[13][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(69, "_gen35")); - ctx.nonterminal = "_gen35"; - tree.setList(true); + int rule = (current != null) ? table[15][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(71, "_gen11")); + ctx.nonterminal = "_gen11"; if ( current != null && - !nonterminal_first.get(69).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(69).contains(terminal_map.get(current.getId())) ) { + !nonterminal_first.get(71).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(71).contains(terminal_map.get(current.getId())) ) { return tree; } if (current == null) { return tree; } - if (rule == 137) { - /* $_gen35 = :comma $object_kv $_gen35 */ - ctx.rule = rules.get(137); + if (rule == 49) { + /* $_gen11 = $alias */ + ctx.rule = rules.get(49); tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); - tree.add(next); - tree.setListSeparator(next); - subtree = parse_object_kv(ctx); - tree.add(subtree); - subtree = parse__gen35(ctx); + subtree = parse_alias(ctx); tree.add(subtree); return tree; } return tree; } - public ParseTree parse_call(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen12(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_call(ctx); + return parse__gen12(ctx); } - private static ParseTree parse_call(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen12(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; int rule = (current != null) ? table[14][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(70, "call")); - ctx.nonterminal = "call"; - tree.setList(false); + ParseTree tree = new ParseTree(new NonTerminal(70, "_gen12")); + ctx.nonterminal = "_gen12"; + if ( current != null && + !nonterminal_first.get(70).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(70).contains(terminal_map.get(current.getId())) ) { + return tree; + } if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "call", - nonterminal_first.get(70), - nonterminal_rules.get(70) - )); + return tree; } - if (rule == 81) { - /* $call = :call :fqn $_gen21 $_gen22 -> Call( task=$1, alias=$2, body=$3 ) */ - ctx.rule = rules.get(81); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("task", 1); - parameters.put("alias", 2); - parameters.put("body", 3); - tree.setAstTransformation(new AstTransformNodeCreator("Call", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CALL); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_FQN); - tree.add(next); - subtree = parse__gen21(ctx); - tree.add(subtree); - subtree = parse__gen22(ctx); + if (rule == 51) { + /* $_gen12 = $call_body */ + ctx.rule = rules.get(51); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_call_body(ctx); tree.add(subtree); return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "call", - current, - nonterminal_first.get(70), - rules.get(81) - )); + return tree; } - public ParseTree parse__gen25(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen16(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen25(ctx); + return parse__gen16(ctx); } - private static ParseTree parse__gen25(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen16(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[15][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(71, "_gen25")); - ctx.nonterminal = "_gen25"; - tree.setList(true); + int rule = (current != null) ? table[36][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(92, "_gen16")); + ctx.nonterminal = "_gen16"; if ( current != null && - !nonterminal_first.get(71).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(71).contains(terminal_map.get(current.getId())) ) { + !nonterminal_first.get(92).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(92).contains(terminal_map.get(current.getId())) ) { return tree; } if (current == null) { return tree; } - if (rule == 87) { - /* $_gen25 = $mapping $_gen26 */ - ctx.rule = rules.get(87); + if (rule == 65) { + /* $_gen16 = $wf_output_wildcard */ + ctx.rule = rules.get(65); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_mapping(ctx); - tree.add(subtree); - subtree = parse__gen26(ctx); + subtree = parse_wf_output_wildcard(ctx); tree.add(subtree); return tree; } return tree; } - public ParseTree parse__gen22(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen2(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen22(ctx); + return parse__gen2(ctx); } - private static ParseTree parse__gen22(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen2(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[16][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(72, "_gen22")); - ctx.nonterminal = "_gen22"; - tree.setList(false); + int rule = (current != null) ? table[27][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(83, "_gen2")); + ctx.nonterminal = "_gen2"; if ( current != null && - !nonterminal_first.get(72).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(72).contains(terminal_map.get(current.getId())) ) { + !nonterminal_first.get(83).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(83).contains(terminal_map.get(current.getId())) ) { return tree; } if (current == null) { return tree; } - if (rule == 79) { - /* $_gen22 = $call_body */ - ctx.rule = rules.get(79); + if (rule == 6) { + /* $_gen2 = $import_namespace */ + ctx.rule = rules.get(6); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_call_body(ctx); + subtree = parse_import_namespace(ctx); tree.add(subtree); return tree; } return tree; } - public ParseTree parse_scatter(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse__gen9(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_scatter(ctx); + return parse__gen9(ctx); } - private static ParseTree parse_scatter(ParserContext ctx) throws SyntaxError { + private static ParseTree parse__gen9(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[17][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(73, "scatter")); - ctx.nonterminal = "scatter"; - tree.setList(false); + int rule = (current != null) ? table[42][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(98, "_gen9")); + ctx.nonterminal = "_gen9"; + if ( current != null && + !nonterminal_first.get(98).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(98).contains(terminal_map.get(current.getId())) ) { + return tree; + } if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "scatter", - nonterminal_first.get(73), - nonterminal_rules.get(73) - )); + return tree; } - if (rule == 105) { - /* $scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen19 :rbrace -> Scatter( item=$2, collection=$4, body=$7 ) */ - ctx.rule = rules.get(105); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("item", 2); - parameters.put("collection", 4); - parameters.put("body", 7); - tree.setAstTransformation(new AstTransformNodeCreator("Scatter", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_SCATTER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IN); - tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen19(ctx); + if (rule == 34) { + /* $_gen9 = $setter */ + ctx.rule = rules.get(34); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_setter(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "scatter", - current, - nonterminal_first.get(73), - rules.get(105) - )); + return tree; } - public ParseTree parse_command_part(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_alias(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_command_part(ctx); + return parse_alias(ctx); } - private static ParseTree parse_command_part(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_alias(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[19][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(75, "command_part")); - ctx.nonterminal = "command_part"; - tree.setList(false); + int rule = (current != null) ? table[23][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(79, "alias")); + ctx.nonterminal = "alias"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "command_part", - nonterminal_first.get(75), - nonterminal_rules.get(75) + "alias", + nonterminal_first.get(79), + nonterminal_rules.get(79) )); } - if (rule == 34) { - /* $command_part = :cmd_part */ - ctx.rule = rules.get(34); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PART); + if (rule == 59) { + /* $alias = :as :identifier -> $1 */ + ctx.rule = rules.get(59); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_AS); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - return tree; - } - else if (rule == 35) { - /* $command_part = $cmd_param */ - ctx.rule = rules.get(35); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_cmd_param(ctx); - tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "command_part", + "alias", current, - nonterminal_first.get(75), - rules.get(35) + nonterminal_first.get(79), + rules.get(59) )); } - public ParseTree parse_output_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_call(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_output_kv(ctx); + return parse_call(ctx); } - private static ParseTree parse_output_kv(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_call(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[20][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(76, "output_kv")); - ctx.nonterminal = "output_kv"; - tree.setList(false); + int rule = (current != null) ? table[60][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(116, "call")); + ctx.nonterminal = "call"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "output_kv", - nonterminal_first.get(76), - nonterminal_rules.get(76) + "call", + nonterminal_first.get(116), + nonterminal_rules.get(116) )); } - if (rule == 47) { - /* $output_kv = $type_e :identifier :equal $e -> Output( type=$0, var=$1, expression=$3 ) */ - ctx.rule = rules.get(47); + if (rule == 53) { + /* $call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 ) */ + ctx.rule = rules.get(53); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("type", 0); - parameters.put("var", 1); - parameters.put("expression", 3); - tree.setAstTransformation(new AstTransformNodeCreator("Output", parameters)); - subtree = parse_type_e(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + parameters.put("task", 1); + parameters.put("alias", 2); + parameters.put("body", 3); + tree.setAstTransformation(new AstTransformNodeCreator("Call", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CALL); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_FQN); tree.add(next); - subtree = parse_e(ctx); + subtree = parse__gen11(ctx); + tree.add(subtree); + subtree = parse__gen12(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "output_kv", + "call", current, - nonterminal_first.get(76), - rules.get(47) + nonterminal_first.get(116), + rules.get(53) )); } - public ParseTree parse_command(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_call_body(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_command(ctx); + return parse_call_body(ctx); } - private static ParseTree parse_command(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_call_body(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[21][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(77, "command")); - ctx.nonterminal = "command"; - tree.setList(false); + int rule = (current != null) ? table[18][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(74, "call_body")); + ctx.nonterminal = "call_body"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "command", - nonterminal_first.get(77), - nonterminal_rules.get(77) + "call_body", + nonterminal_first.get(74), + nonterminal_rules.get(74) )); } - if (rule == 33) { - /* $command = :raw_command :raw_cmd_start $_gen9 :raw_cmd_end -> RawCommand( parts=$2 ) */ - ctx.rule = rules.get(33); + if (rule == 55) { + /* $call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 ) */ + ctx.rule = rules.get(55); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("parts", 2); - tree.setAstTransformation(new AstTransformNodeCreator("RawCommand", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_CMD_START); - tree.add(next); - subtree = parse__gen9(ctx); + parameters.put("declarations", 1); + parameters.put("io", 2); + tree.setAstTransformation(new AstTransformNodeCreator("CallBody", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen3(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_CMD_END); + subtree = parse__gen13(ctx); + tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "command", + "call_body", current, - nonterminal_first.get(77), - rules.get(33) + nonterminal_first.get(74), + rules.get(55) )); } - public ParseTree parse_if_stmt(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_call_input(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_if_stmt(ctx); + return parse_call_input(ctx); } - private static ParseTree parse_if_stmt(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_call_input(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; int rule = (current != null) ? table[22][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(78, "if_stmt")); - ctx.nonterminal = "if_stmt"; - tree.setList(false); + ParseTree tree = new ParseTree(new NonTerminal(78, "call_input")); + ctx.nonterminal = "call_input"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "if_stmt", + "call_input", nonterminal_first.get(78), nonterminal_rules.get(78) )); } - if (rule == 104) { - /* $if_stmt = :if :lparen $e :rparen :lbrace $_gen19 :rbrace -> If( expression=$2, body=$5 ) */ - ctx.rule = rules.get(104); + if (rule == 57) { + /* $call_input = :input :colon $_gen14 -> Inputs( map=$2 ) */ + ctx.rule = rules.get(57); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("expression", 2); - parameters.put("body", 5); - tree.setAstTransformation(new AstTransformNodeCreator("If", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IF); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); - tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN); + parameters.put("map", 2); + tree.setAstTransformation(new AstTransformNodeCreator("Inputs", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_INPUT); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); tree.add(next); - subtree = parse__gen19(ctx); + subtree = parse__gen14(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "if_stmt", + "call_input", current, nonterminal_first.get(78), - rules.get(104) + rules.get(57) )); } - public ParseTree parse__gen33(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_cmd_param(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen33(ctx); + return parse_cmd_param(ctx); } - private static ParseTree parse__gen33(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_cmd_param(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[23][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(79, "_gen33")); - ctx.nonterminal = "_gen33"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(79).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(79).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[0][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(56, "cmd_param")); + ctx.nonterminal = "cmd_param"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "cmd_param", + nonterminal_first.get(56), + nonterminal_rules.get(56) + )); } - if (rule == 130) { - /* $_gen33 = :comma $e $_gen33 */ - ctx.rule = rules.get(130); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); + if (rule == 23) { + /* $cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 ) */ + ctx.rule = rules.get(23); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("attributes", 1); + parameters.put("expr", 2); + tree.setAstTransformation(new AstTransformNodeCreator("CommandParameter", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START); tree.add(next); - tree.setListSeparator(next); - subtree = parse_e(ctx); + subtree = parse__gen6(ctx); tree.add(subtree); - subtree = parse__gen33(ctx); + subtree = parse_e(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PARAM_END); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "cmd_param", + current, + nonterminal_first.get(56), + rules.get(23) + )); } - public ParseTree parse_outputs(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_cmd_param_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_outputs(ctx); + return parse_cmd_param_kv(ctx); } - private static ParseTree parse_outputs(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_cmd_param_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[24][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(80, "outputs")); - ctx.nonterminal = "outputs"; - tree.setList(false); + int rule = (current != null) ? table[47][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(103, "cmd_param_kv")); + ctx.nonterminal = "cmd_param_kv"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "outputs", - nonterminal_first.get(80), - nonterminal_rules.get(80) + "cmd_param_kv", + nonterminal_first.get(103), + nonterminal_rules.get(103) )); } - if (rule == 46) { - /* $outputs = :output :lbrace $_gen13 :rbrace -> Outputs( attributes=$2 ) */ - ctx.rule = rules.get(46); + if (rule == 24) { + /* $cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 ) */ + ctx.rule = rules.get(24); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("attributes", 2); - tree.setAstTransformation(new AstTransformNodeCreator("Outputs", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_OUTPUT); + parameters.put("key", 1); + parameters.put("value", 3); + tree.setAstTransformation(new AstTransformNodeCreator("CommandParameterAttr", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - subtree = parse__gen13(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); tree.add(next); + subtree = parse_e(ctx); + tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "outputs", + "cmd_param_kv", current, - nonterminal_first.get(80), - rules.get(46) + nonterminal_first.get(103), + rules.get(24) )); } - public ParseTree parse__gen13(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_command(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen13(ctx); + return parse_command(ctx); } - private static ParseTree parse__gen13(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_command(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[25][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(81, "_gen13")); - ctx.nonterminal = "_gen13"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(81).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(81).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[5][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(61, "command")); + ctx.nonterminal = "command"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "command", + nonterminal_first.get(61), + nonterminal_rules.get(61) + )); } - if (rule == 42) { - /* $_gen13 = $output_kv $_gen14 */ - ctx.rule = rules.get(42); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_output_kv(ctx); - tree.add(subtree); - subtree = parse__gen14(ctx); + if (rule == 19) { + /* $command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 ) */ + ctx.rule = rules.get(19); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("parts", 2); + tree.setAstTransformation(new AstTransformNodeCreator("RawCommand", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_COMMAND); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_CMD_START); + tree.add(next); + subtree = parse__gen5(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RAW_CMD_END); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "command", + current, + nonterminal_first.get(61), + rules.get(19) + )); } - public ParseTree parse_postfix_quantifier(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_command_part(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_postfix_quantifier(ctx); + return parse_command_part(ctx); } - private static ParseTree parse_postfix_quantifier(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_command_part(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[26][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(82, "postfix_quantifier")); - ctx.nonterminal = "postfix_quantifier"; - tree.setList(false); + int rule = (current != null) ? table[35][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(91, "command_part")); + ctx.nonterminal = "command_part"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "postfix_quantifier", - nonterminal_first.get(82), - nonterminal_rules.get(82) + "command_part", + nonterminal_first.get(91), + nonterminal_rules.get(91) )); } - if (rule == 63) { - /* $postfix_quantifier = :qmark */ - ctx.rule = rules.get(63); + if (rule == 20) { + /* $command_part = :cmd_part */ + ctx.rule = rules.get(20); tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_QMARK); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PART); tree.add(next); return tree; } - else if (rule == 64) { - /* $postfix_quantifier = :plus */ - ctx.rule = rules.get(64); + else if (rule == 21) { + /* $command_part = $cmd_param */ + ctx.rule = rules.get(21); tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_PLUS); - tree.add(next); + subtree = parse_cmd_param(ctx); + tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "postfix_quantifier", + "command_part", current, - nonterminal_first.get(82), - rules.get(64) + nonterminal_first.get(91), + rules.get(21) )); } - public ParseTree parse_task(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_declaration(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_task(ctx); + return parse_declaration(ctx); } - private static ParseTree parse_task(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_declaration(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[27][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(83, "task")); - ctx.nonterminal = "task"; - tree.setList(false); + int rule = (current != null) ? table[21][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(77, "declaration")); + ctx.nonterminal = "declaration"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "task", - nonterminal_first.get(83), - nonterminal_rules.get(83) + "declaration", + nonterminal_first.get(77), + nonterminal_rules.get(77) )); } - if (rule == 23) { - /* $task = :task :identifier :lbrace $_gen5 $_gen7 :rbrace -> Task( name=$1, declarations=$3, sections=$4 ) */ - ctx.rule = rules.get(23); + if (rule == 36) { + /* $declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 ) */ + ctx.rule = rules.get(36); LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("type", 0); parameters.put("name", 1); - parameters.put("declarations", 3); - parameters.put("sections", 4); - tree.setAstTransformation(new AstTransformNodeCreator("Task", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_TASK); - tree.add(next); + parameters.put("expression", 2); + tree.setAstTransformation(new AstTransformNodeCreator("Declaration", parameters)); + subtree = parse_type_e(ctx); + tree.add(subtree); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen5(ctx); - tree.add(subtree); - subtree = parse__gen7(ctx); + subtree = parse__gen9(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "task", + "declaration", current, - nonterminal_first.get(83), - rules.get(23) + nonterminal_first.get(77), + rules.get(36) )); } - public ParseTree parse__gen20(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_document(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen20(ctx); + return parse_document(ctx); } - private static ParseTree parse__gen20(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_document(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[28][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(84, "_gen20")); - ctx.nonterminal = "_gen20"; - tree.setList(true); + int rule = (current != null) ? table[44][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(100, "document")); + ctx.nonterminal = "document"; if ( current != null && - !nonterminal_first.get(84).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(84).contains(terminal_map.get(current.getId())) ) { + !nonterminal_first.get(100).contains(terminal_map.get(current.getId())) && + nonterminal_follow.get(100).contains(terminal_map.get(current.getId())) ) { return tree; } if (current == null) { return tree; } - if (rule == 67) { - /* $_gen20 = $wf_body_element $_gen20 */ - ctx.rule = rules.get(67); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_body_element(ctx); + if (rule == 2) { + /* $document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 ) */ + ctx.rule = rules.get(2); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("imports", 0); + parameters.put("body", 1); + tree.setAstTransformation(new AstTransformNodeCreator("Namespace", parameters)); + subtree = parse__gen0(ctx); tree.add(subtree); - subtree = parse__gen20(ctx); + subtree = parse__gen1(ctx); tree.add(subtree); return tree; } return tree; } - public ParseTree parse_alias(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_if_stmt(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_alias(ctx); + return parse_if_stmt(ctx); } - private static ParseTree parse_alias(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_if_stmt(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[29][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(85, "alias")); - ctx.nonterminal = "alias"; - tree.setList(false); + int rule = (current != null) ? table[25][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(81, "if_stmt")); + ctx.nonterminal = "if_stmt"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "alias", - nonterminal_first.get(85), - nonterminal_rules.get(85) + "if_stmt", + nonterminal_first.get(81), + nonterminal_rules.get(81) )); } - if (rule == 93) { - /* $alias = :as :identifier -> $1 */ - ctx.rule = rules.get(93); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_AS); + if (rule == 72) { + /* $if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 ) */ + ctx.rule = rules.get(72); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("expression", 2); + parameters.put("body", 5); + tree.setAstTransformation(new AstTransformNodeCreator("If", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IF); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); + tree.add(next); + subtree = parse_e(ctx); + tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen10(ctx); + tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "alias", + "if_stmt", current, - nonterminal_first.get(85), - rules.get(93) + nonterminal_first.get(81), + rules.get(72) )); } - public ParseTree parse__gen24(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_import(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen24(ctx); + return parse_import(ctx); } - private static ParseTree parse__gen24(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_import(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[30][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(86, "_gen24")); - ctx.nonterminal = "_gen24"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(86).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(86).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[39][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(95, "import")); + ctx.nonterminal = "import"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "import", + nonterminal_first.get(95), + nonterminal_rules.get(95) + )); } - if (rule == 83) { - /* $_gen24 = $call_input $_gen24 */ - ctx.rule = rules.get(83); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_call_input(ctx); - tree.add(subtree); - subtree = parse__gen24(ctx); + if (rule == 8) { + /* $import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 ) */ + ctx.rule = rules.get(8); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("uri", 1); + parameters.put("namespace", 2); + tree.setAstTransformation(new AstTransformNodeCreator("Import", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IMPORT); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_STRING); + tree.add(next); + subtree = parse__gen2(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "import", + current, + nonterminal_first.get(95), + rules.get(8) + )); } - public ParseTree parse__gen9(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_import_namespace(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen9(ctx); + return parse_import_namespace(ctx); } - private static ParseTree parse__gen9(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_import_namespace(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[31][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(87, "_gen9")); - ctx.nonterminal = "_gen9"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(87).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(87).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[12][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(68, "import_namespace")); + ctx.nonterminal = "import_namespace"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "import_namespace", + nonterminal_first.get(68), + nonterminal_rules.get(68) + )); } - if (rule == 29) { - /* $_gen9 = $command_part $_gen10 */ - ctx.rule = rules.get(29); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_command_part(ctx); - tree.add(subtree); - subtree = parse__gen10(ctx); - tree.add(subtree); + if (rule == 9) { + /* $import_namespace = :as :identifier -> $1 */ + ctx.rule = rules.get(9); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_AS); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "import_namespace", + current, + nonterminal_first.get(68), + rules.get(9) + )); } - public ParseTree parse_parameter_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_parameter_meta(ctx); + return parse_kv(ctx); } - private static ParseTree parse_parameter_meta(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[32][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(88, "parameter_meta")); - ctx.nonterminal = "parameter_meta"; - tree.setList(false); + int rule = (current != null) ? table[51][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(107, "kv")); + ctx.nonterminal = "kv"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "parameter_meta", - nonterminal_first.get(88), - nonterminal_rules.get(88) + "kv", + nonterminal_first.get(107), + nonterminal_rules.get(107) )); } - if (rule == 49) { - /* $parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 ) */ - ctx.rule = rules.get(49); + if (rule == 33) { + /* $kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 ) */ + ctx.rule = rules.get(33); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("map", 1); - tree.setAstTransformation(new AstTransformNodeCreator("ParameterMeta", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_PARAMETER_META); + parameters.put("key", 0); + parameters.put("value", 2); + tree.setAstTransformation(new AstTransformNodeCreator("RuntimeAttribute", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - subtree = parse_map(ctx); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); + tree.add(next); + subtree = parse_e(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "parameter_meta", + "kv", current, - nonterminal_first.get(88), - rules.get(49) + nonterminal_first.get(107), + rules.get(33) )); } - public ParseTree parse__gen7(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_map(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen7(ctx); + return parse_map(ctx); } - private static ParseTree parse__gen7(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_map(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[33][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(89, "_gen7")); - ctx.nonterminal = "_gen7"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(89).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(89).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[19][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(75, "map")); + ctx.nonterminal = "map"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "map", + nonterminal_first.get(75), + nonterminal_rules.get(75) + )); } - if (rule == 19) { - /* $_gen7 = $sections $_gen8 */ - ctx.rule = rules.get(19); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_sections(ctx); - tree.add(subtree); + if (rule == 32) { + /* $map = :lbrace $_gen8 :rbrace -> $1 */ + ctx.rule = rules.get(32); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); subtree = parse__gen8(ctx); tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse__gen37(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen37(ctx); - } - private static ParseTree parse__gen37(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[34][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(90, "_gen37")); - ctx.nonterminal = "_gen37"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(90).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(90).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 143) { - /* $_gen37 = :comma $map_kv $_gen37 */ - ctx.rule = rules.get(143); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); - tree.setListSeparator(next); - subtree = parse_map_kv(ctx); - tree.add(subtree); - subtree = parse__gen37(ctx); - tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "map", + current, + nonterminal_first.get(75), + rules.get(32) + )); } - public ParseTree parse_cmd_param(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_map_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_cmd_param(ctx); + return parse_map_kv(ctx); } - private static ParseTree parse_cmd_param(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_map_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[35][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(91, "cmd_param")); - ctx.nonterminal = "cmd_param"; - tree.setList(false); + int rule = (current != null) ? table[26][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(82, "map_kv")); + ctx.nonterminal = "map_kv"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "cmd_param", - nonterminal_first.get(91), - nonterminal_rules.get(91) + "map_kv", + nonterminal_first.get(82), + nonterminal_rules.get(82) )); } - if (rule == 40) { - /* $cmd_param = :cmd_param_start $_gen11 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 ) */ - ctx.rule = rules.get(40); + if (rule == 38) { + /* $map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 ) */ + ctx.rule = rules.get(38); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("attributes", 1); - parameters.put("expr", 2); - tree.setAstTransformation(new AstTransformNodeCreator("CommandParameter", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PARAM_START); - tree.add(next); - subtree = parse__gen11(ctx); - tree.add(subtree); + parameters.put("key", 0); + parameters.put("value", 2); + tree.setAstTransformation(new AstTransformNodeCreator("MapLiteralKv", parameters)); subtree = parse_e(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_CMD_PARAM_END); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); tree.add(next); + subtree = parse_e(ctx); + tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "cmd_param", + "map_kv", current, - nonterminal_first.get(91), - rules.get(40) + nonterminal_first.get(82), + rules.get(38) )); } - public ParseTree parse_while_loop(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_mapping(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_while_loop(ctx); + return parse_mapping(ctx); } - private static ParseTree parse_while_loop(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_mapping(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[36][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(92, "while_loop")); - ctx.nonterminal = "while_loop"; - tree.setList(false); + int rule = (current != null) ? table[7][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(63, "mapping")); + ctx.nonterminal = "mapping"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "while_loop", - nonterminal_first.get(92), - nonterminal_rules.get(92) + "mapping", + nonterminal_first.get(63), + nonterminal_rules.get(63) )); } - if (rule == 103) { - /* $while_loop = :while :lparen $e :rparen :lbrace $_gen19 :rbrace -> WhileLoop( expression=$2, body=$5 ) */ - ctx.rule = rules.get(103); + if (rule == 58) { + /* $mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 ) */ + ctx.rule = rules.get(58); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("expression", 2); - parameters.put("body", 5); - tree.setAstTransformation(new AstTransformNodeCreator("WhileLoop", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_WHILE); + parameters.put("key", 0); + parameters.put("value", 2); + tree.setAstTransformation(new AstTransformNodeCreator("IOMapping", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); tree.add(next); subtree = parse_e(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen19(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "while_loop", + "mapping", current, - nonterminal_first.get(92), - rules.get(103) + nonterminal_first.get(63), + rules.get(58) )); } - public ParseTree parse_workflow_or_task(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_workflow_or_task(ctx); + return parse_meta(ctx); } - private static ParseTree parse_workflow_or_task(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_meta(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[37][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(93, "workflow_or_task")); - ctx.nonterminal = "workflow_or_task"; - tree.setList(false); + int rule = (current != null) ? table[29][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(85, "meta")); + ctx.nonterminal = "meta"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "workflow_or_task", - nonterminal_first.get(93), - nonterminal_rules.get(93) + "meta", + nonterminal_first.get(85), + nonterminal_rules.get(85) )); } - if (rule == 9) { - /* $workflow_or_task = $workflow */ - ctx.rule = rules.get(9); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_workflow(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 10) { - /* $workflow_or_task = $task */ - ctx.rule = rules.get(10); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_task(ctx); + if (rule == 30) { + /* $meta = :meta $map -> Meta( map=$1 ) */ + ctx.rule = rules.get(30); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("Meta", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_META); + tree.add(next); + subtree = parse_map(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "workflow_or_task", + "meta", current, - nonterminal_first.get(93), - rules.get(10) + nonterminal_first.get(85), + rules.get(30) )); } - public ParseTree parse_wf_output(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_object_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_wf_output(ctx); + return parse_object_kv(ctx); } - private static ParseTree parse_wf_output(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_object_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[38][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(94, "wf_output")); - ctx.nonterminal = "wf_output"; - tree.setList(false); + int rule = (current != null) ? table[58][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(114, "object_kv")); + ctx.nonterminal = "object_kv"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "wf_output", - nonterminal_first.get(94), - nonterminal_rules.get(94) + "object_kv", + nonterminal_first.get(114), + nonterminal_rules.get(114) )); } - if (rule == 101) { - /* $wf_output = :fqn $_gen29 -> WorkflowOutput( fqn=$0, wildcard=$1 ) */ - ctx.rule = rules.get(101); + if (rule == 74) { + /* $object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 ) */ + ctx.rule = rules.get(74); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("fqn", 0); - parameters.put("wildcard", 1); - tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutput", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_FQN); + parameters.put("key", 0); + parameters.put("value", 2); + tree.setAstTransformation(new AstTransformNodeCreator("ObjectKV", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); tree.add(next); - subtree = parse__gen29(ctx); + subtree = parse_e(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "wf_output", + "object_kv", current, - nonterminal_first.get(94), - rules.get(101) + nonterminal_first.get(114), + rules.get(74) )); } - public ParseTree parse__gen0(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_output_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen0(ctx); + return parse_output_kv(ctx); } - private static ParseTree parse__gen0(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_output_kv(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[39][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(95, "_gen0")); - ctx.nonterminal = "_gen0"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(95).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(95).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[16][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(72, "output_kv")); + ctx.nonterminal = "output_kv"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "output_kv", + nonterminal_first.get(72), + nonterminal_rules.get(72) + )); } - if (rule == 0) { - /* $_gen0 = $import $_gen1 */ - ctx.rule = rules.get(0); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_import(ctx); + if (rule == 27) { + /* $output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 ) */ + ctx.rule = rules.get(27); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("type", 0); + parameters.put("name", 1); + parameters.put("expression", 3); + tree.setAstTransformation(new AstTransformNodeCreator("Output", parameters)); + subtree = parse_type_e(ctx); tree.add(subtree); - subtree = parse__gen1(ctx); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + tree.add(next); + subtree = parse_e(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "output_kv", + current, + nonterminal_first.get(72), + rules.get(27) + )); } - public ParseTree parse_import_namespace(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_outputs(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_import_namespace(ctx); + return parse_outputs(ctx); } - private static ParseTree parse_import_namespace(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_outputs(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[40][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(96, "import_namespace")); - ctx.nonterminal = "import_namespace"; - tree.setList(false); + int rule = (current != null) ? table[37][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(93, "outputs")); + ctx.nonterminal = "outputs"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "import_namespace", - nonterminal_first.get(96), - nonterminal_rules.get(96) + "outputs", + nonterminal_first.get(93), + nonterminal_rules.get(93) )); } - if (rule == 14) { - /* $import_namespace = :as :identifier -> $1 */ - ctx.rule = rules.get(14); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_AS); + if (rule == 26) { + /* $outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 ) */ + ctx.rule = rules.get(26); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("attributes", 2); + tree.setAstTransformation(new AstTransformNodeCreator("Outputs", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_OUTPUT); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen7(ctx); + tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "import_namespace", + "outputs", current, - nonterminal_first.get(96), - rules.get(14) + nonterminal_first.get(93), + rules.get(26) )); } - public ParseTree parse__gen17(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_parameter_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen17(ctx); + return parse_parameter_meta(ctx); } - private static ParseTree parse__gen17(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_parameter_meta(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[41][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(97, "_gen17")); - ctx.nonterminal = "_gen17"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(97).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(97).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[1][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(57, "parameter_meta")); + ctx.nonterminal = "parameter_meta"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "parameter_meta", + nonterminal_first.get(57), + nonterminal_rules.get(57) + )); } - if (rule == 57) { - /* $_gen17 = $postfix_quantifier */ - ctx.rule = rules.get(57); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_postfix_quantifier(ctx); + if (rule == 29) { + /* $parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 ) */ + ctx.rule = rules.get(29); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("ParameterMeta", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_PARAMETER_META); + tree.add(next); + subtree = parse_map(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "parameter_meta", + current, + nonterminal_first.get(57), + rules.get(29) + )); } - public ParseTree parse_map(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_runtime(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_map(ctx); + return parse_runtime(ctx); } - private static ParseTree parse_map(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_runtime(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[42][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(98, "map")); - ctx.nonterminal = "map"; - tree.setList(false); + int rule = (current != null) ? table[38][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(94, "runtime")); + ctx.nonterminal = "runtime"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "map", - nonterminal_first.get(98), - nonterminal_rules.get(98) + "runtime", + nonterminal_first.get(94), + nonterminal_rules.get(94) )); } - if (rule == 55) { - /* $map = :lbrace $_gen15 :rbrace -> $1 */ - ctx.rule = rules.get(55); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + if (rule == 28) { + /* $runtime = :runtime $map -> Runtime( map=$1 ) */ + ctx.rule = rules.get(28); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("Runtime", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RUNTIME); tree.add(next); - subtree = parse__gen15(ctx); + subtree = parse_map(ctx); tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "map", + "runtime", current, - nonterminal_first.get(98), - rules.get(55) + nonterminal_first.get(94), + rules.get(28) )); } - public ParseTree parse__gen14(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_scatter(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen14(ctx); + return parse_scatter(ctx); } - private static ParseTree parse__gen14(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_scatter(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[43][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(99, "_gen14")); - ctx.nonterminal = "_gen14"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(99).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(99).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[20][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(76, "scatter")); + ctx.nonterminal = "scatter"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "scatter", + nonterminal_first.get(76), + nonterminal_rules.get(76) + )); } - if (rule == 43) { - /* $_gen14 = $output_kv $_gen14 */ - ctx.rule = rules.get(43); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_output_kv(ctx); + if (rule == 73) { + /* $scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 ) */ + ctx.rule = rules.get(73); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("item", 2); + parameters.put("collection", 4); + parameters.put("body", 7); + tree.setAstTransformation(new AstTransformNodeCreator("Scatter", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_SCATTER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IN); + tree.add(next); + subtree = parse_e(ctx); tree.add(subtree); - subtree = parse__gen14(ctx); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen10(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + tree.add(next); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "scatter", + current, + nonterminal_first.get(76), + rules.get(73) + )); } - public ParseTree parse__gen11(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_sections(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen11(ctx); + return parse_sections(ctx); } - private static ParseTree parse__gen11(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_sections(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[44][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(100, "_gen11")); - ctx.nonterminal = "_gen11"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(100).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(100).contains(terminal_map.get(current.getId())) ) { + int rule = (current != null) ? table[45][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(101, "sections")); + ctx.nonterminal = "sections"; + if (current == null) { + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "sections", + nonterminal_first.get(101), + nonterminal_rules.get(101) + )); + } + if (rule == 13) { + /* $sections = $command */ + ctx.rule = rules.get(13); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_command(ctx); + tree.add(subtree); return tree; } - if (current == null) { + else if (rule == 14) { + /* $sections = $outputs */ + ctx.rule = rules.get(14); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_outputs(ctx); + tree.add(subtree); return tree; } - if (rule == 36) { - /* $_gen11 = $cmd_param_kv $_gen12 */ - ctx.rule = rules.get(36); + else if (rule == 15) { + /* $sections = $runtime */ + ctx.rule = rules.get(15); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_cmd_param_kv(ctx); + subtree = parse_runtime(ctx); tree.add(subtree); - subtree = parse__gen12(ctx); + return tree; + } + else if (rule == 16) { + /* $sections = $parameter_meta */ + ctx.rule = rules.get(16); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_parameter_meta(ctx); tree.add(subtree); return tree; } - return tree; + else if (rule == 17) { + /* $sections = $meta */ + ctx.rule = rules.get(17); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_meta(ctx); + tree.add(subtree); + return tree; + } + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "sections", + current, + nonterminal_first.get(101), + rules.get(17) + )); } public ParseTree parse_setter(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); @@ -4702,20 +4550,19 @@ private static ParseTree parse_setter(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[45][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(101, "setter")); + int rule = (current != null) ? table[30][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(86, "setter")); ctx.nonterminal = "setter"; - tree.setList(false); if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( "setter", - nonterminal_first.get(101), - nonterminal_rules.get(101) + nonterminal_first.get(86), + nonterminal_rules.get(86) )); } - if (rule == 62) { + if (rule == 37) { /* $setter = :equal $e -> $1 */ - ctx.rule = rules.get(62); + ctx.rule = rules.get(37); tree.setAstTransformation(new AstTransformSubstitution(1)); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); tree.add(next); @@ -4726,1165 +4573,646 @@ private static ParseTree parse_setter(ParserContext ctx) throws SyntaxError { throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( "setter", current, - nonterminal_first.get(101), - rules.get(62) + nonterminal_first.get(86), + rules.get(37) )); } - public ParseTree parse_mapping(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_task(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_mapping(ctx); + return parse_task(ctx); } - private static ParseTree parse_mapping(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_task(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[46][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(102, "mapping")); - ctx.nonterminal = "mapping"; - tree.setList(false); + int rule = (current != null) ? table[6][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(62, "task")); + ctx.nonterminal = "task"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "mapping", - nonterminal_first.get(102), - nonterminal_rules.get(102) + "task", + nonterminal_first.get(62), + nonterminal_rules.get(62) )); } - if (rule == 92) { - /* $mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 ) */ - ctx.rule = rules.get(92); + if (rule == 12) { + /* $task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 ) */ + ctx.rule = rules.get(12); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 0); - parameters.put("value", 2); - tree.setAstTransformation(new AstTransformNodeCreator("IOMapping", parameters)); + parameters.put("name", 1); + parameters.put("declarations", 3); + parameters.put("sections", 4); + tree.setAstTransformation(new AstTransformNodeCreator("Task", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_TASK); + tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); tree.add(next); - subtree = parse_e(ctx); + subtree = parse__gen3(ctx); + tree.add(subtree); + subtree = parse__gen4(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "mapping", + "task", current, - nonterminal_first.get(102), - rules.get(92) + nonterminal_first.get(62), + rules.get(12) )); } - public ParseTree parse__gen29(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_body_element(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen29(ctx); + return parse_wf_body_element(ctx); } - private static ParseTree parse__gen29(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_body_element(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[47][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(103, "_gen29")); - ctx.nonterminal = "_gen29"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(103).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(103).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[24][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(80, "wf_body_element")); + ctx.nonterminal = "wf_body_element"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "wf_body_element", + nonterminal_first.get(80), + nonterminal_rules.get(80) + )); } - if (rule == 99) { - /* $_gen29 = $wf_output_wildcard */ - ctx.rule = rules.get(99); + if (rule == 41) { + /* $wf_body_element = $call */ + ctx.rule = rules.get(41); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_output_wildcard(ctx); + subtree = parse_call(ctx); tree.add(subtree); return tree; } - return tree; - } - public ParseTree parse__gen34(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen34(ctx); - } - private static ParseTree parse__gen34(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[48][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(104, "_gen34")); - ctx.nonterminal = "_gen34"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(104).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(104).contains(terminal_map.get(current.getId())) ) { + else if (rule == 42) { + /* $wf_body_element = $declaration */ + ctx.rule = rules.get(42); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_declaration(ctx); + tree.add(subtree); return tree; } - if (current == null) { + else if (rule == 43) { + /* $wf_body_element = $while_loop */ + ctx.rule = rules.get(43); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_while_loop(ctx); + tree.add(subtree); return tree; } - if (rule == 136) { - /* $_gen34 = $object_kv $_gen35 */ - ctx.rule = rules.get(136); + else if (rule == 44) { + /* $wf_body_element = $if_stmt */ + ctx.rule = rules.get(44); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_object_kv(ctx); - tree.add(subtree); - subtree = parse__gen35(ctx); + subtree = parse_if_stmt(ctx); tree.add(subtree); return tree; } - return tree; - } - public ParseTree parse__gen32(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen32(ctx); - } - private static ParseTree parse__gen32(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[49][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(105, "_gen32")); - ctx.nonterminal = "_gen32"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(105).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(105).contains(terminal_map.get(current.getId())) ) { + else if (rule == 45) { + /* $wf_body_element = $scatter */ + ctx.rule = rules.get(45); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_scatter(ctx); + tree.add(subtree); return tree; } - if (current == null) { + else if (rule == 46) { + /* $wf_body_element = $wf_outputs */ + ctx.rule = rules.get(46); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_wf_outputs(ctx); + tree.add(subtree); return tree; } - if (rule == 129) { - /* $_gen32 = $e $_gen33 */ - ctx.rule = rules.get(129); + else if (rule == 47) { + /* $wf_body_element = $wf_parameter_meta */ + ctx.rule = rules.get(47); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_e(ctx); + subtree = parse_wf_parameter_meta(ctx); tree.add(subtree); - subtree = parse__gen33(ctx); + return tree; + } + else if (rule == 48) { + /* $wf_body_element = $wf_meta */ + ctx.rule = rules.get(48); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_wf_meta(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "wf_body_element", + current, + nonterminal_first.get(80), + rules.get(48) + )); } - public ParseTree parse_call_input(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_call_input(ctx); + return parse_wf_meta(ctx); } - private static ParseTree parse_call_input(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_meta(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[50][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(106, "call_input")); - ctx.nonterminal = "call_input"; - tree.setList(false); + int rule = (current != null) ? table[13][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(69, "wf_meta")); + ctx.nonterminal = "wf_meta"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "call_input", - nonterminal_first.get(106), - nonterminal_rules.get(106) + "wf_meta", + nonterminal_first.get(69), + nonterminal_rules.get(69) )); } - if (rule == 91) { - /* $call_input = :input :colon $_gen25 -> Inputs( map=$2 ) */ - ctx.rule = rules.get(91); + if (rule == 70) { + /* $wf_meta = :meta $map -> Meta( map=$1 ) */ + ctx.rule = rules.get(70); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("map", 2); - tree.setAstTransformation(new AstTransformNodeCreator("Inputs", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_INPUT); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("Meta", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_META); tree.add(next); - subtree = parse__gen25(ctx); + subtree = parse_map(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "call_input", + "wf_meta", current, - nonterminal_first.get(106), - rules.get(91) + nonterminal_first.get(69), + rules.get(70) )); } - public ParseTree parse_document(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_output(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_document(ctx); + return parse_wf_output(ctx); } - private static ParseTree parse_document(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_output(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[51][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(107, "document")); - ctx.nonterminal = "document"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(107).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(107).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[55][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(111, "wf_output")); + ctx.nonterminal = "wf_output"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "wf_output", + nonterminal_first.get(111), + nonterminal_rules.get(111) + )); } - if (rule == 8) { - /* $document = $_gen0 $_gen2 -> Document( imports=$0, definitions=$1 ) */ - ctx.rule = rules.get(8); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("imports", 0); - parameters.put("definitions", 1); - tree.setAstTransformation(new AstTransformNodeCreator("Document", parameters)); - subtree = parse__gen0(ctx); + if (rule == 62) { + /* $wf_output = $wf_output_declaration_syntax */ + ctx.rule = rules.get(62); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_wf_output_declaration_syntax(ctx); tree.add(subtree); - subtree = parse__gen2(ctx); + return tree; + } + else if (rule == 63) { + /* $wf_output = $wf_output_wildcard_syntax */ + ctx.rule = rules.get(63); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_wf_output_wildcard_syntax(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "wf_output", + current, + nonterminal_first.get(111), + rules.get(63) + )); } - public ParseTree parse_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_output_declaration_syntax(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_kv(ctx); + return parse_wf_output_declaration_syntax(ctx); } - private static ParseTree parse_kv(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_output_declaration_syntax(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[52][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(108, "kv")); - ctx.nonterminal = "kv"; - tree.setList(false); + int rule = (current != null) ? table[10][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(66, "wf_output_declaration_syntax")); + ctx.nonterminal = "wf_output_declaration_syntax"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "kv", - nonterminal_first.get(108), - nonterminal_rules.get(108) + "wf_output_declaration_syntax", + nonterminal_first.get(66), + nonterminal_rules.get(66) )); } - if (rule == 56) { - /* $kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 ) */ - ctx.rule = rules.get(56); + if (rule == 64) { + /* $wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 ) */ + ctx.rule = rules.get(64); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 0); - parameters.put("value", 2); - tree.setAstTransformation(new AstTransformNodeCreator("RuntimeAttribute", parameters)); + parameters.put("type", 0); + parameters.put("name", 1); + parameters.put("expression", 3); + tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutputDeclaration", parameters)); + subtree = parse_type_e(ctx); + tree.add(subtree); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_EQUAL); tree.add(next); subtree = parse_e(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "kv", + "wf_output_declaration_syntax", current, - nonterminal_first.get(108), - rules.get(56) + nonterminal_first.get(66), + rules.get(64) )); } - public ParseTree parse_map_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_output_wildcard(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_map_kv(ctx); + return parse_wf_output_wildcard(ctx); } - private static ParseTree parse_map_kv(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_output_wildcard(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; int rule = (current != null) ? table[53][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(109, "map_kv")); - ctx.nonterminal = "map_kv"; - tree.setList(false); + ParseTree tree = new ParseTree(new NonTerminal(109, "wf_output_wildcard")); + ctx.nonterminal = "wf_output_wildcard"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "map_kv", + "wf_output_wildcard", nonterminal_first.get(109), nonterminal_rules.get(109) )); } - if (rule == 65) { - /* $map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 ) */ - ctx.rule = rules.get(65); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 0); - parameters.put("value", 2); - tree.setAstTransformation(new AstTransformNodeCreator("MapLiteralKv", parameters)); - subtree = parse_e(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); + if (rule == 68) { + /* $wf_output_wildcard = :dot :asterisk -> $1 */ + ctx.rule = rules.get(68); + tree.setAstTransformation(new AstTransformSubstitution(1)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_DOT); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_ASTERISK); tree.add(next); - subtree = parse_e(ctx); - tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "map_kv", + "wf_output_wildcard", current, nonterminal_first.get(109), - rules.get(65) + rules.get(68) )); } - public ParseTree parse_sections(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_output_wildcard_syntax(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_sections(ctx); + return parse_wf_output_wildcard_syntax(ctx); } - private static ParseTree parse_sections(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_output_wildcard_syntax(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[54][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(110, "sections")); - ctx.nonterminal = "sections"; - tree.setList(false); + int rule = (current != null) ? table[34][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(90, "wf_output_wildcard_syntax")); + ctx.nonterminal = "wf_output_wildcard_syntax"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "sections", - nonterminal_first.get(110), - nonterminal_rules.get(110) + "wf_output_wildcard_syntax", + nonterminal_first.get(90), + nonterminal_rules.get(90) )); } - if (rule == 24) { - /* $sections = $command */ - ctx.rule = rules.get(24); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_command(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 25) { - /* $sections = $outputs */ - ctx.rule = rules.get(25); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_outputs(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 26) { - /* $sections = $runtime */ - ctx.rule = rules.get(26); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_runtime(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 27) { - /* $sections = $parameter_meta */ - ctx.rule = rules.get(27); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_parameter_meta(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 28) { - /* $sections = $meta */ - ctx.rule = rules.get(28); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_meta(ctx); + if (rule == 67) { + /* $wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 ) */ + ctx.rule = rules.get(67); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("fqn", 0); + parameters.put("wildcard", 1); + tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutputWildcard", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_FQN); + tree.add(next); + subtree = parse__gen16(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "sections", + "wf_output_wildcard_syntax", current, - nonterminal_first.get(110), - rules.get(28) + nonterminal_first.get(90), + rules.get(67) )); } - public ParseTree parse__gen30(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen30(ctx); - } - private static ParseTree parse__gen30(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[55][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(111, "_gen30")); - ctx.nonterminal = "_gen30"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(111).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(111).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 107) { - /* $_gen30 = $type_e $_gen31 */ - ctx.rule = rules.get(107); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_type_e(ctx); - tree.add(subtree); - subtree = parse__gen31(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse__gen2(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen2(ctx); - } - private static ParseTree parse__gen2(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[56][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(112, "_gen2")); - ctx.nonterminal = "_gen2"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(112).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(112).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 4) { - /* $_gen2 = $workflow_or_task $_gen3 */ - ctx.rule = rules.get(4); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_workflow_or_task(ctx); - tree.add(subtree); - subtree = parse__gen3(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse__gen10(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen10(ctx); - } - private static ParseTree parse__gen10(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[57][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(113, "_gen10")); - ctx.nonterminal = "_gen10"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(113).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(113).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 30) { - /* $_gen10 = $command_part $_gen10 */ - ctx.rule = rules.get(30); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_command_part(ctx); - tree.add(subtree); - subtree = parse__gen10(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse_declaration(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_outputs(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_declaration(ctx); + return parse_wf_outputs(ctx); } - private static ParseTree parse_declaration(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_outputs(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[58][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(114, "declaration")); - ctx.nonterminal = "declaration"; - tree.setList(false); + int rule = (current != null) ? table[4][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(60, "wf_outputs")); + ctx.nonterminal = "wf_outputs"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "declaration", - nonterminal_first.get(114), - nonterminal_rules.get(114) + "wf_outputs", + nonterminal_first.get(60), + nonterminal_rules.get(60) )); } if (rule == 61) { - /* $declaration = $type_e $_gen17 :identifier $_gen18 -> Declaration( type=$0, postfix=$1, name=$2, expression=$3 ) */ + /* $wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 ) */ ctx.rule = rules.get(61); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("type", 0); - parameters.put("postfix", 1); - parameters.put("name", 2); - parameters.put("expression", 3); - tree.setAstTransformation(new AstTransformNodeCreator("Declaration", parameters)); - subtree = parse_type_e(ctx); - tree.add(subtree); - subtree = parse__gen17(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + parameters.put("outputs", 2); + tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutputs", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_OUTPUT); tree.add(next); - subtree = parse__gen18(ctx); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen15(ctx); tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); + tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "declaration", + "wf_outputs", current, - nonterminal_first.get(114), + nonterminal_first.get(60), rules.get(61) )); } - public ParseTree parse__gen19(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_wf_parameter_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen19(ctx); + return parse_wf_parameter_meta(ctx); } - private static ParseTree parse__gen19(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_wf_parameter_meta(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[59][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(115, "_gen19")); - ctx.nonterminal = "_gen19"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(115).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(115).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[43][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(99, "wf_parameter_meta")); + ctx.nonterminal = "wf_parameter_meta"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "wf_parameter_meta", + nonterminal_first.get(99), + nonterminal_rules.get(99) + )); } - if (rule == 66) { - /* $_gen19 = $wf_body_element $_gen20 */ - ctx.rule = rules.get(66); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_body_element(ctx); - tree.add(subtree); - subtree = parse__gen20(ctx); + if (rule == 69) { + /* $wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 ) */ + ctx.rule = rules.get(69); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("map", 1); + tree.setAstTransformation(new AstTransformNodeCreator("ParameterMeta", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_PARAMETER_META); + tree.add(next); + subtree = parse_map(ctx); tree.add(subtree); return tree; } - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( + "wf_parameter_meta", + current, + nonterminal_first.get(99), + rules.get(69) + )); } - public ParseTree parse_wf_outputs(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_while_loop(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_wf_outputs(ctx); + return parse_while_loop(ctx); } - private static ParseTree parse_wf_outputs(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_while_loop(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[60][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(116, "wf_outputs")); - ctx.nonterminal = "wf_outputs"; - tree.setList(false); + int rule = (current != null) ? table[2][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(58, "while_loop")); + ctx.nonterminal = "while_loop"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "wf_outputs", - nonterminal_first.get(116), - nonterminal_rules.get(116) + "while_loop", + nonterminal_first.get(58), + nonterminal_rules.get(58) )); } - if (rule == 98) { - /* $wf_outputs = :output :lbrace $_gen27 :rbrace -> WorkflowOutputs( outputs=$2 ) */ - ctx.rule = rules.get(98); + if (rule == 71) { + /* $while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 ) */ + ctx.rule = rules.get(71); LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("outputs", 2); - tree.setAstTransformation(new AstTransformNodeCreator("WorkflowOutputs", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_OUTPUT); + parameters.put("expression", 2); + parameters.put("body", 5); + tree.setAstTransformation(new AstTransformNodeCreator("WhileLoop", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_WHILE); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LPAREN); + tree.add(next); + subtree = parse_e(ctx); + tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RPAREN); tree.add(next); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); tree.add(next); - subtree = parse__gen27(ctx); + subtree = parse__gen10(ctx); tree.add(subtree); next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "wf_outputs", + "while_loop", current, - nonterminal_first.get(116), - rules.get(98) + nonterminal_first.get(58), + rules.get(71) )); } - public ParseTree parse_wf_output_wildcard(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_workflow(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_wf_output_wildcard(ctx); + return parse_workflow(ctx); } - private static ParseTree parse_wf_output_wildcard(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_workflow(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[61][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(117, "wf_output_wildcard")); - ctx.nonterminal = "wf_output_wildcard"; - tree.setList(false); + int rule = (current != null) ? table[28][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(84, "workflow")); + ctx.nonterminal = "workflow"; if (current == null) { throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "wf_output_wildcard", - nonterminal_first.get(117), - nonterminal_rules.get(117) + "workflow", + nonterminal_first.get(84), + nonterminal_rules.get(84) )); } - if (rule == 102) { - /* $wf_output_wildcard = :dot :asterisk -> $1 */ - ctx.rule = rules.get(102); - tree.setAstTransformation(new AstTransformSubstitution(1)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_DOT); + if (rule == 40) { + /* $workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 ) */ + ctx.rule = rules.get(40); + LinkedHashMap parameters = new LinkedHashMap(); + parameters.put("name", 1); + parameters.put("body", 3); + tree.setAstTransformation(new AstTransformNodeCreator("Workflow", parameters)); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_WORKFLOW); tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_ASTERISK); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); + tree.add(next); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); + tree.add(next); + subtree = parse__gen10(ctx); + tree.add(subtree); + next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); tree.add(next); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "wf_output_wildcard", + "workflow", current, - nonterminal_first.get(117), - rules.get(102) + nonterminal_first.get(84), + rules.get(40) )); } - public ParseTree parse__gen1(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { + public ParseTree parse_workflow_or_task_or_decl(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen1(ctx); + return parse_workflow_or_task_or_decl(ctx); } - private static ParseTree parse__gen1(ParserContext ctx) throws SyntaxError { + private static ParseTree parse_workflow_or_task_or_decl(ParserContext ctx) throws SyntaxError { Terminal current = ctx.tokens.current(); Terminal next; ParseTree subtree; - int rule = (current != null) ? table[62][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(118, "_gen1")); - ctx.nonterminal = "_gen1"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(118).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(118).contains(terminal_map.get(current.getId())) ) { - return tree; - } + int rule = (current != null) ? table[3][current.getId()] : -1; + ParseTree tree = new ParseTree(new NonTerminal(59, "workflow_or_task_or_decl")); + ctx.nonterminal = "workflow_or_task_or_decl"; if (current == null) { - return tree; + throw new SyntaxError(ctx.error_formatter.unexpectedEof( + "workflow_or_task_or_decl", + nonterminal_first.get(59), + nonterminal_rules.get(59) + )); } - if (rule == 1) { - /* $_gen1 = $import $_gen1 */ - ctx.rule = rules.get(1); + if (rule == 3) { + /* $workflow_or_task_or_decl = $workflow */ + ctx.rule = rules.get(3); tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_import(ctx); - tree.add(subtree); - subtree = parse__gen1(ctx); + subtree = parse_workflow(ctx); tree.add(subtree); return tree; } - return tree; - } - public ParseTree parse_runtime(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_runtime(ctx); - } - private static ParseTree parse_runtime(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[63][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(119, "runtime")); - ctx.nonterminal = "runtime"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "runtime", - nonterminal_first.get(119), - nonterminal_rules.get(119) - )); - } - if (rule == 48) { - /* $runtime = :runtime $map -> Runtime( map=$1 ) */ - ctx.rule = rules.get(48); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("map", 1); - tree.setAstTransformation(new AstTransformNodeCreator("Runtime", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RUNTIME); - tree.add(next); - subtree = parse_map(ctx); + else if (rule == 4) { + /* $workflow_or_task_or_decl = $task */ + ctx.rule = rules.get(4); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_task(ctx); tree.add(subtree); return tree; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "runtime", - current, - nonterminal_first.get(119), - rules.get(48) - )); - } - public ParseTree parse_object_kv(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_object_kv(ctx); - } - private static ParseTree parse_object_kv(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[64][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(120, "object_kv")); - ctx.nonterminal = "object_kv"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "object_kv", - nonterminal_first.get(120), - nonterminal_rules.get(120) - )); - } - if (rule == 106) { - /* $object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 ) */ - ctx.rule = rules.get(106); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("key", 0); - parameters.put("value", 2); - tree.setAstTransformation(new AstTransformNodeCreator("ObjectKV", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COLON); - tree.add(next); - subtree = parse_e(ctx); + else if (rule == 5) { + /* $workflow_or_task_or_decl = $declaration */ + ctx.rule = rules.get(5); + tree.setAstTransformation(new AstTransformSubstitution(0)); + subtree = parse_declaration(ctx); tree.add(subtree); return tree; } throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "object_kv", + "workflow_or_task_or_decl", current, - nonterminal_first.get(120), - rules.get(106) + nonterminal_first.get(59), + rules.get(5) )); } - public ParseTree parse__gen4(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen4(ctx); - } - private static ParseTree parse__gen4(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[65][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(121, "_gen4")); - ctx.nonterminal = "_gen4"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(121).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(121).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; + /* Section: Lexer */ + private Map> regex = null; + private interface LexerOutput {} + private class LexerRegexOutput implements LexerOutput { + public WdlTerminalIdentifier terminal; + public int group; + public Method function; + LexerRegexOutput(WdlTerminalIdentifier terminal, int group, Method function) { + this.terminal = terminal; + this.group = group; + this.function = function; } - if (rule == 11) { - /* $_gen4 = $import_namespace */ - ctx.rule = rules.get(11); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_import_namespace(ctx); - tree.add(subtree); - return tree; + public String toString() { + return String.format("", this.terminal, this.group, this.function); } - return tree; } - public ParseTree parse__gen16(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen16(ctx); + private class LexerStackPush implements LexerOutput { + public String mode; + LexerStackPush(String mode) { + this.mode = mode; + } } - private static ParseTree parse__gen16(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[67][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(123, "_gen16")); - ctx.nonterminal = "_gen16"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(123).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(123).contains(terminal_map.get(current.getId())) ) { - return tree; + private class LexerAction implements LexerOutput { + public String action; + LexerAction(String action) { + this.action = action; } - if (current == null) { - return tree; + } + private class HermesRegex { + public Pattern pattern; + public List outputs; + HermesRegex(Pattern pattern, List outputs) { + this.pattern = pattern; + this.outputs = outputs; } - if (rule == 52) { - /* $_gen16 = $kv $_gen16 */ - ctx.rule = rules.get(52); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_kv(ctx); - tree.add(subtree); - subtree = parse__gen16(ctx); - tree.add(subtree); - return tree; + public String toString() { + return String.format("", this.pattern, this.outputs); } - return tree; - } - public ParseTree parse_meta(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_meta(ctx); } - private static ParseTree parse_meta(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[68][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(124, "meta")); - ctx.nonterminal = "meta"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "meta", - nonterminal_first.get(124), - nonterminal_rules.get(124) - )); + private class LineColumn { + public int line, col; + public LineColumn(int line, int col) { + this.line = line; + this.col = col; } - if (rule == 50) { - /* $meta = :meta $map -> Meta( map=$1 ) */ - ctx.rule = rules.get(50); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("map", 1); - tree.setAstTransformation(new AstTransformNodeCreator("Meta", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_META); - tree.add(next); - subtree = parse_map(ctx); - tree.add(subtree); - return tree; + public String toString() { + return String.format("", this.line, this.col); } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "meta", - current, - nonterminal_first.get(124), - rules.get(50) - )); - } - public ParseTree parse_workflow(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_workflow(ctx); } - private static ParseTree parse_workflow(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[69][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(125, "workflow")); - ctx.nonterminal = "workflow"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "workflow", - nonterminal_first.get(125), - nonterminal_rules.get(125) - )); + private class LexerContext { + public String string; + public String resource; + public int line; + public int col; + public Stack stack; + public Object context; + public List terminals; + LexerContext(String string, String resource) { + this.string = string; + this.resource = resource; + this.line = 1; + this.col = 1; + this.stack = new Stack(); + this.stack.push("default"); + this.terminals = new ArrayList(); } - if (rule == 70) { - /* $workflow = :workflow :identifier :lbrace $_gen19 :rbrace -> Workflow( name=$1, body=$3 ) */ - ctx.rule = rules.get(70); - LinkedHashMap parameters = new LinkedHashMap(); - parameters.put("name", 1); - parameters.put("body", 3); - tree.setAstTransformation(new AstTransformNodeCreator("Workflow", parameters)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_WORKFLOW); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_IDENTIFIER); - tree.add(next); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_LBRACE); - tree.add(next); - subtree = parse__gen19(ctx); - tree.add(subtree); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_RBRACE); - tree.add(next); - return tree; + public void advance(String match) { + LineColumn lc = advance_line_col(match, match.length()); + this.line = lc.line; + this.col = lc.col; + this.string = this.string.substring(match.length()); + } + public LineColumn advance_line_col(String match, int length) { + LineColumn lc = new LineColumn(this.line, this.col); + for (int i = 0; i < length && i < match.length(); i++) { + if (match.charAt(i) == '\n') { + lc.line += 1; + lc.col = 1; + } else { + lc.col += 1; + } + } + return lc; } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "workflow", - current, - nonterminal_first.get(125), - rules.get(70) - )); } - public ParseTree parse_wf_body_element(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse_wf_body_element(ctx); - } - private static ParseTree parse_wf_body_element(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[70][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(126, "wf_body_element")); - ctx.nonterminal = "wf_body_element"; - tree.setList(false); - if (current == null) { - throw new SyntaxError(ctx.error_formatter.unexpectedEof( - "wf_body_element", - nonterminal_first.get(126), - nonterminal_rules.get(126) - )); - } - if (rule == 71) { - /* $wf_body_element = $call */ - ctx.rule = rules.get(71); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_call(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 72) { - /* $wf_body_element = $declaration */ - ctx.rule = rules.get(72); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_declaration(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 73) { - /* $wf_body_element = $while_loop */ - ctx.rule = rules.get(73); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_while_loop(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 74) { - /* $wf_body_element = $if_stmt */ - ctx.rule = rules.get(74); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_if_stmt(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 75) { - /* $wf_body_element = $scatter */ - ctx.rule = rules.get(75); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_scatter(ctx); - tree.add(subtree); - return tree; - } - else if (rule == 76) { - /* $wf_body_element = $wf_outputs */ - ctx.rule = rules.get(76); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_outputs(ctx); - tree.add(subtree); - return tree; - } - throw new SyntaxError(ctx.error_formatter.unexpectedSymbol( - "wf_body_element", - current, - nonterminal_first.get(126), - rules.get(76) - )); - } - public ParseTree parse__gen8(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen8(ctx); - } - private static ParseTree parse__gen8(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[71][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(127, "_gen8")); - ctx.nonterminal = "_gen8"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(127).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(127).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 20) { - /* $_gen8 = $sections $_gen8 */ - ctx.rule = rules.get(20); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_sections(ctx); - tree.add(subtree); - subtree = parse__gen8(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse__gen21(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen21(ctx); - } - private static ParseTree parse__gen21(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[72][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(128, "_gen21")); - ctx.nonterminal = "_gen21"; - tree.setList(false); - if ( current != null && - !nonterminal_first.get(128).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(128).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 77) { - /* $_gen21 = $alias */ - ctx.rule = rules.get(77); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_alias(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse__gen27(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen27(ctx); - } - private static ParseTree parse__gen27(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[73][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(129, "_gen27")); - ctx.nonterminal = "_gen27"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(129).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(129).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 94) { - /* $_gen27 = $wf_output $_gen28 */ - ctx.rule = rules.get(94); - tree.setAstTransformation(new AstTransformSubstitution(0)); - subtree = parse_wf_output(ctx); - tree.add(subtree); - subtree = parse__gen28(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - public ParseTree parse__gen31(List tokens, SyntaxErrorFormatter error_formatter) throws SyntaxError { - ParserContext ctx = new ParserContext(new TokenStream(tokens), error_formatter); - return parse__gen31(ctx); - } - private static ParseTree parse__gen31(ParserContext ctx) throws SyntaxError { - Terminal current = ctx.tokens.current(); - Terminal next; - ParseTree subtree; - int rule = (current != null) ? table[74][current.getId()] : -1; - ParseTree tree = new ParseTree( new NonTerminal(130, "_gen31")); - ctx.nonterminal = "_gen31"; - tree.setList(true); - if ( current != null && - !nonterminal_first.get(130).contains(terminal_map.get(current.getId())) && - nonterminal_follow.get(130).contains(terminal_map.get(current.getId())) ) { - return tree; - } - if (current == null) { - return tree; - } - if (rule == 108) { - /* $_gen31 = :comma $type_e $_gen31 */ - ctx.rule = rules.get(108); - tree.setAstTransformation(new AstTransformSubstitution(0)); - next = expect(ctx, WdlTerminalIdentifier.TERMINAL_COMMA); - tree.add(next); - tree.setListSeparator(next); - subtree = parse_type_e(ctx); - tree.add(subtree); - subtree = parse__gen31(ctx); - tree.add(subtree); - return tree; - } - return tree; - } - /* Section: Lexer */ - private Map> regex = null; - private interface LexerOutput {} - private class LexerRegexOutput implements LexerOutput { - public WdlTerminalIdentifier terminal; - public int group; - public Method function; - LexerRegexOutput(WdlTerminalIdentifier terminal, int group, Method function) { - this.terminal = terminal; - this.group = group; - this.function = function; - } - public String toString() { - return String.format("", this.terminal, this.group, this.function); - } - } - private class LexerStackPush implements LexerOutput { - public String mode; - LexerStackPush(String mode) { - this.mode = mode; - } - } - private class LexerAction implements LexerOutput { - public String action; - LexerAction(String action) { - this.action = action; - } - } - private class HermesRegex { - public Pattern pattern; - public List outputs; - HermesRegex(Pattern pattern, List outputs) { - this.pattern = pattern; - this.outputs = outputs; - } - public String toString() { - return String.format("", this.pattern, this.outputs); - } - } - private class LineColumn { - public int line, col; - public LineColumn(int line, int col) { - this.line = line; - this.col = col; - } - public String toString() { - return String.format("", this.line, this.col); - } - } - private class LexerContext { - public String string; - public String resource; - public int line; - public int col; - public Stack stack; - public Object context; - public List terminals; - LexerContext(String string, String resource) { - this.string = string; - this.resource = resource; - this.line = 1; - this.col = 1; - this.stack = new Stack(); - this.stack.push("default"); - this.terminals = new ArrayList(); - } - public void advance(String match) { - LineColumn lc = advance_line_col(match, match.length()); - this.line = lc.line; - this.col = lc.col; - this.string = this.string.substring(match.length()); - } - public LineColumn advance_line_col(String match, int length) { - LineColumn lc = new LineColumn(this.line, this.col); - for (int i = 0; i < length && i < match.length(); i++) { - if (match.charAt(i) == '\n') { - lc.line += 1; - lc.col = 1; - } else { - lc.col += 1; - } - } - return lc; - } - } - private void emit(LexerContext lctx, TerminalIdentifier terminal, String source_string, int line, int col) { - lctx.terminals.add(new Terminal(terminal.id(), terminal.string(), source_string, lctx.resource, line, col)); + private void emit(LexerContext lctx, TerminalIdentifier terminal, String source_string, int line, int col) { + lctx.terminals.add(new Terminal(terminal.id(), terminal.string(), source_string, lctx.resource, line, col)); } /** * The default function that is called on every regex match during lexical analysis. @@ -5923,7 +5251,7 @@ public void output(LexerContext ctx, TerminalIdentifier terminal, String source_ } default_action(ctx, terminal, source_string, line, col); } -public void unescape(LexerContext ctx, TerminalIdentifier terminal, String source_string, int line, int col) { +public void wdl_unescape(LexerContext ctx, TerminalIdentifier terminal, String source_string, int line, int col) { default_action(ctx, terminal, StringEscapeUtils.unescapeJava(source_string.substring(1, source_string.length() - 1)), line, col); } /* END USER CODE */ @@ -5948,236 +5276,704 @@ private void lexer_init() throws SyntaxError { this.regex = new HashMap>(); this.regex.put("default", Arrays.asList(new HermesRegex[] { new HermesRegex( - Pattern.compile("\\s+"), + Pattern.compile("\\s+"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("/\\*(.*?)\\*/", Pattern.DOTALL), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("#.*"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("task(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_TASK, + 0, + getFunction("task") + ), + }) + ), + new HermesRegex( + Pattern.compile("(call)\\s+"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_CALL, + 1, + getFunction("default_action") + ), + new LexerStackPush("task_fqn"), + }) + ), + new HermesRegex( + Pattern.compile("workflow(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_WORKFLOW, + 0, + getFunction("workflow") + ), + }) + ), + new HermesRegex( + Pattern.compile("import(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_IMPORT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("input(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_INPUT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("output(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_OUTPUT, + 0, + getFunction("output") + ), + }) + ), + new HermesRegex( + Pattern.compile("as(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_AS, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("if(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_IF, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("while(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_WHILE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("runtime(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RUNTIME, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("scatter(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_SCATTER, + 0, + getFunction("default_action") + ), + new LexerStackPush("scatter"), + }) + ), + new HermesRegex( + Pattern.compile("command\\s*(?=<<<)"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + 0, + getFunction("default_action") + ), + new LexerStackPush("raw_command2"), + }) + ), + new HermesRegex( + Pattern.compile("command\\s*(?=\\{)"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + 0, + getFunction("default_action") + ), + new LexerStackPush("raw_command"), + }) + ), + new HermesRegex( + Pattern.compile("parameter_meta(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("meta(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_META, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_BOOLEAN, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("(object)\\s*(\\{)"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_OBJECT, + 0, + getFunction("default_action") + ), + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LBRACE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_TYPE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\\"(?>[^\\\\\\\"\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\\\""), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_STRING, + 0, + getFunction("wdl_unescape") + ), + }) + ), + new HermesRegex( + Pattern.compile("'(?>[^\\\\\\'\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*'"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_STRING, + 0, + getFunction("wdl_unescape") + ), + }) + ), + new HermesRegex( + Pattern.compile(":"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_COLON, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile(","), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_COMMA, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("=="), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOUBLE_EQUAL, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\|\\|"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOUBLE_PIPE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\&\\&"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOUBLE_AMPERSAND, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("!="), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_NOT_EQUAL, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("="), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_EQUAL, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\."), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\{"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LBRACE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\}"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RBRACE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\("), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LPAREN, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\)"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RPAREN, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\["), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LSQUARE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\]"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_RSQUARE, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\+"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_PLUS, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("\\*"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_ASTERISK, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("-"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DASH, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("/"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_SLASH, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("%"), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_PERCENT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( + Pattern.compile("<="), Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LTEQ, + 0, + getFunction("default_action") + ), }) ), new HermesRegex( - Pattern.compile("/\\*(.*?)\\*/", Pattern.DOTALL), + Pattern.compile("<"), Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_LT, + 0, + getFunction("default_action") + ), }) ), new HermesRegex( - Pattern.compile("#.*"), + Pattern.compile(">="), Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_GTEQ, + 0, + getFunction("default_action") + ), }) ), new HermesRegex( - Pattern.compile("task(?![a-zA-Z0-9_])"), + Pattern.compile(">"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_TASK, + WdlTerminalIdentifier.TERMINAL_GT, 0, - getFunction("task") + getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(call)\\s+"), + Pattern.compile("!"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_CALL, - 1, + WdlTerminalIdentifier.TERMINAL_NOT, + 0, getFunction("default_action") ), - new LexerStackPush("task_fqn"), }) ), new HermesRegex( - Pattern.compile("workflow(?![a-zA-Z0-9_])"), + Pattern.compile("\\?"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_WORKFLOW, + WdlTerminalIdentifier.TERMINAL_QMARK, 0, - getFunction("workflow") + getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("import(?![a-zA-Z0-9_])"), + Pattern.compile("-?[0-9]+\\.[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_IMPORT, + WdlTerminalIdentifier.TERMINAL_FLOAT, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("input(?![a-zA-Z0-9_])"), + Pattern.compile("[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_INPUT, + WdlTerminalIdentifier.TERMINAL_INTEGER, 0, getFunction("default_action") ), }) ), + })); + this.regex.put("wf_output", Arrays.asList(new HermesRegex[] { new HermesRegex( - Pattern.compile("output(?![a-zA-Z0-9_])"), + Pattern.compile("\\s+"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("#.*"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_OUTPUT, + WdlTerminalIdentifier.TERMINAL_TYPE, 0, - getFunction("output") + getFunction("default_action") ), + new LexerAction("pop"), + new LexerStackPush("wf_output_declaration"), }) ), new HermesRegex( - Pattern.compile("as(?![a-zA-Z0-9_])"), + Pattern.compile("\\{"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_AS, + WdlTerminalIdentifier.TERMINAL_LBRACE, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("if(?![a-zA-Z0-9_])"), + Pattern.compile("\\}"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_IF, + WdlTerminalIdentifier.TERMINAL_RBRACE, 0, getFunction("default_action") ), + new LexerAction("pop"), }) ), new HermesRegex( - Pattern.compile("while(?![a-zA-Z0-9_])"), + Pattern.compile(","), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_WHILE, + WdlTerminalIdentifier.TERMINAL_COMMA, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("runtime(?![a-zA-Z0-9_])"), + Pattern.compile("\\."), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RUNTIME, + WdlTerminalIdentifier.TERMINAL_DOT, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("scatter(?![a-zA-Z0-9_])"), + Pattern.compile("\\*"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_SCATTER, + WdlTerminalIdentifier.TERMINAL_ASTERISK, 0, getFunction("default_action") ), - new LexerStackPush("scatter"), }) ), new HermesRegex( - Pattern.compile("command\\s*(?=<<<)"), + Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*(\\.[a-zA-Z]([a-zA-Z0-9_])*)*"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_FQN, 0, getFunction("default_action") ), - new LexerStackPush("raw_command2"), }) ), + })); + this.regex.put("wf_output_declaration", Arrays.asList(new HermesRegex[] { new HermesRegex( - Pattern.compile("command\\s*(?=\\{)"), + Pattern.compile("\\s+"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("#.*"), + Arrays.asList(new LexerOutput[] { + }) + ), + new HermesRegex( + Pattern.compile("\\}"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RAW_COMMAND, + WdlTerminalIdentifier.TERMINAL_RBRACE, 0, getFunction("default_action") ), - new LexerStackPush("raw_command"), + new LexerAction("pop"), }) ), new HermesRegex( - Pattern.compile("parameter_meta(?![a-zA-Z0-9_])"), + Pattern.compile("\\["), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_PARAMETER_META, + WdlTerminalIdentifier.TERMINAL_LSQUARE, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("meta(?![a-zA-Z0-9_])"), + Pattern.compile("\\]"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_META, + WdlTerminalIdentifier.TERMINAL_RSQUARE, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), + Pattern.compile("="), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_EQUAL, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(object)\\s*(\\{)"), + Pattern.compile("\\+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_OBJECT, + WdlTerminalIdentifier.TERMINAL_PLUS, 0, getFunction("default_action") ), + }) + ), + new HermesRegex( + Pattern.compile("\\*"), + Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_LBRACE, + WdlTerminalIdentifier.TERMINAL_ASTERISK, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(Array|Map|Object|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), + Pattern.compile("[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_INTEGER, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*"), + Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_BOOLEAN, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("\\\"(?>[^\\\\\\\"\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\\\""), + Pattern.compile("(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_STRING, + WdlTerminalIdentifier.TERMINAL_TYPE, 0, - getFunction("unescape") + getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("'(?>[^\\\\\\'\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*'"), + Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_STRING, + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, 0, - getFunction("unescape") + getFunction("default_action") ), }) ), @@ -6202,6 +5998,16 @@ private void lexer_init() throws SyntaxError { }) ), new HermesRegex( + Pattern.compile("\\."), + Arrays.asList(new LexerOutput[] { + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_DOT, + 0, + getFunction("default_action") + ), + }) + ), + new HermesRegex( Pattern.compile("=="), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( @@ -6272,16 +6078,6 @@ private void lexer_init() throws SyntaxError { }) ), new HermesRegex( - Pattern.compile("\\}"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RBRACE, - 0, - getFunction("default_action") - ), - }) - ), - new HermesRegex( Pattern.compile("\\("), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( @@ -6432,88 +6228,40 @@ private void lexer_init() throws SyntaxError { }) ), new HermesRegex( - Pattern.compile("-?[0-9]+\\.[0-9]+"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_FLOAT, - 0, - getFunction("default_action") - ), - }) - ), - new HermesRegex( - Pattern.compile("[0-9]+"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_INTEGER, - 0, - getFunction("default_action") - ), - }) - ), - })); - this.regex.put("wf_output", Arrays.asList(new HermesRegex[] { - new HermesRegex( - Pattern.compile("\\s+"), - Arrays.asList(new LexerOutput[] { - }) - ), - new HermesRegex( - Pattern.compile("\\{"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_LBRACE, - 0, - getFunction("default_action") - ), - }) - ), - new HermesRegex( - Pattern.compile("\\}"), - Arrays.asList(new LexerOutput[] { - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_RBRACE, - 0, - getFunction("default_action") - ), - new LexerAction("pop"), - }) - ), - new HermesRegex( - Pattern.compile(","), + Pattern.compile("\\\"(?>[^\\\\\\\"\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\\\""), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_COMMA, + WdlTerminalIdentifier.TERMINAL_STRING, 0, - getFunction("default_action") + getFunction("wdl_unescape") ), }) ), new HermesRegex( - Pattern.compile("\\."), + Pattern.compile("'(?>[^\\\\\\'\\n]|\\\\[\\\"\\'nrbtfav\\\\?]|\\\\[0-7]{1,3}|\\\\x[0-9a-fA-F]+|\\\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*'"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_DOT, + WdlTerminalIdentifier.TERMINAL_STRING, 0, - getFunction("default_action") + getFunction("wdl_unescape") ), }) ), new HermesRegex( - Pattern.compile("\\*"), + Pattern.compile("-?[0-9]+\\.[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_ASTERISK, + WdlTerminalIdentifier.TERMINAL_FLOAT, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*(\\.[a-zA-Z]([a-zA-Z0-9_])*)*"), + Pattern.compile("[0-9]+"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_FQN, + WdlTerminalIdentifier.TERMINAL_INTEGER, 0, getFunction("default_action") ), @@ -6782,35 +6530,35 @@ private void lexer_init() throws SyntaxError { }) ), new HermesRegex( - Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), + Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*(?=\\s*=)"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_BOOLEAN, + WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, + -1, + getFunction("default_action") + ), + new LexerRegexOutput( + WdlTerminalIdentifier.TERMINAL_IDENTIFIER, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("(Array|Map|Object|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), + Pattern.compile("(true|false)(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_TYPE, + WdlTerminalIdentifier.TERMINAL_BOOLEAN, 0, getFunction("default_action") ), }) ), new HermesRegex( - Pattern.compile("[a-zA-Z]([a-zA-Z0-9_])*(?=\\s*=)"), + Pattern.compile("(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])"), Arrays.asList(new LexerOutput[] { new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_CMD_ATTR_HINT, - -1, - getFunction("default_action") - ), - new LexerRegexOutput( - WdlTerminalIdentifier.TERMINAL_IDENTIFIER, + WdlTerminalIdentifier.TERMINAL_TYPE, 0, getFunction("default_action") ), @@ -7072,7 +6820,7 @@ private void lexer_init() throws SyntaxError { new LexerRegexOutput( WdlTerminalIdentifier.TERMINAL_STRING, 0, - getFunction("unescape") + getFunction("wdl_unescape") ), }) ), @@ -7082,7 +6830,7 @@ private void lexer_init() throws SyntaxError { new LexerRegexOutput( WdlTerminalIdentifier.TERMINAL_STRING, 0, - getFunction("unescape") + getFunction("wdl_unescape") ), }) ), diff --git a/javascript/.gitignore b/parsers/javascript/.gitignore similarity index 100% rename from javascript/.gitignore rename to parsers/javascript/.gitignore diff --git a/parsers/javascript/Makefile b/parsers/javascript/Makefile new file mode 100644 index 0000000..adb4fb0 --- /dev/null +++ b/parsers/javascript/Makefile @@ -0,0 +1,5 @@ +all: generate +generate: + python hermes generate ../../grammar.hgr --language=javascript --name=wdl --nodejs --header --directory . +clean: + rm wdl_parser.js diff --git a/javascript/README.md b/parsers/javascript/README.md similarity index 94% rename from javascript/README.md rename to parsers/javascript/README.md index 66ce0bc..f170578 100644 --- a/javascript/README.md +++ b/parsers/javascript/README.md @@ -25,7 +25,7 @@ To run a generation command make sure that To generate WDL parser run the following command: ``` -python hermes generate ../grammar.hgr --language=javascript --name=wdl --nodejs --header --directory . +python hermes generate ../../grammar.hgr --language=javascript --name=wdl --nodejs --header --directory . ``` `wdl_parser.js` will appear in a current folder diff --git a/javascript/hermes b/parsers/javascript/hermes similarity index 100% rename from javascript/hermes rename to parsers/javascript/hermes diff --git a/javascript/sample.js b/parsers/javascript/sample.js similarity index 100% rename from javascript/sample.js rename to parsers/javascript/sample.js diff --git a/javascript/tests/cases/0/ast b/parsers/javascript/tests/cases/0/ast similarity index 100% rename from javascript/tests/cases/0/ast rename to parsers/javascript/tests/cases/0/ast diff --git a/javascript/tests/cases/0/wdl b/parsers/javascript/tests/cases/0/wdl similarity index 100% rename from javascript/tests/cases/0/wdl rename to parsers/javascript/tests/cases/0/wdl diff --git a/javascript/tests/cases/1/ast b/parsers/javascript/tests/cases/1/ast similarity index 100% rename from javascript/tests/cases/1/ast rename to parsers/javascript/tests/cases/1/ast diff --git a/javascript/tests/cases/1/wdl b/parsers/javascript/tests/cases/1/wdl similarity index 100% rename from javascript/tests/cases/1/wdl rename to parsers/javascript/tests/cases/1/wdl diff --git a/javascript/tests/cases/2/ast b/parsers/javascript/tests/cases/2/ast similarity index 100% rename from javascript/tests/cases/2/ast rename to parsers/javascript/tests/cases/2/ast diff --git a/javascript/tests/cases/2/wdl b/parsers/javascript/tests/cases/2/wdl similarity index 100% rename from javascript/tests/cases/2/wdl rename to parsers/javascript/tests/cases/2/wdl diff --git a/javascript/tests/cases/3/ast b/parsers/javascript/tests/cases/3/ast similarity index 100% rename from javascript/tests/cases/3/ast rename to parsers/javascript/tests/cases/3/ast diff --git a/javascript/tests/cases/3/wdl b/parsers/javascript/tests/cases/3/wdl similarity index 100% rename from javascript/tests/cases/3/wdl rename to parsers/javascript/tests/cases/3/wdl diff --git a/javascript/tests/cases/4/ast b/parsers/javascript/tests/cases/4/ast similarity index 100% rename from javascript/tests/cases/4/ast rename to parsers/javascript/tests/cases/4/ast diff --git a/javascript/tests/cases/4/wdl b/parsers/javascript/tests/cases/4/wdl similarity index 100% rename from javascript/tests/cases/4/wdl rename to parsers/javascript/tests/cases/4/wdl diff --git a/javascript/tests/cases/5/ast b/parsers/javascript/tests/cases/5/ast similarity index 100% rename from javascript/tests/cases/5/ast rename to parsers/javascript/tests/cases/5/ast diff --git a/javascript/tests/cases/5/wdl b/parsers/javascript/tests/cases/5/wdl similarity index 100% rename from javascript/tests/cases/5/wdl rename to parsers/javascript/tests/cases/5/wdl diff --git a/javascript/tests/package.json b/parsers/javascript/tests/package.json similarity index 100% rename from javascript/tests/package.json rename to parsers/javascript/tests/package.json diff --git a/javascript/tests/parser-test.js b/parsers/javascript/tests/parser-test.js similarity index 100% rename from javascript/tests/parser-test.js rename to parsers/javascript/tests/parser-test.js diff --git a/javascript/wdl_parser.js b/parsers/javascript/wdl_parser.js similarity index 85% rename from javascript/wdl_parser.js rename to parsers/javascript/wdl_parser.js index 7c5f3be..eabdb3f 100644 --- a/javascript/wdl_parser.js +++ b/parsers/javascript/wdl_parser.js @@ -1,8 +1,8 @@ /* - * This file was generated by Hermes Parser Generator on Thu Feb 23 00:52:28 2017 + * This file was generated by Hermes Parser Generator on Fri Feb 24 15:57:14 2017 * - * Hermes command: hermes generate ../grammar.hgr --language=javascript --name=wdl --nodejs --header --directory . + * Hermes command: hermes generate ../../grammar.hgr --language=javascript --name=wdl --nodejs --header --directory . * Run from: . (relative to this file) * Hermes version: hermes-parser 2.0rc6 * @@ -637,655 +637,655 @@ var Base64 = { } // Section: Parser var terminals = { - 0: 'raw_cmd_start', - 1: 'float', - 2: 'slash', - 3: 'colon', - 4: 'percent', - 5: 'double_ampersand', - 6: 'rbrace', - 7: 'cmd_attr_hint', - 8: 'comma', - 9: 'object', - 10: 'double_pipe', - 11: 'boolean', - 12: 'type', - 13: 'cmd_part', - 14: 'identifier', - 15: 'type_e', - 16: 'cmd_param_start', - 17: 'lt', - 18: 'dot', - 19: 'meta', - 20: 'lbrace', - 21: 'runtime', - 22: 'lparen', - 23: 'qmark', - 24: 'as', - 25: 'equal', - 26: 'cmd_param_end', - 27: 'plus', - 28: 'double_equal', - 29: 'integer', - 30: 'call', - 31: 'in', - 32: 'import', - 33: 'raw_command', - 34: 'input', - 35: 'gt', - 36: 'workflow', - 37: 'string', - 38: 'raw_cmd_end', - 39: 'gteq', - 40: 'not_equal', - 41: 'rsquare', - 42: 'if', - 43: 'asterisk', - 44: 'dash', - 45: 'not', - 46: 'output', - 47: 'parameter_meta', - 48: 'while', - 49: 'rparen', - 50: 'fqn', - 51: 'task', + 0: 'object', + 1: 'raw_command', + 2: 'lteq', + 3: 'identifier', + 4: 'not', + 5: 'input', + 6: 'plus', + 7: 'not_equal', + 8: 'string', + 9: 'qmark', + 10: 'asterisk', + 11: 'dash', + 12: 'percent', + 13: 'lparen', + 14: 'output', + 15: 'gt', + 16: 'type', + 17: 'call', + 18: 'e', + 19: 'double_pipe', + 20: 'while', + 21: 'cmd_attr_hint', + 22: 'parameter_meta', + 23: 'gteq', + 24: 'float', + 25: 'cmd_param_start', + 26: 'lsquare', + 27: 'double_ampersand', + 28: 'raw_cmd_end', + 29: 'double_equal', + 30: 'colon', + 31: 'rparen', + 32: 'runtime', + 33: 'in', + 34: 'integer', + 35: 'dot', + 36: 'lbrace', + 37: 'task', + 38: 'comma', + 39: 'import', + 40: 'lt', + 41: 'type_e', + 42: 'workflow', + 43: 'raw_cmd_start', + 44: 'rsquare', + 45: 'fqn', + 46: 'equal', + 47: 'if', + 48: 'cmd_param_end', + 49: 'meta', + 50: 'boolean', + 51: 'slash', 52: 'scatter', - 53: 'lteq', - 54: 'lsquare', - 55: 'e', - 'raw_cmd_start': 0, - 'float': 1, - 'slash': 2, - 'colon': 3, - 'percent': 4, - 'double_ampersand': 5, - 'rbrace': 6, - 'cmd_attr_hint': 7, - 'comma': 8, - 'object': 9, - 'double_pipe': 10, - 'boolean': 11, - 'type': 12, - 'cmd_part': 13, - 'identifier': 14, - 'type_e': 15, - 'cmd_param_start': 16, - 'lt': 17, - 'dot': 18, - 'meta': 19, - 'lbrace': 20, - 'runtime': 21, - 'lparen': 22, - 'qmark': 23, - 'as': 24, - 'equal': 25, - 'cmd_param_end': 26, - 'plus': 27, - 'double_equal': 28, - 'integer': 29, - 'call': 30, - 'in': 31, - 'import': 32, - 'raw_command': 33, - 'input': 34, - 'gt': 35, - 'workflow': 36, - 'string': 37, - 'raw_cmd_end': 38, - 'gteq': 39, - 'not_equal': 40, - 'rsquare': 41, - 'if': 42, - 'asterisk': 43, - 'dash': 44, - 'not': 45, - 'output': 46, - 'parameter_meta': 47, - 'while': 48, - 'rparen': 49, - 'fqn': 50, - 'task': 51, + 53: 'as', + 54: 'cmd_part', + 55: 'rbrace', + 'object': 0, + 'raw_command': 1, + 'lteq': 2, + 'identifier': 3, + 'not': 4, + 'input': 5, + 'plus': 6, + 'not_equal': 7, + 'string': 8, + 'qmark': 9, + 'asterisk': 10, + 'dash': 11, + 'percent': 12, + 'lparen': 13, + 'output': 14, + 'gt': 15, + 'type': 16, + 'call': 17, + 'e': 18, + 'double_pipe': 19, + 'while': 20, + 'cmd_attr_hint': 21, + 'parameter_meta': 22, + 'gteq': 23, + 'float': 24, + 'cmd_param_start': 25, + 'lsquare': 26, + 'double_ampersand': 27, + 'raw_cmd_end': 28, + 'double_equal': 29, + 'colon': 30, + 'rparen': 31, + 'runtime': 32, + 'in': 33, + 'integer': 34, + 'dot': 35, + 'lbrace': 36, + 'task': 37, + 'comma': 38, + 'import': 39, + 'lt': 40, + 'type_e': 41, + 'workflow': 42, + 'raw_cmd_start': 43, + 'rsquare': 44, + 'fqn': 45, + 'equal': 46, + 'if': 47, + 'cmd_param_end': 48, + 'meta': 49, + 'boolean': 50, + 'slash': 51, 'scatter': 52, - 'lteq': 53, - 'lsquare': 54, - 'e': 55, + 'as': 53, + 'cmd_part': 54, + 'rbrace': 55, } // table[nonterminal][terminal] = rule var table = [ - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1, 35, -1, -1, 35, -1, -1, -1, 35, -1, 35, -1, -1, -1, 34, -1, -1, -1, -1, 35, -1, -1, 35, 35, -1, 35, -1, -1, -1, -1, -1, 35, -1, -1, -1, 35, 35, 35, -1, -1, 35, 35, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, 2, -1, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, 42, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, 46, 47, 43, -1, -1, -1, 45, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, 5, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, -1, 66, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [38, -1, -1, 38, 38, -1, 38, -1, 38, -1, -1, 38, -1, 38, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, 38, -1, 38, -1, -1, -1, -1, -1, -1, -1, 38, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, 16, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 35, -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, 35, 35, -1, -1, 35, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, -1, 35, -1, -1, -1, 35, 35, -1, -1, -1, 34, 35, -1, 35, -1, -1, 35, -1, -1, 35], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 46, -1, 42, 41, -1, -1, 43, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, 44, -1, 48, -1, -1, 45, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, 52, 52, -1, -1, 52, -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 51, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, 52, -1, 52, -1, -1, 52, -1, -1, 52], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, 7, -1, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6, -1, -1], + [-1, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, 50, 50, -1, -1, 50, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, 50, -1, 50, -1, -1, 50, 49, -1, 50], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, 50, -1, -1, 50, -1, -1, -1, 50, 50, -1, -1, -1, 49, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, 50, 50, 50, -1, -1, -1, 50, -1, -1, -1], + [-1, -1, -1, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, 52, -1, -1, 52, -1, -1, -1, 52, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, 52, 52, 52, -1, -1, -1, 52, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, 38, -1, -1, -1, -1, -1, -1, -1, 38, -1, 38, -1, -1, 38, -1, -1, -1, -1, -1, 38, -1, 38, -1, -1, -1, -1, 38, -1, 38, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, 38, 38, -1, -1, -1, -1, -1, -1, -1, -1, 38, 38], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, 66, -1, -1, 66, -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], - [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], ] var nonterminal_first = { - 56: [32], - 57: [30], - 58: [52], - 59: [33], - 60: [34], - 61: [47], - 62: [19], - 63: [24], - 64: [1, 9, 14, 20, 22, -1, 27, 29, 37, 44, 45, 11, 54, 55], - 65: [-1, 44, 45, 1, 27, 29, 20, 9, 22, 37, 11, 54, 14, 55], - 66: [36], - 67: [18], - 68: [14], - 69: [19], - 70: [36, 51, 12, 15], - 71: [51], - 72: [12, 15], - 73: [-1, 30, 12, 15, 42, 46, 48, 47, 19, 52], - 74: [48], - 75: [-1, 25], - 76: [-1, 12, 15], - 77: [21], - 78: [-1, 14], - 79: [30, 12, 15, 42, 46, 48, 47, 19, 52], - 80: [-1, 14], - 81: [12, 15], - 82: [-1, 12, 15], - 83: [-1, 12, 15], - 84: [42], - 85: [-1, 14], - 86: [46, 47, 19, 21, 33], - 87: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 88: [-1, 16, 13], - 89: [-1, 7], - 90: [12, 15], - 91: [47], - 92: [24], - 93: [-1, 24], - 94: [-1, 46, 47, 19, 21, 33], - 95: [46], - 96: [-1, 32, 36, 51, 12, 15], - 97: [14], - 98: [-1, 20], - 99: [46], - 100: [16], - 101: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 102: [14], - 103: [34, -1], - 104: [18, -1], - 105: [7], - 106: [50], - 107: [12, 15], - 108: [13, 16], - 109: [-1, 24], - 110: [25], - 111: [20], - 112: [-1, 36, 12, 15, 51], - 113: [12, 50, 15], - 114: [-1, 50, 12, 15], - 115: [20], - 116: [-1, 32], + 56: [16, 41], + 57: [3], + 58: [14], + 59: [45, 16, -1, 41], + 60: [25], + 61: [21], + 62: [36], + 63: [54, 25, -1], + 64: [39, -1], + 65: [54, 25], + 66: [-1, 3], + 67: [16, 41], + 68: [16, -1, 39, 41, 42, 37], + 69: [1, -1, 32, 49, 14, 22], + 70: [46], + 71: [37], + 72: [22], + 73: [16, 41, 42, 37], + 74: [35, -1], + 75: [47], + 76: [39], + 77: [49], + 78: [5, -1], + 79: [14], + 80: [0, 18, 3, 50, 34, 4, 26, 36, 24, 6, 8, 11, 13], + 81: [36], + 82: [3], + 83: [0, -1, 3, 34, 4, 36, 6, 8, 11, 13, 18, 50, 24, 26], + 84: [16, 17, 47, -1, 49, 20, 52, 22, 41, 14], + 85: [16, 41, -1], + 86: [32], + 87: [-1, 3], + 88: [46, -1], + 89: [16, 17, 47, 49, 20, 52, 22, 41, 14], + 90: [20], + 91: [45], + 92: [1], + 93: [45, 41, 16], + 94: [16, 41], + 95: [36, -1], + 96: [17], + 97: [53, -1], + 98: [5], + 99: [35], + 100: [22], + 101: [42], + 102: [1, 14, 32, 49, 22], + 103: [16, 41, -1], + 104: [53, -1], + 105: [-1, 3], + 106: [3], + 107: [16, 41, -1], + 108: [49], + 109: [0, -1, 3, 34, 4, 36, 6, 8, 11, 13, 18, 50, 24, 26], + 110: [53], + 111: [16, 41], + 112: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 113: [53], + 114: [16, -1, 37, 41, 42], + 115: [52], + 116: [-1, 21], } var nonterminal_follow = { - 56: [-1, 32, 36, 51, 12, 15], - 57: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 58: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 59: [46, 47, 19, 6, 21, 33], - 60: [34, 6], - 61: [46, 47, 19, 6, 21, 33], - 62: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 63: [-1, 32, 36, 51, 12, 15], - 64: [6], - 65: [41, 49], - 66: [36, 12, 15, -1, 51], - 67: [6, 50, 12, 15], - 68: [6, 8], - 69: [46, 47, 19, 6, 21, 33], - 70: [36, 12, 15, -1, 51], - 71: [36, 12, 15, -1, 51], - 72: [30, 6, 33, 34, 36, 12, 15, 42, 46, 48, 47, 19, -1, 21, 51, 52], - 73: [6], - 74: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 75: [30, 6, 33, 34, 36, 12, 15, 42, 46, 48, 47, 19, -1, 21, 51, 52], - 76: [41], - 77: [46, 47, 19, 6, 21, 33], - 78: [6], - 79: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 80: [34, 6], - 81: [6, 50, 12, 15], - 82: [6], - 83: [46, 47, 19, 21, 33, 34], - 84: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 85: [6], - 86: [46, 47, 19, 6, 21, 33], - 87: [3, 4, 7, 8, 12, 14, 19, -1, 22, 27, 29, 36, 41, 42, 43, 44, 45, 48, 49, 51, 52, 11, 55, 1, 2, 5, 6, 9, 10, 15, 17, 20, 21, 26, 28, 30, 33, 39, 35, 34, 37, 40, 46, 47, 50, 53, 54], - 88: [38], - 89: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 90: [6, 12, 15], - 91: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 92: [30, 6, 12, 15, 42, 46, 48, 47, 19, 20, 52], - 93: [30, 6, 12, 15, 42, 46, 48, 47, 19, 20, 52], - 94: [6], - 95: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 96: [-1], - 97: [8, 6, 34], - 98: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 99: [46, 47, 19, 6, 21, 33], - 100: [16, 38, 13], - 101: [6, 8], - 102: [6, 14], - 103: [6], - 104: [6, 50, 12, 15], - 105: [1, 27, 29, 7, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 106: [6, 50, 12, 15], - 107: [41, 8, 14], - 108: [16, 38, 13], - 109: [-1, 32, 36, 51, 12, 15], - 110: [30, 6, 33, 34, 36, 12, 15, 42, 46, 48, 47, 19, -1, 21, 51, 52], - 111: [30, 6, 12, 15, 42, 46, 48, 47, 19, 52], - 112: [-1], - 113: [6, 50, 12, 15], - 114: [6], - 115: [30, 6, 33, 12, 15, 42, 46, 47, 48, 19, 21, 52], - 116: [-1, 36, 51, 12, 15], + 56: [1, 32, 37, 5, 41, 14, 42, 16, 17, 47, 49, 20, 52, 22, -1, 55], + 57: [55, 3], + 58: [1, 32, 49, 22, 14, 55], + 59: [55], + 60: [54, 25, 28], + 61: [0, 18, 13, 3, 50, 34, 4, 36, 21, 24, 6, 8, 11, 26], + 62: [16, 17, 1, 47, 32, 49, 20, 52, 22, 41, 14, 55], + 63: [28], + 64: [16, 41, -1, 42, 37], + 65: [54, 25, 28], + 66: [5, 55], + 67: [16, 41, 55], + 68: [-1], + 69: [55], + 70: [1, 32, 37, 5, 41, 14, 42, 16, 17, 47, 49, 20, 52, 22, -1, 55], + 71: [16, 37, -1, 41, 42], + 72: [1, 32, 49, 22, 14, 55], + 73: [16, 37, -1, 41, 42], + 74: [45, 16, 41, 55], + 75: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 76: [16, -1, 39, 41, 42, 37], + 77: [1, 32, 49, 22, 14, 55], + 78: [55], + 79: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 80: [38, 55], + 81: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 82: [5, 38, 55], + 83: [55], + 84: [55], + 85: [44], + 86: [1, 32, 49, 22, 14, 55], + 87: [55], + 88: [1, 32, 37, 5, 41, 14, 42, 16, 17, 47, 49, 20, 52, 22, -1, 55], + 89: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 90: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 91: [45, 16, 41, 55], + 92: [1, 32, 49, 22, 14, 55], + 93: [45, 16, 41, 55], + 94: [45, 16, 41, 55], + 95: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 96: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 97: [16, -1, 39, 41, 42, 37], + 98: [5, 55], + 99: [45, 16, 41, 55], + 100: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 101: [16, 37, -1, 41, 42], + 102: [1, 32, 49, 22, 14, 55], + 103: [55], + 104: [16, 17, 47, 49, 20, 52, 36, 22, 41, 14, 55], + 105: [55], + 106: [38, 55], + 107: [5, 1, 32, 49, 14, 22], + 108: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 109: [31, 44], + 110: [16, 17, 47, 49, 20, 52, 36, 22, 41, 14, 55], + 111: [38, 44, 3], + 112: [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 14, 16, 18, 17, 19, 20, 21, 23, 24, 22, 26, 27, 29, 30, 31, 32, 34, 36, 37, 38, 40, 41, 44, 42, 45, 47, 48, 49, 50, 51, 52, -1, 55], + 113: [16, -1, 39, 41, 42, 37], + 114: [-1], + 115: [16, 17, 47, 49, 20, 52, 22, 41, 14, 55], + 116: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], } var rule_first = { - 0: [-1, 32], - 1: [-1, 36, 51, 12, 15], - 2: [-1, 32, 36, 51, 12, 15], - 3: [36], - 4: [51], - 5: [12, 15], - 6: [24], + 0: [-1, 39], + 1: [16, 41, 42, -1, 37], + 2: [16, -1, 37, 39, 41, 42], + 3: [42], + 4: [37], + 5: [16, 41], + 6: [53], 7: [-1], - 8: [32], - 9: [24], - 10: [-1, 12, 15], - 11: [-1, 46, 47, 19, 21, 33], - 12: [51], - 13: [33], - 14: [46], - 15: [21], - 16: [47], - 17: [19], - 18: [-1, 13, 16], - 19: [33], - 20: [13], - 21: [16], - 22: [-1, 7], - 23: [16], - 24: [7], - 25: [-1, 12, 15], - 26: [46], - 27: [12, 15], - 28: [21], - 29: [47], - 30: [19], - 31: [-1, 14], - 32: [20], - 33: [14], - 34: [25], + 8: [39], + 9: [53], + 10: [16, 41, -1], + 11: [1, -1, 32, 49, 22, 14], + 12: [37], + 13: [1], + 14: [14], + 15: [32], + 16: [22], + 17: [49], + 18: [54, 25, -1], + 19: [1], + 20: [54], + 21: [25], + 22: [-1, 21], + 23: [25], + 24: [21], + 25: [16, 41, -1], + 26: [14], + 27: [16, 41], + 28: [32], + 29: [22], + 30: [49], + 31: [-1, 3], + 32: [36], + 33: [3], + 34: [46], 35: [-1], - 36: [12, 15], - 37: [25], - 38: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 39: [-1, 30, 12, 15, 42, 46, 48, 47, 19, 52], - 40: [36], - 41: [30], - 42: [12, 15], - 43: [48], - 44: [42], + 36: [16, 41], + 37: [46], + 38: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 39: [16, 17, 47, -1, 49, 20, 52, 22, 41, 14], + 40: [42], + 41: [17], + 42: [16, 41], + 43: [20], + 44: [47], 45: [52], - 46: [46], - 47: [47], - 48: [19], - 49: [24], + 46: [14], + 47: [22], + 48: [49], + 49: [53], 50: [-1], - 51: [20], + 51: [36], 52: [-1], - 53: [30], - 54: [34, -1], - 55: [20], - 56: [-1, 14], - 57: [34], - 58: [14], - 59: [24], - 60: [-1, 12, 50, 15], - 61: [46], - 62: [12, 15], - 63: [50], - 64: [12, 15], - 65: [18], + 53: [17], + 54: [5, -1], + 55: [36], + 56: [-1, 3], + 57: [5], + 58: [3], + 59: [53], + 60: [45, 41, 16, -1], + 61: [14], + 62: [16, 41], + 63: [45], + 64: [16, 41], + 65: [35], 66: [-1], - 67: [50], - 68: [18], - 69: [47], - 70: [19], - 71: [48], - 72: [42], + 67: [45], + 68: [35], + 69: [22], + 70: [49], + 71: [20], + 72: [47], 73: [52], - 74: [14], - 75: [-1, 12, 15], - 76: [12], - 77: [12], - 78: [12], - 79: [12], - 80: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 81: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 82: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 83: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 84: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 85: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 86: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 87: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 88: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 89: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 90: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 91: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 92: [1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 93: [45], - 94: [27], - 95: [44], - 96: [1, -1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 97: [14], - 98: [14], - 99: [14], - 100: [-1, 14], - 101: [9], - 102: [54], - 103: [1, -1, 27, 29, 9, 37, 14, 44, 45, 20, 22, 11, 54, 55], - 104: [20], - 105: [22], - 106: [37], - 107: [14], - 108: [11], - 109: [29], - 110: [1], + 74: [3], + 75: [16, 41, -1], + 76: [16], + 77: [16], + 78: [16], + 79: [16], + 80: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 81: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 82: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 83: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 84: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 85: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 86: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 87: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 88: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 89: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 90: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 91: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 92: [0, 18, 13, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 93: [4], + 94: [6], + 95: [11], + 96: [0, 18, 13, -1, 3, 50, 34, 4, 36, 24, 6, 8, 11, 26], + 97: [3], + 98: [3], + 99: [3], + 100: [-1, 3], + 101: [0], + 102: [26], + 103: [0, 18, -1, 3, 50, 34, 4, 26, 36, 24, 6, 8, 11, 13], + 104: [36], + 105: [13], + 106: [8], + 107: [3], + 108: [50], + 109: [34], + 110: [24], } var nonterminal_rules = { 56: [ - "$import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 )", + "$declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 )", ], 57: [ - "$call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 )", + "$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )", ], 58: [ - "$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )", + "$outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 )", ], 59: [ - "$command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 )", + "$_gen15 = list($wf_output)", ], 60: [ - "$call_input = :input :colon $_gen14 -> Inputs( map=$2 )", + "$cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )", ], 61: [ - "$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )", + "$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )", ], 62: [ - "$wf_meta = :meta $map -> Meta( map=$1 )", + "$map = :lbrace $_gen8 :rbrace -> $1", ], 63: [ - "$import_namespace = :as :identifier -> $1", + "$_gen5 = list($command_part)", ], 64: [ - "$_gen20 = list($map_kv, :comma)", + "$_gen0 = list($import)", ], 65: [ - "$_gen18 = list($e, :comma)", + "$command_part = :cmd_part", + "$command_part = $cmd_param", ], 66: [ - "$workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 )", + "$_gen14 = list($mapping, :comma)", ], 67: [ - "$wf_output_wildcard = :dot :asterisk -> $1", + "$output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 )", ], 68: [ - "$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )", + "$document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 )", ], 69: [ - "$meta = :meta $map -> Meta( map=$1 )", + "$_gen4 = list($sections)", ], 70: [ - "$workflow_or_task_or_decl = $workflow", - "$workflow_or_task_or_decl = $task", - "$workflow_or_task_or_decl = $declaration", + "$setter = :equal $e -> $1", ], 71: [ "$task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )", ], 72: [ - "$declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 )", + "$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )", ], 73: [ - "$_gen10 = list($wf_body_element)", + "$workflow_or_task_or_decl = $workflow", + "$workflow_or_task_or_decl = $task", + "$workflow_or_task_or_decl = $declaration", ], 74: [ - "$while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 )", + "$_gen16 = $wf_output_wildcard", + "$_gen16 = :_empty", ], 75: [ - "$_gen9 = $setter", - "$_gen9 = :_empty", + "$if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 )", ], 76: [ - "$_gen17 = list($type_e, :comma)", + "$import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 )", ], 77: [ - "$runtime = :runtime $map -> Runtime( map=$1 )", + "$meta = :meta $map -> Meta( map=$1 )", ], 78: [ - "$_gen8 = list($kv)", + "$_gen13 = list($call_input)", ], 79: [ - "$wf_body_element = $call", - "$wf_body_element = $declaration", - "$wf_body_element = $while_loop", - "$wf_body_element = $if_stmt", - "$wf_body_element = $scatter", - "$wf_body_element = $wf_outputs", - "$wf_body_element = $wf_parameter_meta", - "$wf_body_element = $wf_meta", + "$wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 )", ], 80: [ - "$_gen14 = list($mapping, :comma)", + "$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )", ], 81: [ - "$wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 )", + "$call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 )", ], 82: [ - "$_gen7 = list($output_kv)", + "$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )", ], 83: [ - "$_gen3 = list($declaration)", + "$_gen20 = list($map_kv, :comma)", ], 84: [ - "$if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 )", + "$_gen10 = list($wf_body_element)", ], 85: [ - "$_gen19 = list($object_kv, :comma)", + "$_gen17 = list($type_e, :comma)", ], 86: [ - "$sections = $command", - "$sections = $outputs", - "$sections = $runtime", - "$sections = $parameter_meta", - "$sections = $meta", + "$runtime = :runtime $map -> Runtime( map=$1 )", ], 87: [ - "$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )", - "$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )", - "$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )", - "$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )", - "$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )", - "$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )", - "$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )", - "$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )", - "$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )", - "$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )", - "$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )", - "$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )", - "$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )", - "$e = :not $e -> LogicalNot( expression=$1 )", - "$e = :plus $e -> UnaryPlus( expression=$1 )", - "$e = :dash $e -> UnaryNegation( expression=$1 )", - "$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )", - "$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )", - "$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )", - "$e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 )", - "$e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 )", - "$e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 )", - "$e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 )", - "$e = :string", - "$e = :identifier", - "$e = :boolean", - "$e = :integer", - "$e = :float", + "$_gen8 = list($kv)", ], 88: [ - "$_gen5 = list($command_part)", + "$_gen9 = $setter", + "$_gen9 = :_empty", ], 89: [ - "$_gen6 = list($cmd_param_kv)", + "$wf_body_element = $call", + "$wf_body_element = $declaration", + "$wf_body_element = $while_loop", + "$wf_body_element = $if_stmt", + "$wf_body_element = $scatter", + "$wf_body_element = $wf_outputs", + "$wf_body_element = $wf_parameter_meta", + "$wf_body_element = $wf_meta", ], 90: [ - "$output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 )", + "$while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 )", ], 91: [ - "$wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )", + "$wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 )", ], 92: [ - "$alias = :as :identifier -> $1", + "$command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 )", ], 93: [ - "$_gen11 = $alias", - "$_gen11 = :_empty", + "$wf_output = $wf_output_declaration_syntax", + "$wf_output = $wf_output_wildcard_syntax", ], 94: [ - "$_gen4 = list($sections)", + "$wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 )", ], 95: [ - "$wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 )", + "$_gen12 = $call_body", + "$_gen12 = :_empty", ], 96: [ - "$document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 )", + "$call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 )", ], 97: [ - "$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )", + "$_gen2 = $import_namespace", + "$_gen2 = :_empty", ], 98: [ - "$_gen12 = $call_body", - "$_gen12 = :_empty", + "$call_input = :input :colon $_gen14 -> Inputs( map=$2 )", ], 99: [ - "$outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 )", + "$wf_output_wildcard = :dot :asterisk -> $1", ], 100: [ - "$cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )", + "$wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )", ], 101: [ - "$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )", + "$workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 )", ], 102: [ - "$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )", + "$sections = $command", + "$sections = $outputs", + "$sections = $runtime", + "$sections = $parameter_meta", + "$sections = $meta", ], 103: [ - "$_gen13 = list($call_input)", + "$_gen7 = list($output_kv)", ], 104: [ - "$_gen16 = $wf_output_wildcard", - "$_gen16 = :_empty", + "$_gen11 = $alias", + "$_gen11 = :_empty", ], 105: [ - "$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )", + "$_gen19 = list($object_kv, :comma)", ], 106: [ - "$wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 )", + "$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )", ], 107: [ - "$type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 )", - "$type_e = :type <=> :qmark -> OptionalType( innerType=$0 )", - "$type_e = :type <=> :plus -> NonEmptyType( innerType=$0 )", - "$type_e = :type", + "$_gen3 = list($declaration)", ], 108: [ - "$command_part = :cmd_part", - "$command_part = $cmd_param", + "$wf_meta = :meta $map -> Meta( map=$1 )", ], 109: [ - "$_gen2 = $import_namespace", - "$_gen2 = :_empty", + "$_gen18 = list($e, :comma)", ], 110: [ - "$setter = :equal $e -> $1", + "$alias = :as :identifier -> $1", ], 111: [ - "$call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 )", + "$type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 )", + "$type_e = :type <=> :qmark -> OptionalType( innerType=$0 )", + "$type_e = :type <=> :plus -> NonEmptyType( innerType=$0 )", + "$type_e = :type", ], 112: [ - "$_gen1 = list($workflow_or_task_or_decl)", + "$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )", + "$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )", + "$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )", + "$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )", + "$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )", + "$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )", + "$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )", + "$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )", + "$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )", + "$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )", + "$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )", + "$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )", + "$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )", + "$e = :not $e -> LogicalNot( expression=$1 )", + "$e = :plus $e -> UnaryPlus( expression=$1 )", + "$e = :dash $e -> UnaryNegation( expression=$1 )", + "$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )", + "$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )", + "$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )", + "$e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 )", + "$e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 )", + "$e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 )", + "$e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 )", + "$e = :string", + "$e = :identifier", + "$e = :boolean", + "$e = :integer", + "$e = :float", ], 113: [ - "$wf_output = $wf_output_declaration_syntax", - "$wf_output = $wf_output_wildcard_syntax", + "$import_namespace = :as :identifier -> $1", ], 114: [ - "$_gen15 = list($wf_output)", + "$_gen1 = list($workflow_or_task_or_decl)", ], 115: [ - "$map = :lbrace $_gen8 :rbrace -> $1", + "$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )", ], 116: [ - "$_gen0 = list($import)", + "$_gen6 = list($cmd_param_kv)", ], } var rules = { @@ -1431,27 +1431,27 @@ function expect(ctx, terminal_id) { } // START definitions for expression parser `e` var infix_binding_power_e = { - 10: 4000, // $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) - 5: 5000, // $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) - 28: 6000, // $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) - 40: 6000, // $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) - 17: 7000, // $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) - 53: 7000, // $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) - 35: 7000, // $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) - 39: 7000, // $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) - 27: 8000, // $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) - 44: 8000, // $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) - 43: 9000, // $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) - 2: 9000, // $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) - 4: 9000, // $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) - 22: 11000, // $e = :identifier <=> :lparen list($e, :comma) :rparen -> FunctionCall( name=$0, params=$2 ) - 54: 12000, // $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) - 18: 13000, // $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) + 19: 4000, // $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) + 27: 5000, // $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) + 29: 6000, // $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) + 7: 6000, // $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) + 40: 7000, // $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) + 2: 7000, // $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) + 15: 7000, // $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) + 23: 7000, // $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) + 6: 8000, // $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) + 11: 8000, // $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) + 10: 9000, // $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) + 51: 9000, // $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) + 12: 9000, // $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) + 13: 11000, // $e = :identifier <=> :lparen list($e, :comma) :rparen -> FunctionCall( name=$0, params=$2 ) + 26: 12000, // $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) + 35: 13000, // $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) } var prefix_binding_power_e = { - 45: 10000, // $e = :not $e -> LogicalNot( expression=$1 ) - 27: 10000, // $e = :plus $e -> UnaryPlus( expression=$1 ) - 44: 10000, // $e = :dash $e -> UnaryNegation( expression=$1 ) + 4: 10000, // $e = :not $e -> LogicalNot( expression=$1 ) + 6: 10000, // $e = :plus $e -> UnaryPlus( expression=$1 ) + 11: 10000, // $e = :dash $e -> UnaryNegation( expression=$1 ) } function get_infix_binding_power_e(terminal_id) { if (terminal_id in infix_binding_power_e) { @@ -1485,7 +1485,7 @@ function parse_e_internal(ctx, rbp) { return left; } function nud_e(ctx) { - var tree = new ParseTree(new NonTerminal(87, 'e')); + var tree = new ParseTree(new NonTerminal(112, 'e')); var current = ctx.tokens.current(); ctx.nonterminal = "e"; if (!current) { @@ -1499,8 +1499,8 @@ function nud_e(ctx) { } tree.astTransform = new AstTransformNodeCreator('LogicalNot', ast_parameters); tree.nudMorphemeCount = 2; - tree.add(expect(ctx, 45)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(45))); + tree.add(expect(ctx, 4)); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(4))); tree.isPrefix = true; } else if (rule_first[94].indexOf(current.id) != -1) { @@ -1511,8 +1511,8 @@ function nud_e(ctx) { } tree.astTransform = new AstTransformNodeCreator('UnaryPlus', ast_parameters); tree.nudMorphemeCount = 2; - tree.add(expect(ctx, 27)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(27))); + tree.add(expect(ctx, 6)); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(6))); tree.isPrefix = true; } else if (rule_first[95].indexOf(current.id) != -1) { @@ -1523,8 +1523,8 @@ function nud_e(ctx) { } tree.astTransform = new AstTransformNodeCreator('UnaryNegation', ast_parameters); tree.nudMorphemeCount = 2; - tree.add(expect(ctx, 44)); - tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(44))); + tree.add(expect(ctx, 11)); + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(11))); tree.isPrefix = true; } else if (rule_first[97].indexOf(current.id) != -1) { @@ -1532,21 +1532,21 @@ function nud_e(ctx) { ctx.rule = rules[97]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 14)); + tree.add(expect(ctx, 3)); } else if (rule_first[98].indexOf(current.id) != -1) { // $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) ctx.rule = rules[98]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 14)); + tree.add(expect(ctx, 3)); } else if (rule_first[99].indexOf(current.id) != -1) { // $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) ctx.rule = rules[99]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 14)); + tree.add(expect(ctx, 3)); } else if (rule_first[101].indexOf(current.id) != -1) { // $e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 ) @@ -1556,10 +1556,10 @@ function nud_e(ctx) { } tree.astTransform = new AstTransformNodeCreator('ObjectLiteral', ast_parameters); tree.nudMorphemeCount = 4; - tree.add(expect(ctx, 9)); - tree.add(expect(ctx, 20)); + tree.add(expect(ctx, 0)); + tree.add(expect(ctx, 36)); tree.add(parse__gen19(ctx)); - tree.add(expect(ctx, 6)); + tree.add(expect(ctx, 55)); } else if (rule_first[102].indexOf(current.id) != -1) { // $e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 ) @@ -1569,9 +1569,9 @@ function nud_e(ctx) { } tree.astTransform = new AstTransformNodeCreator('ArrayLiteral', ast_parameters); tree.nudMorphemeCount = 3; - tree.add(expect(ctx, 54)); + tree.add(expect(ctx, 26)); tree.add(parse__gen18(ctx)); - tree.add(expect(ctx, 41)); + tree.add(expect(ctx, 44)); } else if (rule_first[104].indexOf(current.id) != -1) { // $e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 ) @@ -1581,9 +1581,9 @@ function nud_e(ctx) { } tree.astTransform = new AstTransformNodeCreator('MapLiteral', ast_parameters); tree.nudMorphemeCount = 3; - tree.add(expect(ctx, 20)); + tree.add(expect(ctx, 36)); tree.add(parse__gen20(ctx)); - tree.add(expect(ctx, 6)); + tree.add(expect(ctx, 55)); } else if (rule_first[105].indexOf(current.id) != -1) { // $e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 ) @@ -1593,52 +1593,52 @@ function nud_e(ctx) { } tree.astTransform = new AstTransformNodeCreator('TupleLiteral', ast_parameters); tree.nudMorphemeCount = 3; - tree.add(expect(ctx, 22)); + tree.add(expect(ctx, 13)); tree.add(parse__gen18(ctx)); - tree.add(expect(ctx, 49)); + tree.add(expect(ctx, 31)); } else if (rule_first[106].indexOf(current.id) != -1) { // $e = :string ctx.rule = rules[106]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 37)); + tree.add(expect(ctx, 8)); } else if (rule_first[107].indexOf(current.id) != -1) { // $e = :identifier ctx.rule = rules[107]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 14)); + tree.add(expect(ctx, 3)); } else if (rule_first[108].indexOf(current.id) != -1) { // $e = :boolean ctx.rule = rules[108]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 11)); + tree.add(expect(ctx, 50)); } else if (rule_first[109].indexOf(current.id) != -1) { // $e = :integer ctx.rule = rules[109]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 29)); + tree.add(expect(ctx, 34)); } else if (rule_first[110].indexOf(current.id) != -1) { // $e = :float ctx.rule = rules[110]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 1)); + tree.add(expect(ctx, 24)); } return tree; } function led_e(left, ctx) { - var tree = new ParseTree(new NonTerminal(87, 'e')) + var tree = new ParseTree(new NonTerminal(112, 'e')) var current = ctx.tokens.current() ctx.nonterminal = "e"; - if (current.id == 10) { // :double_pipe + if (current.id == 19) { // :double_pipe // $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) ctx.rule = rules[80]; ast_parameters = { @@ -1648,12 +1648,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('LogicalOr', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 10)); // :double_pipe + tree.add(expect(ctx, 19)); // :double_pipe modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(10) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(19) - modifier)); } - if (current.id == 5) { // :double_ampersand + if (current.id == 27) { // :double_ampersand // $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) ctx.rule = rules[81]; ast_parameters = { @@ -1663,12 +1663,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('LogicalAnd', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 5)); // :double_ampersand + tree.add(expect(ctx, 27)); // :double_ampersand modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(5) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(27) - modifier)); } - if (current.id == 28) { // :double_equal + if (current.id == 29) { // :double_equal // $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) ctx.rule = rules[82]; ast_parameters = { @@ -1678,12 +1678,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('Equals', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 28)); // :double_equal + tree.add(expect(ctx, 29)); // :double_equal modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(28) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(29) - modifier)); } - if (current.id == 40) { // :not_equal + if (current.id == 7) { // :not_equal // $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) ctx.rule = rules[83]; ast_parameters = { @@ -1693,12 +1693,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('NotEquals', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 40)); // :not_equal + tree.add(expect(ctx, 7)); // :not_equal modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(40) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(7) - modifier)); } - if (current.id == 17) { // :lt + if (current.id == 40) { // :lt // $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) ctx.rule = rules[84]; ast_parameters = { @@ -1708,12 +1708,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('LessThan', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 17)); // :lt + tree.add(expect(ctx, 40)); // :lt modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(17) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(40) - modifier)); } - if (current.id == 53) { // :lteq + if (current.id == 2) { // :lteq // $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) ctx.rule = rules[85]; ast_parameters = { @@ -1723,12 +1723,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('LessThanOrEqual', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 53)); // :lteq + tree.add(expect(ctx, 2)); // :lteq modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(53) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(2) - modifier)); } - if (current.id == 35) { // :gt + if (current.id == 15) { // :gt // $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) ctx.rule = rules[86]; ast_parameters = { @@ -1738,12 +1738,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('GreaterThan', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 35)); // :gt + tree.add(expect(ctx, 15)); // :gt modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(35) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(15) - modifier)); } - if (current.id == 39) { // :gteq + if (current.id == 23) { // :gteq // $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) ctx.rule = rules[87]; ast_parameters = { @@ -1753,12 +1753,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('GreaterThanOrEqual', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 39)); // :gteq + tree.add(expect(ctx, 23)); // :gteq modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(39) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(23) - modifier)); } - if (current.id == 27) { // :plus + if (current.id == 6) { // :plus // $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) ctx.rule = rules[88]; ast_parameters = { @@ -1768,12 +1768,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('Add', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 27)); // :plus + tree.add(expect(ctx, 6)); // :plus modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(27) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(6) - modifier)); } - if (current.id == 44) { // :dash + if (current.id == 11) { // :dash // $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) ctx.rule = rules[89]; ast_parameters = { @@ -1783,12 +1783,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('Subtract', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 44)); // :dash + tree.add(expect(ctx, 11)); // :dash modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(44) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(11) - modifier)); } - if (current.id == 43) { // :asterisk + if (current.id == 10) { // :asterisk // $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) ctx.rule = rules[90]; ast_parameters = { @@ -1798,12 +1798,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('Multiply', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 43)); // :asterisk + tree.add(expect(ctx, 10)); // :asterisk modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(43) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(10) - modifier)); } - if (current.id == 2) { // :slash + if (current.id == 51) { // :slash // $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) ctx.rule = rules[91]; ast_parameters = { @@ -1813,12 +1813,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('Divide', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 2)); // :slash + tree.add(expect(ctx, 51)); // :slash modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(2) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(51) - modifier)); } - if (current.id == 4) { // :percent + if (current.id == 12) { // :percent // $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) ctx.rule = rules[92]; ast_parameters = { @@ -1828,12 +1828,12 @@ function led_e(left, ctx) { tree.astTransform = new AstTransformNodeCreator('Remainder', ast_parameters); tree.isExprNud = true; tree.add(left); - tree.add(expect(ctx, 4)); // :percent + tree.add(expect(ctx, 12)); // :percent modifier = 0; tree.isInfix = true; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(4) - modifier)); + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(12) - modifier)); } - if (current.id == 22) { // :lparen + if (current.id == 13) { // :lparen // $e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 ) ctx.rule = rules[97]; ast_parameters = { @@ -1842,11 +1842,11 @@ function led_e(left, ctx) { } tree.astTransform = new AstTransformNodeCreator('FunctionCall', ast_parameters); tree.add(left); - tree.add(expect(ctx, 22)); // :lparen + tree.add(expect(ctx, 13)); // :lparen tree.add(parse__gen18(ctx)); - tree.add(expect(ctx, 49)); // :rparen + tree.add(expect(ctx, 31)); // :rparen } - if (current.id == 54) { // :lsquare + if (current.id == 26) { // :lsquare // $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) ctx.rule = rules[98]; ast_parameters = { @@ -1855,12 +1855,12 @@ function led_e(left, ctx) { } tree.astTransform = new AstTransformNodeCreator('ArrayOrMapLookup', ast_parameters); tree.add(left); - tree.add(expect(ctx, 54)); // :lsquare + tree.add(expect(ctx, 26)); // :lsquare modifier = 0; - tree.add(parse_e_internal(ctx, get_infix_binding_power_e(54) - modifier)); - tree.add(expect(ctx, 41)); // :rsquare + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(26) - modifier)); + tree.add(expect(ctx, 44)); // :rsquare } - if (current.id == 18) { // :dot + if (current.id == 35) { // :dot // $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) ctx.rule = rules[99]; ast_parameters = { @@ -1869,17 +1869,17 @@ function led_e(left, ctx) { } tree.astTransform = new AstTransformNodeCreator('MemberAccess', ast_parameters); tree.add(left); - tree.add(expect(ctx, 18)); // :dot - tree.add(expect(ctx, 14)); // :identifier + tree.add(expect(ctx, 35)); // :dot + tree.add(expect(ctx, 3)); // :identifier } return tree; } // END definitions for expression parser `e` // START definitions for expression parser `type_e` var infix_binding_power_type_e = { - 54: 1000, // $type_e = :type <=> :lsquare list($type_e, :comma) :rsquare -> Type( name=$0, subtype=$2 ) - 23: 2000, // $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) - 27: 3000, // $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) + 26: 1000, // $type_e = :type <=> :lsquare list($type_e, :comma) :rsquare -> Type( name=$0, subtype=$2 ) + 9: 2000, // $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) + 6: 3000, // $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) } var prefix_binding_power_type_e = { } @@ -1915,7 +1915,7 @@ function parse_type_e_internal(ctx, rbp) { return left; } function nud_type_e(ctx) { - var tree = new ParseTree(new NonTerminal(107, 'type_e')); + var tree = new ParseTree(new NonTerminal(111, 'type_e')); var current = ctx.tokens.current(); ctx.nonterminal = "type_e"; if (!current) { @@ -1926,36 +1926,36 @@ function nud_type_e(ctx) { ctx.rule = rules[76]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 12)); + tree.add(expect(ctx, 16)); } else if (rule_first[77].indexOf(current.id) != -1) { // $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) ctx.rule = rules[77]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 12)); + tree.add(expect(ctx, 16)); } else if (rule_first[78].indexOf(current.id) != -1) { // $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) ctx.rule = rules[78]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 12)); + tree.add(expect(ctx, 16)); } else if (rule_first[79].indexOf(current.id) != -1) { // $type_e = :type ctx.rule = rules[79]; tree.astTransform = new AstTransformSubstitution(0); tree.nudMorphemeCount = 1; - tree.add(expect(ctx, 12)); + tree.add(expect(ctx, 16)); } return tree; } function led_type_e(left, ctx) { - var tree = new ParseTree(new NonTerminal(107, 'type_e')) + var tree = new ParseTree(new NonTerminal(111, 'type_e')) var current = ctx.tokens.current() ctx.nonterminal = "type_e"; - if (current.id == 54) { // :lsquare + if (current.id == 26) { // :lsquare // $type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 ) ctx.rule = rules[76]; ast_parameters = { @@ -1964,11 +1964,11 @@ function led_type_e(left, ctx) { } tree.astTransform = new AstTransformNodeCreator('Type', ast_parameters); tree.add(left); - tree.add(expect(ctx, 54)); // :lsquare + tree.add(expect(ctx, 26)); // :lsquare tree.add(parse__gen17(ctx)); - tree.add(expect(ctx, 41)); // :rsquare + tree.add(expect(ctx, 44)); // :rsquare } - if (current.id == 23) { // :qmark + if (current.id == 9) { // :qmark // $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) ctx.rule = rules[77]; ast_parameters = { @@ -1976,9 +1976,9 @@ function led_type_e(left, ctx) { } tree.astTransform = new AstTransformNodeCreator('OptionalType', ast_parameters); tree.add(left); - tree.add(expect(ctx, 23)); // :qmark + tree.add(expect(ctx, 9)); // :qmark } - if (current.id == 27) { // :plus + if (current.id == 6) { // :plus // $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) ctx.rule = rules[78]; ast_parameters = { @@ -1986,22 +1986,22 @@ function led_type_e(left, ctx) { } tree.astTransform = new AstTransformNodeCreator('NonEmptyType', ast_parameters); tree.add(left); - tree.add(expect(ctx, 27)); // :plus + tree.add(expect(ctx, 6)); // :plus } return tree; } // END definitions for expression parser `type_e` function parse__gen0(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[60][current.id] : -1; - var tree = new ParseTree(new NonTerminal(116, '_gen0')); + var rule = current != null ? table[8][current.id] : -1; + var tree = new ParseTree(new NonTerminal(64, '_gen0')); ctx.nonterminal = "_gen0"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[116].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[116].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[64].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[64].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2010,7 +2010,7 @@ function parse__gen0(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[116].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[64].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_import(ctx)); ctx.nonterminal = "_gen0"; minimum = Math.max(minimum - 1, 0); @@ -2019,15 +2019,15 @@ function parse__gen0(ctx) { } function parse__gen1(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[56][current.id] : -1; - var tree = new ParseTree(new NonTerminal(112, '_gen1')); + var rule = current != null ? table[58][current.id] : -1; + var tree = new ParseTree(new NonTerminal(114, '_gen1')); ctx.nonterminal = "_gen1"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[112].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[112].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[114].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[114].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2036,7 +2036,7 @@ function parse__gen1(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[112].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[114].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_workflow_or_task_or_decl(ctx)); ctx.nonterminal = "_gen1"; minimum = Math.max(minimum - 1, 0); @@ -2045,15 +2045,15 @@ function parse__gen1(ctx) { } function parse__gen10(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[17][current.id] : -1; - var tree = new ParseTree(new NonTerminal(73, '_gen10')); + var rule = current != null ? table[28][current.id] : -1; + var tree = new ParseTree(new NonTerminal(84, '_gen10')); ctx.nonterminal = "_gen10"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[73].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[73].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[84].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[84].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2062,7 +2062,7 @@ function parse__gen10(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[73].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[84].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_wf_body_element(ctx)); ctx.nonterminal = "_gen10"; minimum = Math.max(minimum - 1, 0); @@ -2071,15 +2071,15 @@ function parse__gen10(ctx) { } function parse__gen13(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[47][current.id] : -1; - var tree = new ParseTree(new NonTerminal(103, '_gen13')); + var rule = current != null ? table[22][current.id] : -1; + var tree = new ParseTree(new NonTerminal(78, '_gen13')); ctx.nonterminal = "_gen13"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[103].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[103].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[78].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[78].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2088,7 +2088,7 @@ function parse__gen13(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[103].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[78].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_call_input(ctx)); ctx.nonterminal = "_gen13"; minimum = Math.max(minimum - 1, 0); @@ -2097,15 +2097,15 @@ function parse__gen13(ctx) { } function parse__gen14(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[24][current.id] : -1; - var tree = new ParseTree(new NonTerminal(80, '_gen14')); + var rule = current != null ? table[10][current.id] : -1; + var tree = new ParseTree(new NonTerminal(66, '_gen14')); ctx.nonterminal = "_gen14"; tree.list = true; - tree.listSeparator = 8; + tree.listSeparator = 38; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[80].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[80].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[66].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[66].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2114,11 +2114,11 @@ function parse__gen14(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[80].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[66].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_mapping(ctx)); ctx.nonterminal = "_gen14"; - if ( ctx.tokens.current() != null && ctx.tokens.current().id == 8) { - tree.add(expect(ctx, 8)); + if ( ctx.tokens.current() != null && ctx.tokens.current().id == 38) { + tree.add(expect(ctx, 38)); } else { if (minimum > 1) { throw new SyntaxError(ctx.error_formatter.missing_list_items( @@ -2136,15 +2136,15 @@ function parse__gen14(ctx) { } function parse__gen15(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[58][current.id] : -1; - var tree = new ParseTree(new NonTerminal(114, '_gen15')); + var rule = current != null ? table[3][current.id] : -1; + var tree = new ParseTree(new NonTerminal(59, '_gen15')); ctx.nonterminal = "_gen15"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[114].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[114].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[59].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[59].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2153,7 +2153,7 @@ function parse__gen15(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[114].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[59].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_wf_output(ctx)); ctx.nonterminal = "_gen15"; minimum = Math.max(minimum - 1, 0); @@ -2162,15 +2162,15 @@ function parse__gen15(ctx) { } function parse__gen17(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[20][current.id] : -1; - var tree = new ParseTree(new NonTerminal(76, '_gen17')); + var rule = current != null ? table[29][current.id] : -1; + var tree = new ParseTree(new NonTerminal(85, '_gen17')); ctx.nonterminal = "_gen17"; tree.list = true; - tree.listSeparator = 8; + tree.listSeparator = 38; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[76].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[76].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[85].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[85].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2179,11 +2179,11 @@ function parse__gen17(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[76].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[85].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_type_e(ctx)); ctx.nonterminal = "_gen17"; - if ( ctx.tokens.current() != null && ctx.tokens.current().id == 8) { - tree.add(expect(ctx, 8)); + if ( ctx.tokens.current() != null && ctx.tokens.current().id == 38) { + tree.add(expect(ctx, 38)); } else { if (minimum > 1) { throw new SyntaxError(ctx.error_formatter.missing_list_items( @@ -2201,15 +2201,15 @@ function parse__gen17(ctx) { } function parse__gen18(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[9][current.id] : -1; - var tree = new ParseTree(new NonTerminal(65, '_gen18')); + var rule = current != null ? table[53][current.id] : -1; + var tree = new ParseTree(new NonTerminal(109, '_gen18')); ctx.nonterminal = "_gen18"; tree.list = true; - tree.listSeparator = 8; + tree.listSeparator = 38; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[65].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[65].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[109].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[109].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2218,11 +2218,11 @@ function parse__gen18(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[65].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[109].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_e(ctx)); ctx.nonterminal = "_gen18"; - if ( ctx.tokens.current() != null && ctx.tokens.current().id == 8) { - tree.add(expect(ctx, 8)); + if ( ctx.tokens.current() != null && ctx.tokens.current().id == 38) { + tree.add(expect(ctx, 38)); } else { if (minimum > 1) { throw new SyntaxError(ctx.error_formatter.missing_list_items( @@ -2240,15 +2240,15 @@ function parse__gen18(ctx) { } function parse__gen19(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[29][current.id] : -1; - var tree = new ParseTree(new NonTerminal(85, '_gen19')); + var rule = current != null ? table[49][current.id] : -1; + var tree = new ParseTree(new NonTerminal(105, '_gen19')); ctx.nonterminal = "_gen19"; tree.list = true; - tree.listSeparator = 8; + tree.listSeparator = 38; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[85].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[85].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[105].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[105].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2257,11 +2257,11 @@ function parse__gen19(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[85].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[105].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_object_kv(ctx)); ctx.nonterminal = "_gen19"; - if ( ctx.tokens.current() != null && ctx.tokens.current().id == 8) { - tree.add(expect(ctx, 8)); + if ( ctx.tokens.current() != null && ctx.tokens.current().id == 38) { + tree.add(expect(ctx, 38)); } else { if (minimum > 1) { throw new SyntaxError(ctx.error_formatter.missing_list_items( @@ -2279,15 +2279,15 @@ function parse__gen19(ctx) { } function parse__gen20(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[8][current.id] : -1; - var tree = new ParseTree(new NonTerminal(64, '_gen20')); + var rule = current != null ? table[27][current.id] : -1; + var tree = new ParseTree(new NonTerminal(83, '_gen20')); ctx.nonterminal = "_gen20"; tree.list = true; - tree.listSeparator = 8; + tree.listSeparator = 38; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[64].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[64].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[83].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[83].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2296,11 +2296,11 @@ function parse__gen20(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[64].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[83].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_map_kv(ctx)); ctx.nonterminal = "_gen20"; - if ( ctx.tokens.current() != null && ctx.tokens.current().id == 8) { - tree.add(expect(ctx, 8)); + if ( ctx.tokens.current() != null && ctx.tokens.current().id == 38) { + tree.add(expect(ctx, 38)); } else { if (minimum > 1) { throw new SyntaxError(ctx.error_formatter.missing_list_items( @@ -2318,15 +2318,15 @@ function parse__gen20(ctx) { } function parse__gen3(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[27][current.id] : -1; - var tree = new ParseTree(new NonTerminal(83, '_gen3')); + var rule = current != null ? table[51][current.id] : -1; + var tree = new ParseTree(new NonTerminal(107, '_gen3')); ctx.nonterminal = "_gen3"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[83].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[83].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[107].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[107].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2335,7 +2335,7 @@ function parse__gen3(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[83].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[107].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_declaration(ctx)); ctx.nonterminal = "_gen3"; minimum = Math.max(minimum - 1, 0); @@ -2344,15 +2344,15 @@ function parse__gen3(ctx) { } function parse__gen4(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[38][current.id] : -1; - var tree = new ParseTree(new NonTerminal(94, '_gen4')); + var rule = current != null ? table[13][current.id] : -1; + var tree = new ParseTree(new NonTerminal(69, '_gen4')); ctx.nonterminal = "_gen4"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[94].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[94].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[69].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[69].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2361,7 +2361,7 @@ function parse__gen4(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[94].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[69].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_sections(ctx)); ctx.nonterminal = "_gen4"; minimum = Math.max(minimum - 1, 0); @@ -2370,15 +2370,15 @@ function parse__gen4(ctx) { } function parse__gen5(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[32][current.id] : -1; - var tree = new ParseTree(new NonTerminal(88, '_gen5')); + var rule = current != null ? table[7][current.id] : -1; + var tree = new ParseTree(new NonTerminal(63, '_gen5')); ctx.nonterminal = "_gen5"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[88].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[88].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[63].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[63].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2387,7 +2387,7 @@ function parse__gen5(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[88].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[63].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_command_part(ctx)); ctx.nonterminal = "_gen5"; minimum = Math.max(minimum - 1, 0); @@ -2396,15 +2396,15 @@ function parse__gen5(ctx) { } function parse__gen6(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[33][current.id] : -1; - var tree = new ParseTree(new NonTerminal(89, '_gen6')); + var rule = current != null ? table[60][current.id] : -1; + var tree = new ParseTree(new NonTerminal(116, '_gen6')); ctx.nonterminal = "_gen6"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[89].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[89].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[116].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[116].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2413,7 +2413,7 @@ function parse__gen6(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[89].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[116].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_cmd_param_kv(ctx)); ctx.nonterminal = "_gen6"; minimum = Math.max(minimum - 1, 0); @@ -2422,15 +2422,15 @@ function parse__gen6(ctx) { } function parse__gen7(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[26][current.id] : -1; - var tree = new ParseTree(new NonTerminal(82, '_gen7')); + var rule = current != null ? table[47][current.id] : -1; + var tree = new ParseTree(new NonTerminal(103, '_gen7')); ctx.nonterminal = "_gen7"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[82].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[82].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[103].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[103].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2439,7 +2439,7 @@ function parse__gen7(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[82].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[103].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_output_kv(ctx)); ctx.nonterminal = "_gen7"; minimum = Math.max(minimum - 1, 0); @@ -2448,15 +2448,15 @@ function parse__gen7(ctx) { } function parse__gen8(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[22][current.id] : -1; - var tree = new ParseTree(new NonTerminal(78, '_gen8')); + var rule = current != null ? table[31][current.id] : -1; + var tree = new ParseTree(new NonTerminal(87, '_gen8')); ctx.nonterminal = "_gen8"; tree.list = true; tree.listSeparator = -1; tree.astTransform = new AstTransformSubstitution(0); if ( ctx.tokens.current() != null && - nonterminal_follow[78].indexOf(ctx.tokens.current().id) != -1 && - nonterminal_first[78].indexOf(ctx.tokens.current().id) == -1 ) { + nonterminal_follow[87].indexOf(ctx.tokens.current().id) != -1 && + nonterminal_first[87].indexOf(ctx.tokens.current().id) == -1 ) { return tree; } if ( ctx.tokens.current() == null) { @@ -2465,7 +2465,7 @@ function parse__gen8(ctx) { var minimum = 0; while ( minimum > 0 || (ctx.tokens.current() != null && - nonterminal_first[78].indexOf(ctx.tokens.current().id) != -1)) { + nonterminal_first[87].indexOf(ctx.tokens.current().id) != -1)) { tree.add(parse_kv(ctx)); ctx.nonterminal = "_gen8"; minimum = Math.max(minimum - 1, 0); @@ -2474,10 +2474,10 @@ function parse__gen8(ctx) { } function parse__gen11(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[37][current.id] : -1; - var tree = new ParseTree(new NonTerminal(93, '_gen11')); + var rule = current != null ? table[48][current.id] : -1; + var tree = new ParseTree(new NonTerminal(104, '_gen11')); ctx.nonterminal = "_gen11"; - if (current != null && nonterminal_follow[93].indexOf(current.id) != -1 && nonterminal_first[93].indexOf(current.id) == -1) { + if (current != null && nonterminal_follow[104].indexOf(current.id) != -1 && nonterminal_first[104].indexOf(current.id) == -1) { return tree; } if (current == null) { @@ -2494,10 +2494,10 @@ function parse__gen11(ctx) { } function parse__gen12(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[42][current.id] : -1; - var tree = new ParseTree(new NonTerminal(98, '_gen12')); + var rule = current != null ? table[39][current.id] : -1; + var tree = new ParseTree(new NonTerminal(95, '_gen12')); ctx.nonterminal = "_gen12"; - if (current != null && nonterminal_follow[98].indexOf(current.id) != -1 && nonterminal_first[98].indexOf(current.id) == -1) { + if (current != null && nonterminal_follow[95].indexOf(current.id) != -1 && nonterminal_first[95].indexOf(current.id) == -1) { return tree; } if (current == null) { @@ -2514,10 +2514,10 @@ function parse__gen12(ctx) { } function parse__gen16(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[48][current.id] : -1; - var tree = new ParseTree(new NonTerminal(104, '_gen16')); + var rule = current != null ? table[18][current.id] : -1; + var tree = new ParseTree(new NonTerminal(74, '_gen16')); ctx.nonterminal = "_gen16"; - if (current != null && nonterminal_follow[104].indexOf(current.id) != -1 && nonterminal_first[104].indexOf(current.id) == -1) { + if (current != null && nonterminal_follow[74].indexOf(current.id) != -1 && nonterminal_first[74].indexOf(current.id) == -1) { return tree; } if (current == null) { @@ -2534,10 +2534,10 @@ function parse__gen16(ctx) { } function parse__gen2(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[53][current.id] : -1; - var tree = new ParseTree(new NonTerminal(109, '_gen2')); + var rule = current != null ? table[41][current.id] : -1; + var tree = new ParseTree(new NonTerminal(97, '_gen2')); ctx.nonterminal = "_gen2"; - if (current != null && nonterminal_follow[109].indexOf(current.id) != -1 && nonterminal_first[109].indexOf(current.id) == -1) { + if (current != null && nonterminal_follow[97].indexOf(current.id) != -1 && nonterminal_first[97].indexOf(current.id) == -1) { return tree; } if (current == null) { @@ -2554,10 +2554,10 @@ function parse__gen2(ctx) { } function parse__gen9(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[19][current.id] : -1; - var tree = new ParseTree(new NonTerminal(75, '_gen9')); + var rule = current != null ? table[32][current.id] : -1; + var tree = new ParseTree(new NonTerminal(88, '_gen9')); ctx.nonterminal = "_gen9"; - if (current != null && nonterminal_follow[75].indexOf(current.id) != -1 && nonterminal_first[75].indexOf(current.id) == -1) { + if (current != null && nonterminal_follow[88].indexOf(current.id) != -1 && nonterminal_first[88].indexOf(current.id) == -1) { return tree; } if (current == null) { @@ -2574,8 +2574,8 @@ function parse__gen9(ctx) { } function parse_alias(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[36][current.id] : -1; - var tree = new ParseTree(new NonTerminal(92, 'alias')); + var rule = current != null ? table[54][current.id] : -1; + var tree = new ParseTree(new NonTerminal(110, 'alias')); ctx.nonterminal = "alias"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2583,23 +2583,23 @@ function parse_alias(ctx) { if (rule == 59) { // $alias = :as :identifier -> $1 ctx.rule = rules[59]; tree.astTransform = new AstTransformSubstitution(1); - t = expect(ctx, 24); // :as + t = expect(ctx, 53); // :as tree.add(t); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[92], + nonterminal_first[110], rules[59] )); } function parse_call(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[1][current.id] : -1; - var tree = new ParseTree(new NonTerminal(57, 'call')); + var rule = current != null ? table[40][current.id] : -1; + var tree = new ParseTree(new NonTerminal(96, 'call')); ctx.nonterminal = "call"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2612,9 +2612,9 @@ function parse_call(ctx) { 'body': 3, } tree.astTransform = new AstTransformNodeCreator('Call', ast_parameters); - t = expect(ctx, 30); // :call + t = expect(ctx, 17); // :call tree.add(t); - t = expect(ctx, 50); // :fqn + t = expect(ctx, 45); // :fqn tree.add(t); subtree = parse__gen11(ctx); tree.add(subtree); @@ -2625,14 +2625,14 @@ function parse_call(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[57], + nonterminal_first[96], rules[53] )); } function parse_call_body(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[55][current.id] : -1; - var tree = new ParseTree(new NonTerminal(111, 'call_body')); + var rule = current != null ? table[25][current.id] : -1; + var tree = new ParseTree(new NonTerminal(81, 'call_body')); ctx.nonterminal = "call_body"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2644,27 +2644,27 @@ function parse_call_body(ctx) { 'io': 2, } tree.astTransform = new AstTransformNodeCreator('CallBody', ast_parameters); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen3(ctx); tree.add(subtree); subtree = parse__gen13(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[111], + nonterminal_first[81], rules[55] )); } function parse_call_input(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[4][current.id] : -1; - var tree = new ParseTree(new NonTerminal(60, 'call_input')); + var rule = current != null ? table[42][current.id] : -1; + var tree = new ParseTree(new NonTerminal(98, 'call_input')); ctx.nonterminal = "call_input"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2675,9 +2675,9 @@ function parse_call_input(ctx) { 'map': 2, } tree.astTransform = new AstTransformNodeCreator('Inputs', ast_parameters); - t = expect(ctx, 34); // :input + t = expect(ctx, 5); // :input tree.add(t); - t = expect(ctx, 3); // :colon + t = expect(ctx, 30); // :colon tree.add(t); subtree = parse__gen14(ctx); tree.add(subtree); @@ -2686,14 +2686,14 @@ function parse_call_input(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[60], + nonterminal_first[98], rules[57] )); } function parse_cmd_param(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[44][current.id] : -1; - var tree = new ParseTree(new NonTerminal(100, 'cmd_param')); + var rule = current != null ? table[4][current.id] : -1; + var tree = new ParseTree(new NonTerminal(60, 'cmd_param')); ctx.nonterminal = "cmd_param"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2705,27 +2705,27 @@ function parse_cmd_param(ctx) { 'expr': 2, } tree.astTransform = new AstTransformNodeCreator('CommandParameter', ast_parameters); - t = expect(ctx, 16); // :cmd_param_start + t = expect(ctx, 25); // :cmd_param_start tree.add(t); subtree = parse__gen6(ctx); tree.add(subtree); subtree = parse_e(ctx); tree.add(subtree); - t = expect(ctx, 26); // :cmd_param_end + t = expect(ctx, 48); // :cmd_param_end tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[100], + nonterminal_first[60], rules[23] )); } function parse_cmd_param_kv(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[49][current.id] : -1; - var tree = new ParseTree(new NonTerminal(105, 'cmd_param_kv')); + var rule = current != null ? table[5][current.id] : -1; + var tree = new ParseTree(new NonTerminal(61, 'cmd_param_kv')); ctx.nonterminal = "cmd_param_kv"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2737,11 +2737,11 @@ function parse_cmd_param_kv(ctx) { 'value': 3, } tree.astTransform = new AstTransformNodeCreator('CommandParameterAttr', ast_parameters); - t = expect(ctx, 7); // :cmd_attr_hint + t = expect(ctx, 21); // :cmd_attr_hint tree.add(t); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 25); // :equal + t = expect(ctx, 46); // :equal tree.add(t); subtree = parse_e(ctx); tree.add(subtree); @@ -2750,14 +2750,14 @@ function parse_cmd_param_kv(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[105], + nonterminal_first[61], rules[24] )); } function parse_command(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[3][current.id] : -1; - var tree = new ParseTree(new NonTerminal(59, 'command')); + var rule = current != null ? table[36][current.id] : -1; + var tree = new ParseTree(new NonTerminal(92, 'command')); ctx.nonterminal = "command"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2768,27 +2768,27 @@ function parse_command(ctx) { 'parts': 2, } tree.astTransform = new AstTransformNodeCreator('RawCommand', ast_parameters); - t = expect(ctx, 33); // :raw_command + t = expect(ctx, 1); // :raw_command tree.add(t); - t = expect(ctx, 0); // :raw_cmd_start + t = expect(ctx, 43); // :raw_cmd_start tree.add(t); subtree = parse__gen5(ctx); tree.add(subtree); - t = expect(ctx, 38); // :raw_cmd_end + t = expect(ctx, 28); // :raw_cmd_end tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[59], + nonterminal_first[92], rules[19] )); } function parse_command_part(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[52][current.id] : -1; - var tree = new ParseTree(new NonTerminal(108, 'command_part')); + var rule = current != null ? table[9][current.id] : -1; + var tree = new ParseTree(new NonTerminal(65, 'command_part')); ctx.nonterminal = "command_part"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2796,7 +2796,7 @@ function parse_command_part(ctx) { if (rule == 20) { // $command_part = :cmd_part ctx.rule = rules[20]; tree.astTransform = new AstTransformSubstitution(0); - t = expect(ctx, 13); // :cmd_part + t = expect(ctx, 54); // :cmd_part tree.add(t); return tree; } @@ -2810,14 +2810,14 @@ function parse_command_part(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[108], + nonterminal_first[65], rules[21] )); } function parse_declaration(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[16][current.id] : -1; - var tree = new ParseTree(new NonTerminal(72, 'declaration')); + var rule = current != null ? table[0][current.id] : -1; + var tree = new ParseTree(new NonTerminal(56, 'declaration')); ctx.nonterminal = "declaration"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2832,7 +2832,7 @@ function parse_declaration(ctx) { tree.astTransform = new AstTransformNodeCreator('Declaration', ast_parameters); subtree = parse_type_e(ctx); tree.add(subtree); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); subtree = parse__gen9(ctx); tree.add(subtree); @@ -2841,16 +2841,16 @@ function parse_declaration(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[72], + nonterminal_first[56], rules[36] )); } function parse_document(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[40][current.id] : -1; - var tree = new ParseTree(new NonTerminal(96, 'document')); + var rule = current != null ? table[12][current.id] : -1; + var tree = new ParseTree(new NonTerminal(68, 'document')); ctx.nonterminal = "document"; - if (current != null && nonterminal_follow[96].indexOf(current.id) != -1 && nonterminal_first[96].indexOf(current.id) == -1) { + if (current != null && nonterminal_follow[68].indexOf(current.id) != -1 && nonterminal_first[68].indexOf(current.id) == -1) { return tree; } if (current == null) { @@ -2873,8 +2873,8 @@ function parse_document(ctx) { } function parse_if_stmt(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[28][current.id] : -1; - var tree = new ParseTree(new NonTerminal(84, 'if_stmt')); + var rule = current != null ? table[19][current.id] : -1; + var tree = new ParseTree(new NonTerminal(75, 'if_stmt')); ctx.nonterminal = "if_stmt"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2886,33 +2886,33 @@ function parse_if_stmt(ctx) { 'body': 5, } tree.astTransform = new AstTransformNodeCreator('If', ast_parameters); - t = expect(ctx, 42); // :if + t = expect(ctx, 47); // :if tree.add(t); - t = expect(ctx, 22); // :lparen + t = expect(ctx, 13); // :lparen tree.add(t); subtree = parse_e(ctx); tree.add(subtree); - t = expect(ctx, 49); // :rparen + t = expect(ctx, 31); // :rparen tree.add(t); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen10(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[84], + nonterminal_first[75], rules[72] )); } function parse_import(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[0][current.id] : -1; - var tree = new ParseTree(new NonTerminal(56, 'import')); + var rule = current != null ? table[20][current.id] : -1; + var tree = new ParseTree(new NonTerminal(76, 'import')); ctx.nonterminal = "import"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2924,9 +2924,9 @@ function parse_import(ctx) { 'namespace': 2, } tree.astTransform = new AstTransformNodeCreator('Import', ast_parameters); - t = expect(ctx, 32); // :import + t = expect(ctx, 39); // :import tree.add(t); - t = expect(ctx, 37); // :string + t = expect(ctx, 8); // :string tree.add(t); subtree = parse__gen2(ctx); tree.add(subtree); @@ -2935,14 +2935,14 @@ function parse_import(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[56], + nonterminal_first[76], rules[8] )); } function parse_import_namespace(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[7][current.id] : -1; - var tree = new ParseTree(new NonTerminal(63, 'import_namespace')); + var rule = current != null ? table[57][current.id] : -1; + var tree = new ParseTree(new NonTerminal(113, 'import_namespace')); ctx.nonterminal = "import_namespace"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2950,23 +2950,23 @@ function parse_import_namespace(ctx) { if (rule == 9) { // $import_namespace = :as :identifier -> $1 ctx.rule = rules[9]; tree.astTransform = new AstTransformSubstitution(1); - t = expect(ctx, 24); // :as + t = expect(ctx, 53); // :as tree.add(t); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[63], + nonterminal_first[113], rules[9] )); } function parse_kv(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[46][current.id] : -1; - var tree = new ParseTree(new NonTerminal(102, 'kv')); + var rule = current != null ? table[1][current.id] : -1; + var tree = new ParseTree(new NonTerminal(57, 'kv')); ctx.nonterminal = "kv"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -2978,9 +2978,9 @@ function parse_kv(ctx) { 'value': 2, } tree.astTransform = new AstTransformNodeCreator('RuntimeAttribute', ast_parameters); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 3); // :colon + t = expect(ctx, 30); // :colon tree.add(t); subtree = parse_e(ctx); tree.add(subtree); @@ -2989,14 +2989,14 @@ function parse_kv(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[102], + nonterminal_first[57], rules[33] )); } function parse_map(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[59][current.id] : -1; - var tree = new ParseTree(new NonTerminal(115, 'map')); + var rule = current != null ? table[6][current.id] : -1; + var tree = new ParseTree(new NonTerminal(62, 'map')); ctx.nonterminal = "map"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3004,25 +3004,25 @@ function parse_map(ctx) { if (rule == 32) { // $map = :lbrace $_gen8 :rbrace -> $1 ctx.rule = rules[32]; tree.astTransform = new AstTransformSubstitution(1); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen8(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[115], + nonterminal_first[62], rules[32] )); } function parse_map_kv(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[45][current.id] : -1; - var tree = new ParseTree(new NonTerminal(101, 'map_kv')); + var rule = current != null ? table[24][current.id] : -1; + var tree = new ParseTree(new NonTerminal(80, 'map_kv')); ctx.nonterminal = "map_kv"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3036,7 +3036,7 @@ function parse_map_kv(ctx) { tree.astTransform = new AstTransformNodeCreator('MapLiteralKv', ast_parameters); subtree = parse_e(ctx); tree.add(subtree); - t = expect(ctx, 3); // :colon + t = expect(ctx, 30); // :colon tree.add(t); subtree = parse_e(ctx); tree.add(subtree); @@ -3045,14 +3045,14 @@ function parse_map_kv(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[101], + nonterminal_first[80], rules[38] )); } function parse_mapping(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[41][current.id] : -1; - var tree = new ParseTree(new NonTerminal(97, 'mapping')); + var rule = current != null ? table[26][current.id] : -1; + var tree = new ParseTree(new NonTerminal(82, 'mapping')); ctx.nonterminal = "mapping"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3064,9 +3064,9 @@ function parse_mapping(ctx) { 'value': 2, } tree.astTransform = new AstTransformNodeCreator('IOMapping', ast_parameters); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 25); // :equal + t = expect(ctx, 46); // :equal tree.add(t); subtree = parse_e(ctx); tree.add(subtree); @@ -3075,14 +3075,14 @@ function parse_mapping(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[97], + nonterminal_first[82], rules[58] )); } function parse_meta(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[13][current.id] : -1; - var tree = new ParseTree(new NonTerminal(69, 'meta')); + var rule = current != null ? table[21][current.id] : -1; + var tree = new ParseTree(new NonTerminal(77, 'meta')); ctx.nonterminal = "meta"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3093,7 +3093,7 @@ function parse_meta(ctx) { 'map': 1, } tree.astTransform = new AstTransformNodeCreator('Meta', ast_parameters); - t = expect(ctx, 19); // :meta + t = expect(ctx, 49); // :meta tree.add(t); subtree = parse_map(ctx); tree.add(subtree); @@ -3102,14 +3102,14 @@ function parse_meta(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[69], + nonterminal_first[77], rules[30] )); } function parse_object_kv(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[12][current.id] : -1; - var tree = new ParseTree(new NonTerminal(68, 'object_kv')); + var rule = current != null ? table[50][current.id] : -1; + var tree = new ParseTree(new NonTerminal(106, 'object_kv')); ctx.nonterminal = "object_kv"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3121,9 +3121,9 @@ function parse_object_kv(ctx) { 'value': 2, } tree.astTransform = new AstTransformNodeCreator('ObjectKV', ast_parameters); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 3); // :colon + t = expect(ctx, 30); // :colon tree.add(t); subtree = parse_e(ctx); tree.add(subtree); @@ -3132,14 +3132,14 @@ function parse_object_kv(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[68], + nonterminal_first[106], rules[74] )); } function parse_output_kv(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[34][current.id] : -1; - var tree = new ParseTree(new NonTerminal(90, 'output_kv')); + var rule = current != null ? table[11][current.id] : -1; + var tree = new ParseTree(new NonTerminal(67, 'output_kv')); ctx.nonterminal = "output_kv"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3154,9 +3154,9 @@ function parse_output_kv(ctx) { tree.astTransform = new AstTransformNodeCreator('Output', ast_parameters); subtree = parse_type_e(ctx); tree.add(subtree); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 25); // :equal + t = expect(ctx, 46); // :equal tree.add(t); subtree = parse_e(ctx); tree.add(subtree); @@ -3165,14 +3165,14 @@ function parse_output_kv(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[90], + nonterminal_first[67], rules[27] )); } function parse_outputs(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[43][current.id] : -1; - var tree = new ParseTree(new NonTerminal(99, 'outputs')); + var rule = current != null ? table[2][current.id] : -1; + var tree = new ParseTree(new NonTerminal(58, 'outputs')); ctx.nonterminal = "outputs"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3183,27 +3183,27 @@ function parse_outputs(ctx) { 'attributes': 2, } tree.astTransform = new AstTransformNodeCreator('Outputs', ast_parameters); - t = expect(ctx, 46); // :output + t = expect(ctx, 14); // :output tree.add(t); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen7(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[99], + nonterminal_first[58], rules[26] )); } function parse_parameter_meta(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[5][current.id] : -1; - var tree = new ParseTree(new NonTerminal(61, 'parameter_meta')); + var rule = current != null ? table[16][current.id] : -1; + var tree = new ParseTree(new NonTerminal(72, 'parameter_meta')); ctx.nonterminal = "parameter_meta"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3214,7 +3214,7 @@ function parse_parameter_meta(ctx) { 'map': 1, } tree.astTransform = new AstTransformNodeCreator('ParameterMeta', ast_parameters); - t = expect(ctx, 47); // :parameter_meta + t = expect(ctx, 22); // :parameter_meta tree.add(t); subtree = parse_map(ctx); tree.add(subtree); @@ -3223,14 +3223,14 @@ function parse_parameter_meta(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[61], + nonterminal_first[72], rules[29] )); } function parse_runtime(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[21][current.id] : -1; - var tree = new ParseTree(new NonTerminal(77, 'runtime')); + var rule = current != null ? table[30][current.id] : -1; + var tree = new ParseTree(new NonTerminal(86, 'runtime')); ctx.nonterminal = "runtime"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3241,7 +3241,7 @@ function parse_runtime(ctx) { 'map': 1, } tree.astTransform = new AstTransformNodeCreator('Runtime', ast_parameters); - t = expect(ctx, 21); // :runtime + t = expect(ctx, 32); // :runtime tree.add(t); subtree = parse_map(ctx); tree.add(subtree); @@ -3250,14 +3250,14 @@ function parse_runtime(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[77], + nonterminal_first[86], rules[28] )); } function parse_scatter(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[2][current.id] : -1; - var tree = new ParseTree(new NonTerminal(58, 'scatter')); + var rule = current != null ? table[59][current.id] : -1; + var tree = new ParseTree(new NonTerminal(115, 'scatter')); ctx.nonterminal = "scatter"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3272,35 +3272,35 @@ function parse_scatter(ctx) { tree.astTransform = new AstTransformNodeCreator('Scatter', ast_parameters); t = expect(ctx, 52); // :scatter tree.add(t); - t = expect(ctx, 22); // :lparen + t = expect(ctx, 13); // :lparen tree.add(t); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 31); // :in + t = expect(ctx, 33); // :in tree.add(t); subtree = parse_e(ctx); tree.add(subtree); - t = expect(ctx, 49); // :rparen + t = expect(ctx, 31); // :rparen tree.add(t); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen10(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[58], + nonterminal_first[115], rules[73] )); } function parse_sections(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[30][current.id] : -1; - var tree = new ParseTree(new NonTerminal(86, 'sections')); + var rule = current != null ? table[46][current.id] : -1; + var tree = new ParseTree(new NonTerminal(102, 'sections')); ctx.nonterminal = "sections"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3343,14 +3343,14 @@ function parse_sections(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[86], + nonterminal_first[102], rules[17] )); } function parse_setter(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[54][current.id] : -1; - var tree = new ParseTree(new NonTerminal(110, 'setter')); + var rule = current != null ? table[14][current.id] : -1; + var tree = new ParseTree(new NonTerminal(70, 'setter')); ctx.nonterminal = "setter"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3358,7 +3358,7 @@ function parse_setter(ctx) { if (rule == 37) { // $setter = :equal $e -> $1 ctx.rule = rules[37]; tree.astTransform = new AstTransformSubstitution(1); - t = expect(ctx, 25); // :equal + t = expect(ctx, 46); // :equal tree.add(t); subtree = parse_e(ctx); tree.add(subtree); @@ -3367,7 +3367,7 @@ function parse_setter(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[110], + nonterminal_first[70], rules[37] )); } @@ -3387,17 +3387,17 @@ function parse_task(ctx) { 'sections': 4, } tree.astTransform = new AstTransformNodeCreator('Task', ast_parameters); - t = expect(ctx, 51); // :task + t = expect(ctx, 37); // :task tree.add(t); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen3(ctx); tree.add(subtree); subtree = parse__gen4(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } @@ -3410,8 +3410,8 @@ function parse_task(ctx) { } function parse_wf_body_element(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[23][current.id] : -1; - var tree = new ParseTree(new NonTerminal(79, 'wf_body_element')); + var rule = current != null ? table[33][current.id] : -1; + var tree = new ParseTree(new NonTerminal(89, 'wf_body_element')); ctx.nonterminal = "wf_body_element"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3475,14 +3475,14 @@ function parse_wf_body_element(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[79], + nonterminal_first[89], rules[48] )); } function parse_wf_meta(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[6][current.id] : -1; - var tree = new ParseTree(new NonTerminal(62, 'wf_meta')); + var rule = current != null ? table[52][current.id] : -1; + var tree = new ParseTree(new NonTerminal(108, 'wf_meta')); ctx.nonterminal = "wf_meta"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3493,7 +3493,7 @@ function parse_wf_meta(ctx) { 'map': 1, } tree.astTransform = new AstTransformNodeCreator('Meta', ast_parameters); - t = expect(ctx, 19); // :meta + t = expect(ctx, 49); // :meta tree.add(t); subtree = parse_map(ctx); tree.add(subtree); @@ -3502,14 +3502,14 @@ function parse_wf_meta(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[62], + nonterminal_first[108], rules[70] )); } function parse_wf_output(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[57][current.id] : -1; - var tree = new ParseTree(new NonTerminal(113, 'wf_output')); + var rule = current != null ? table[37][current.id] : -1; + var tree = new ParseTree(new NonTerminal(93, 'wf_output')); ctx.nonterminal = "wf_output"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3531,14 +3531,14 @@ function parse_wf_output(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[113], + nonterminal_first[93], rules[63] )); } function parse_wf_output_declaration_syntax(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[25][current.id] : -1; - var tree = new ParseTree(new NonTerminal(81, 'wf_output_declaration_syntax')); + var rule = current != null ? table[38][current.id] : -1; + var tree = new ParseTree(new NonTerminal(94, 'wf_output_declaration_syntax')); ctx.nonterminal = "wf_output_declaration_syntax"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3553,9 +3553,9 @@ function parse_wf_output_declaration_syntax(ctx) { tree.astTransform = new AstTransformNodeCreator('WorkflowOutputDeclaration', ast_parameters); subtree = parse_type_e(ctx); tree.add(subtree); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 25); // :equal + t = expect(ctx, 46); // :equal tree.add(t); subtree = parse_e(ctx); tree.add(subtree); @@ -3564,14 +3564,14 @@ function parse_wf_output_declaration_syntax(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[81], + nonterminal_first[94], rules[64] )); } function parse_wf_output_wildcard(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[11][current.id] : -1; - var tree = new ParseTree(new NonTerminal(67, 'wf_output_wildcard')); + var rule = current != null ? table[43][current.id] : -1; + var tree = new ParseTree(new NonTerminal(99, 'wf_output_wildcard')); ctx.nonterminal = "wf_output_wildcard"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3579,23 +3579,23 @@ function parse_wf_output_wildcard(ctx) { if (rule == 68) { // $wf_output_wildcard = :dot :asterisk -> $1 ctx.rule = rules[68]; tree.astTransform = new AstTransformSubstitution(1); - t = expect(ctx, 18); // :dot + t = expect(ctx, 35); // :dot tree.add(t); - t = expect(ctx, 43); // :asterisk + t = expect(ctx, 10); // :asterisk tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[67], + nonterminal_first[99], rules[68] )); } function parse_wf_output_wildcard_syntax(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[50][current.id] : -1; - var tree = new ParseTree(new NonTerminal(106, 'wf_output_wildcard_syntax')); + var rule = current != null ? table[35][current.id] : -1; + var tree = new ParseTree(new NonTerminal(91, 'wf_output_wildcard_syntax')); ctx.nonterminal = "wf_output_wildcard_syntax"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3607,7 +3607,7 @@ function parse_wf_output_wildcard_syntax(ctx) { 'wildcard': 1, } tree.astTransform = new AstTransformNodeCreator('WorkflowOutputWildcard', ast_parameters); - t = expect(ctx, 50); // :fqn + t = expect(ctx, 45); // :fqn tree.add(t); subtree = parse__gen16(ctx); tree.add(subtree); @@ -3616,14 +3616,14 @@ function parse_wf_output_wildcard_syntax(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[106], + nonterminal_first[91], rules[67] )); } function parse_wf_outputs(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[39][current.id] : -1; - var tree = new ParseTree(new NonTerminal(95, 'wf_outputs')); + var rule = current != null ? table[23][current.id] : -1; + var tree = new ParseTree(new NonTerminal(79, 'wf_outputs')); ctx.nonterminal = "wf_outputs"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3634,27 +3634,27 @@ function parse_wf_outputs(ctx) { 'outputs': 2, } tree.astTransform = new AstTransformNodeCreator('WorkflowOutputs', ast_parameters); - t = expect(ctx, 46); // :output + t = expect(ctx, 14); // :output tree.add(t); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen15(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[95], + nonterminal_first[79], rules[61] )); } function parse_wf_parameter_meta(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[35][current.id] : -1; - var tree = new ParseTree(new NonTerminal(91, 'wf_parameter_meta')); + var rule = current != null ? table[44][current.id] : -1; + var tree = new ParseTree(new NonTerminal(100, 'wf_parameter_meta')); ctx.nonterminal = "wf_parameter_meta"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3665,7 +3665,7 @@ function parse_wf_parameter_meta(ctx) { 'map': 1, } tree.astTransform = new AstTransformNodeCreator('ParameterMeta', ast_parameters); - t = expect(ctx, 47); // :parameter_meta + t = expect(ctx, 22); // :parameter_meta tree.add(t); subtree = parse_map(ctx); tree.add(subtree); @@ -3674,14 +3674,14 @@ function parse_wf_parameter_meta(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[91], + nonterminal_first[100], rules[69] )); } function parse_while_loop(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[18][current.id] : -1; - var tree = new ParseTree(new NonTerminal(74, 'while_loop')); + var rule = current != null ? table[34][current.id] : -1; + var tree = new ParseTree(new NonTerminal(90, 'while_loop')); ctx.nonterminal = "while_loop"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3693,33 +3693,33 @@ function parse_while_loop(ctx) { 'body': 5, } tree.astTransform = new AstTransformNodeCreator('WhileLoop', ast_parameters); - t = expect(ctx, 48); // :while + t = expect(ctx, 20); // :while tree.add(t); - t = expect(ctx, 22); // :lparen + t = expect(ctx, 13); // :lparen tree.add(t); subtree = parse_e(ctx); tree.add(subtree); - t = expect(ctx, 49); // :rparen + t = expect(ctx, 31); // :rparen tree.add(t); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen10(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[74], + nonterminal_first[90], rules[71] )); } function parse_workflow(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[10][current.id] : -1; - var tree = new ParseTree(new NonTerminal(66, 'workflow')); + var rule = current != null ? table[45][current.id] : -1; + var tree = new ParseTree(new NonTerminal(101, 'workflow')); ctx.nonterminal = "workflow"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3731,29 +3731,29 @@ function parse_workflow(ctx) { 'body': 3, } tree.astTransform = new AstTransformNodeCreator('Workflow', ast_parameters); - t = expect(ctx, 36); // :workflow + t = expect(ctx, 42); // :workflow tree.add(t); - t = expect(ctx, 14); // :identifier + t = expect(ctx, 3); // :identifier tree.add(t); - t = expect(ctx, 20); // :lbrace + t = expect(ctx, 36); // :lbrace tree.add(t); subtree = parse__gen10(ctx); tree.add(subtree); - t = expect(ctx, 6); // :rbrace + t = expect(ctx, 55); // :rbrace tree.add(t); return tree; } throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[66], + nonterminal_first[101], rules[40] )); } function parse_workflow_or_task_or_decl(ctx) { var current = ctx.tokens.current(); - var rule = current != null ? table[14][current.id] : -1; - var tree = new ParseTree(new NonTerminal(70, 'workflow_or_task_or_decl')); + var rule = current != null ? table[17][current.id] : -1; + var tree = new ParseTree(new NonTerminal(73, 'workflow_or_task_or_decl')); ctx.nonterminal = "workflow_or_task_or_decl"; if (current == null) { throw new SyntaxError('Error: unexpected end of file'); @@ -3782,7 +3782,7 @@ function parse_workflow_or_task_or_decl(ctx) { throw new SyntaxError(ctx.error_formatter.unexpected_symbol( ctx.nonterminal, ctx.tokens.current(), - nonterminal_first[70], + nonterminal_first[73], rules[5] )); } @@ -3838,9 +3838,6 @@ function emit(ctx, terminal, source_string, line, col) { function default_action(ctx, terminal, source_string, line, col) { emit(ctx, terminal, source_string, line, col) } -function post_filter(tokens) { - return tokens -} function destroy(context) { return 0; } @@ -5544,8 +5541,7 @@ function lex(string, resource) { } } destroy(ctx.user_context) - filtered = post_filter(ctx.tokens) - return new TokenStream(filtered) + return new TokenStream(ctx.tokens) } // Section: Main // Section: Exports diff --git a/parsers/python/Makefile b/parsers/python/Makefile new file mode 100644 index 0000000..4ebb1c6 --- /dev/null +++ b/parsers/python/Makefile @@ -0,0 +1,5 @@ +all: generate +generate: + hermes generate ../../grammar.hgr --language=python --name=wdl --header --directory . +clean: + rm wdl_parser.py diff --git a/parsers/python/README.md b/parsers/python/README.md new file mode 100644 index 0000000..d1ec568 --- /dev/null +++ b/parsers/python/README.md @@ -0,0 +1,6 @@ +# Python parser for WDL + +The file `wdl_parser.py` provides a WDL parser for Python. This parser is currently unsupported, so caveat emptor. We believe it will work but do not have the resources to validate this claim. If you encounter difficult using this parser and are willing to help us fix the issue we'll work with you to do so. + +To generate a new version of the parser simply type `make` in this directory. + diff --git a/parsers/python/wdl_parser.py b/parsers/python/wdl_parser.py new file mode 100644 index 0000000..c66e8e6 --- /dev/null +++ b/parsers/python/wdl_parser.py @@ -0,0 +1,3856 @@ + +# This file was generated by Hermes Parser Generator on Fri Feb 24 16:14:01 2017 +# +# Hermes command: hermes generate ../../grammar.hgr --language=python --name=wdl --header --directory . +# Run from: . (relative to this file) +# Hermes version: hermes-parser 2.0rc6 +# +# !!! DO NOT CHANGE THIS FILE DIRECTLY !!! +# +# If you wish to change something in this file, either change the grammar and +# re-generate this file, or change the templates in Hermes and regenerate. +# See the Hermes repository: http://github.com/scottfrazer/hermes +import sys +import os +import re +import base64 +import argparse +from collections import OrderedDict +# Common Code # +def parse_tree_string(parsetree, indent=None, b64_source=True, indent_level=0, debug=False): + indent_str = (' ' * indent * indent_level) if indent else '' + if isinstance(parsetree, ParseTree): + children = [parse_tree_string(child, indent, b64_source, indent_level+1, debug) for child in parsetree.children] + debug_str = parsetree.debug_str() if debug else '' + if indent is None or len(children) == 0: + return '{0}({1}: {2}{3})'.format(indent_str, parsetree.nonterminal, debug_str, ', '.join(children)) + else: + return '{0}({1}:{2}\n{3}\n{4})'.format( + indent_str, + parsetree.nonterminal, + debug_str, + ',\n'.join(children), + indent_str + ) + elif isinstance(parsetree, Terminal): + return indent_str + parsetree.dumps(b64_source=b64_source) +def ast_string(ast, indent=None, b64_source=True, indent_level=0): + indent_str = (' ' * indent * indent_level) if indent else '' + next_indent_str = (' ' * indent * (indent_level+1)) if indent else '' + if isinstance(ast, Ast): + children = OrderedDict([(k, ast_string(v, indent, b64_source, indent_level+1)) for k, v in ast.attributes.items()]) + if indent is None: + return '({0}: {1})'.format( + ast.name, + ', '.join('{0}={1}'.format(k, v) for k, v in children.items()) + ) + else: + return '({0}:\n{1}\n{2})'.format( + ast.name, + ',\n'.join(['{0}{1}={2}'.format(next_indent_str, k, v) for k, v in children.items()]), + indent_str + ) + elif isinstance(ast, list): + children = [ast_string(element, indent, b64_source, indent_level+1) for element in ast] + if indent is None or len(children) == 0: + return '[{0}]'.format(', '.join(children)) + else: + return '[\n{1}\n{0}]'.format( + indent_str, + ',\n'.join(['{0}{1}'.format(next_indent_str, child) for child in children]), + ) + elif isinstance(ast, Terminal): + return ast.dumps(b64_source=b64_source) +class Terminal: + def __init__(self, id, str, source_string, resource, line, col): + self.__dict__.update(locals()) + def getId(self): + return self.id + def ast(self): + return self + def dumps(self, b64_source=True, **kwargs): + source_string = base64.b64encode(self.source_string.encode('utf-8')).decode('utf-8') if b64_source else self.source_string + return '<{resource}:{line}:{col} {terminal} "{source}">'.format( + resource=self.resource, + line=self.line, + col=self.col, + terminal=self.str, + source=source_string + ) + def __str__(self): + return self.dumps() +class NonTerminal(): + def __init__(self, id, str): + self.__dict__.update(locals()) + self.list = False + def __str__(self): + return self.str +class AstTransform: + pass +class AstTransformSubstitution(AstTransform): + def __init__(self, idx): + self.__dict__.update(locals()) + def __repr__(self): + return '$' + str(self.idx) + def __str__(self): + return self.__repr__() +class AstTransformNodeCreator(AstTransform): + def __init__( self, name, parameters ): + self.__dict__.update(locals()) + def __repr__( self ): + return self.name + '( ' + ', '.join(['%s=$%s' % (k,str(v)) for k,v in self.parameters.items()]) + ' )' + def __str__(self): + return self.__repr__() +class AstList(list): + def ast(self): + retval = [] + for ast in self: + retval.append(ast.ast()) + return retval + def dumps(self, indent=None, b64_source=True): + args = locals() + del args['self'] + return ast_string(self, **args) +class ParseTree(): + def __init__(self, nonterminal): + self.__dict__.update(locals()) + self.children = [] + self.astTransform = None + self.isExpr = False + self.isNud = False + self.isPrefix = False + self.isInfix = False + self.nudMorphemeCount = 0 + self.isExprNud = False # true for rules like _expr := {_expr} + {...} + self.list_separator_id = None + self.list = False + def debug_str(self): + from copy import deepcopy + def h(v): + if v == False or v is None: + return str(v) + from xtermcolor import colorize + return colorize(str(v), ansi=190) + d = deepcopy(self.__dict__) + for key in ['self', 'nonterminal', 'children']: + del d[key] + f = {k: v for k, v in d.items() if v != False and v is not None} + return ' [{}]'.format(', '.join(['{}={}'.format(k,h(v)) for k,v in f.items()])) + def add(self, tree): + self.children.append( tree ) + def ast(self): + if self.list == True: + r = AstList() + if len(self.children) == 0: + return r + for child in self.children: + if isinstance(child, Terminal) and self.list_separator_id is not None and child.id == self.list_separator_id: + continue + r.append(child.ast()) + return r + elif self.isExpr: + if isinstance(self.astTransform, AstTransformSubstitution): + return self.children[self.astTransform.idx].ast() + elif isinstance(self.astTransform, AstTransformNodeCreator): + parameters = OrderedDict() + for name, idx in self.astTransform.parameters.items(): + if idx == '$': + child = self.children[0] + elif isinstance(self.children[0], ParseTree) and \ + self.children[0].isNud and \ + not self.children[0].isPrefix and \ + not self.isExprNud and \ + not self.isInfix: + if idx < self.children[0].nudMorphemeCount: + child = self.children[0].children[idx] + else: + index = idx - self.children[0].nudMorphemeCount + 1 + child = self.children[index] + elif len(self.children) == 1 and not isinstance(self.children[0], ParseTree) and not isinstance(self.children[0], list): + return self.children[0] + else: + child = self.children[idx] + parameters[name] = child.ast() + return Ast(self.astTransform.name, parameters) + else: + if isinstance(self.astTransform, AstTransformSubstitution): + return self.children[self.astTransform.idx].ast() + elif isinstance(self.astTransform, AstTransformNodeCreator): + parameters = OrderedDict() + for name, idx in self.astTransform.parameters.items(): + parameters[name] = self.children[idx].ast() + return Ast(self.astTransform.name, parameters) + elif len(self.children): + return self.children[0].ast() + else: + return None + def dumps(self, indent=None, b64_source=True, debug=False): + args = locals() + del args['self'] + return parse_tree_string(self, **args) +class Ast(): + def __init__(self, name, attributes): + self.__dict__.update(locals()) + def attr(self, attr): + return self.attributes[attr] + def dumps(self, indent=None, b64_source=True): + args = locals() + del args['self'] + return ast_string(self, **args) +class SyntaxError(Exception): + def __init__(self, message): + self.__dict__.update(locals()) + def __str__(self): + return self.message +class TokenStream(list): + def __init__(self, arg=[]): + super(TokenStream, self).__init__(arg) + self.index = 0 + def advance(self): + self.index += 1 + return self.current() + def last(self): + return self[-1] + def current(self): + try: + return self[self.index] + except IndexError: + return None +class DefaultSyntaxErrorHandler: + def __init__(self): + self.errors = [] + def _error(self, string): + error = SyntaxError(string) + self.errors.append(error) + return error + def unexpected_eof(self): + return self._error("Error: unexpected end of file") + def excess_tokens(self): + return self._error("Finished parsing without consuming all tokens.") + def unexpected_symbol(self, nonterminal, actual_terminal, expected_terminals, rule): + return self._error("Unexpected symbol (line {line}, col {col}) when parsing parse_{nt}. Expected {expected}, got {actual}.".format( + line=actual_terminal.line, + col=actual_terminal.col, + nt=nonterminal, + expected=', '.join(expected_terminals), + actual=actual_terminal + )) + def no_more_tokens(self, nonterminal, expected_terminal, last_terminal): + return self._error("No more tokens. Expecting " + expected_terminal) + def invalid_terminal(self, nonterminal, invalid_terminal): + return self._error("Invalid symbol ID: {} ({})".format(invalid_terminal.id, invalid_terminal.string)) + def unrecognized_token(self, string, line, col): + lines = string.split('\n') + bad_line = lines[line-1] + return self._error('Unrecognized token on line {}, column {}:\n\n{}\n{}'.format( + line, col, bad_line, ''.join([' ' for x in range(col-1)]) + '^' + )) + def missing_list_items(self, method, required, found, last): + return self._error("List for {} requires {} items but only {} were found.".format(method, required, found)) + def missing_terminator(self, method, terminator, last): + return self._error("List for "+method+" is missing a terminator") +class ParserContext: + def __init__(self, tokens, errors): + self.__dict__.update(locals()) + self.nonterminal_string = None + self.rule_string = None +# Parser Code # +terminals = { + 0: 'object', + 1: 'meta', + 2: 'runtime', + 3: 'slash', + 4: 'raw_cmd_start', + 5: 'comma', + 6: 'cmd_param_start', + 7: 'output', + 8: 'type', + 9: 'rparen', + 10: 'dot', + 11: 'lparen', + 12: 'double_equal', + 13: 'while', + 14: 'qmark', + 15: 'task', + 16: 'string', + 17: 'float', + 18: 'lt', + 19: 'lsquare', + 20: 'workflow', + 21: 'if', + 22: 'double_pipe', + 23: 'double_ampersand', + 24: 'lteq', + 25: 'lbrace', + 26: 'not', + 27: 'boolean', + 28: 'asterisk', + 29: 'call', + 30: 'colon', + 31: 'fqn', + 32: 'cmd_param_end', + 33: 'equal', + 34: 'in', + 35: 'e', + 36: 'percent', + 37: 'rsquare', + 38: 'cmd_part', + 39: 'input', + 40: 'as', + 41: 'gt', + 42: 'type_e', + 43: 'not_equal', + 44: 'identifier', + 45: 'plus', + 46: 'import', + 47: 'dash', + 48: 'gteq', + 49: 'integer', + 50: 'cmd_attr_hint', + 51: 'rbrace', + 52: 'parameter_meta', + 53: 'raw_command', + 54: 'scatter', + 55: 'raw_cmd_end', + 'object': 0, + 'meta': 1, + 'runtime': 2, + 'slash': 3, + 'raw_cmd_start': 4, + 'comma': 5, + 'cmd_param_start': 6, + 'output': 7, + 'type': 8, + 'rparen': 9, + 'dot': 10, + 'lparen': 11, + 'double_equal': 12, + 'while': 13, + 'qmark': 14, + 'task': 15, + 'string': 16, + 'float': 17, + 'lt': 18, + 'lsquare': 19, + 'workflow': 20, + 'if': 21, + 'double_pipe': 22, + 'double_ampersand': 23, + 'lteq': 24, + 'lbrace': 25, + 'not': 26, + 'boolean': 27, + 'asterisk': 28, + 'call': 29, + 'colon': 30, + 'fqn': 31, + 'cmd_param_end': 32, + 'equal': 33, + 'in': 34, + 'e': 35, + 'percent': 36, + 'rsquare': 37, + 'cmd_part': 38, + 'input': 39, + 'as': 40, + 'gt': 41, + 'type_e': 42, + 'not_equal': 43, + 'identifier': 44, + 'plus': 45, + 'import': 46, + 'dash': 47, + 'gteq': 48, + 'integer': 49, + 'cmd_attr_hint': 50, + 'rbrace': 51, + 'parameter_meta': 52, + 'raw_command': 53, + 'scatter': 54, + 'raw_cmd_end': 55, +} +# table[nonterminal][terminal] = rule +table = [ + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 17, 15, -1, -1, -1, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, 13, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 50, -1, -1, -1, -1, -1, 50, 50, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, 50, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, 50, 50, -1, 50, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6, -1, 7, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, 66, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 35, 35, -1, -1, -1, -1, 35, 35, -1, -1, -1, -1, 35, -1, 35, -1, -1, -1, -1, 35, 35, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, 34, -1, -1, -1, -1, -1, 35, -1, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, 35, 35, 35, 35, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 52, -1, -1, -1, -1, -1, 52, 52, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, 51, -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, 52, 52, -1, 52, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, 38, 38, -1, 38, -1, -1, -1, -1, -1, 38, 38, 38, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, 38, 38, -1, 38, -1, 38, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, 48, -1, -1, -1, -1, -1, 46, 42, -1, -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, 45, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], + [-1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], +] +nonterminal_first = { + 56: [0, 35, -1, 11, 44, 45, 16, 17, 49, 19, 25, 26, 27, 47], + 57: [44, -1], + 58: [25], + 59: [1, 52, 53, 2, 7], + 60: [-1, 1, 52, 53, 2, 7], + 61: [13], + 62: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 63: [33], + 64: [-1, 40], + 65: [44, -1], + 66: [1], + 67: [20, 8, -1, 42, 15], + 68: [-1, 38, 6], + 69: [31], + 70: [25], + 71: [8, 42], + 72: [39], + 73: [44], + 74: [8, -1, 42], + 75: [1, 13, 7, 21, 8, -1, 42, 52, 54, 29], + 76: [40], + 77: [52], + 78: [52], + 79: [10], + 80: [15], + 81: [-1, 40], + 82: [50], + 83: [8, -1, 42], + 84: [50, -1], + 85: [44], + 86: [0, 35, -1, 11, 44, 45, 16, 17, 49, 19, 25, 26, 27, 47], + 87: [2], + 88: [7], + 89: [-1, 10], + 90: [20, 8, 42, 15], + 91: [40], + 92: [-1, 33], + 93: [20], + 94: [53], + 95: [46], + 96: [54], + 97: [44, -1], + 98: [21], + 99: [1], + 100: [8, -1, 42], + 101: [20, 46, 8, -1, 42, 15], + 102: [8, 42], + 103: [-1, 25], + 104: [8, 42, 31], + 105: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 106: [6], + 107: [8, 42], + 108: [8, -1, 42, 31], + 109: [1, 13, 7, 21, 8, 42, 52, 54, 29], + 110: [29], + 111: [8, 42], + 112: [44], + 113: [7], + 114: [-1, 39], + 115: [46, -1], + 116: [38, 6], +} +nonterminal_follow = { + 56: [9, 37], + 57: [51], + 58: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 59: [1, 2, 7, 51, 52, 53], + 60: [51], + 61: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 62: [0, 1, 2, 3, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 18, 19, 24, 22, 23, 20, 21, -1, 25, 26, 27, 28, 29, 31, 30, 32, 35, 36, 37, 39, 41, 42, 43, 44, 45, 48, 49, 50, 51, 52, 53, 54, 47], + 63: [1, 2, 39, 7, 8, 42, 13, 15, 20, 21, 51, -1, 52, 53, 54, 29], + 64: [1, 7, 21, 8, 51, 42, 52, 25, 54, 13, 29], + 65: [51], + 66: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 67: [-1], + 68: [55], + 69: [8, 51, 42, 31], + 70: [1, 2, 7, 21, 8, 51, 52, 53, 42, 54, 13, 29], + 71: [1, 2, 39, 7, 8, 42, 13, 15, 20, 21, 51, -1, 52, 53, 54, 29], + 72: [51, 39], + 73: [5, 51, 39], + 74: [37], + 75: [51], + 76: [1, 7, 21, 8, 51, 42, 52, 25, 54, 13, 29], + 77: [1, 2, 7, 51, 52, 53], + 78: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 79: [8, 51, 42, 31], + 80: [20, 8, -1, 42, 15], + 81: [20, 46, 8, -1, 42, 15], + 82: [0, 16, 17, 49, 50, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 83: [51], + 84: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 85: [5, 51], + 86: [51], + 87: [1, 2, 7, 51, 52, 53], + 88: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 89: [8, 51, 42, 31], + 90: [20, 8, -1, 42, 15], + 91: [20, 46, 8, -1, 42, 15], + 92: [1, 2, 39, 7, 8, 42, 13, 15, 20, 21, 51, -1, 52, 53, 54, 29], + 93: [20, 8, -1, 42, 15], + 94: [1, 2, 7, 51, 52, 53], + 95: [20, 46, 8, -1, 42, 15], + 96: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 97: [51, 39], + 98: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 99: [1, 2, 7, 51, 52, 53], + 100: [1, 52, 53, 2, 39, 7], + 101: [-1], + 102: [8, 51, 42], + 103: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 104: [8, 51, 42, 31], + 105: [5, 51], + 106: [38, 55, 6], + 107: [8, 51, 42, 31], + 108: [51], + 109: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 110: [1, 13, 7, 21, 8, 51, 42, 52, 54, 29], + 111: [5, 44, 37], + 112: [51, 44], + 113: [1, 2, 7, 51, 52, 53], + 114: [51], + 115: [20, 8, -1, 42, 15], + 116: [38, 55, 6], +} +rule_first = { + 0: [46, -1], + 1: [20, 8, -1, 42, 15], + 2: [46, 20, 8, -1, 42, 15], + 3: [20], + 4: [15], + 5: [8, 42], + 6: [40], + 7: [-1], + 8: [46], + 9: [40], + 10: [8, -1, 42], + 11: [1, 2, 7, -1, 52, 53], + 12: [15], + 13: [53], + 14: [7], + 15: [2], + 16: [52], + 17: [1], + 18: [-1, 38, 6], + 19: [53], + 20: [38], + 21: [6], + 22: [50, -1], + 23: [6], + 24: [50], + 25: [8, -1, 42], + 26: [7], + 27: [8, 42], + 28: [2], + 29: [52], + 30: [1], + 31: [-1, 44], + 32: [25], + 33: [44], + 34: [33], + 35: [-1], + 36: [8, 42], + 37: [33], + 38: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 39: [1, 13, 7, 21, 8, -1, 42, 52, 54, 29], + 40: [20], + 41: [29], + 42: [8, 42], + 43: [13], + 44: [21], + 45: [54], + 46: [7], + 47: [52], + 48: [1], + 49: [40], + 50: [-1], + 51: [25], + 52: [-1], + 53: [29], + 54: [-1, 39], + 55: [25], + 56: [-1, 44], + 57: [39], + 58: [44], + 59: [40], + 60: [8, -1, 42, 31], + 61: [7], + 62: [8, 42], + 63: [31], + 64: [8, 42], + 65: [10], + 66: [-1], + 67: [31], + 68: [10], + 69: [52], + 70: [1], + 71: [13], + 72: [21], + 73: [54], + 74: [44], + 75: [8, -1, 42], + 76: [8], + 77: [8], + 78: [8], + 79: [8], + 80: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 81: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 82: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 83: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 84: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 85: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 86: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 87: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 88: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 89: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 90: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 91: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 92: [0, 16, 17, 49, 35, 19, 25, 26, 27, 11, 44, 47, 45], + 93: [26], + 94: [45], + 95: [47], + 96: [0, 16, 17, 49, 35, 19, -1, 25, 26, 27, 11, 44, 47, 45], + 97: [44], + 98: [44], + 99: [44], + 100: [-1, 44], + 101: [0], + 102: [19], + 103: [0, 16, 17, 49, 35, 19, -1, 25, 26, 27, 11, 44, 47, 45], + 104: [25], + 105: [11], + 106: [16], + 107: [44], + 108: [27], + 109: [49], + 110: [17], +} +nonterminal_rules = { + 56: [ + "$_gen18 = list($e, :comma)", + ], + 57: [ + "$_gen8 = list($kv)", + ], + 58: [ + "$call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 )", + ], + 59: [ + "$sections = $command", + "$sections = $outputs", + "$sections = $runtime", + "$sections = $parameter_meta", + "$sections = $meta", + ], + 60: [ + "$_gen4 = list($sections)", + ], + 61: [ + "$while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 )", + ], + 62: [ + "$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )", + "$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )", + "$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )", + "$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )", + "$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )", + "$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )", + "$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )", + "$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )", + "$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )", + "$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )", + "$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )", + "$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )", + "$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )", + "$e = :not $e -> LogicalNot( expression=$1 )", + "$e = :plus $e -> UnaryPlus( expression=$1 )", + "$e = :dash $e -> UnaryNegation( expression=$1 )", + "$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )", + "$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )", + "$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )", + "$e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 )", + "$e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 )", + "$e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 )", + "$e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 )", + "$e = :string", + "$e = :identifier", + "$e = :boolean", + "$e = :integer", + "$e = :float", + ], + 63: [ + "$setter = :equal $e -> $1", + ], + 64: [ + "$_gen11 = $alias", + "$_gen11 = :_empty", + ], + 65: [ + "$_gen19 = list($object_kv, :comma)", + ], + 66: [ + "$wf_meta = :meta $map -> Meta( map=$1 )", + ], + 67: [ + "$_gen1 = list($workflow_or_task_or_decl)", + ], + 68: [ + "$_gen5 = list($command_part)", + ], + 69: [ + "$wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 )", + ], + 70: [ + "$map = :lbrace $_gen8 :rbrace -> $1", + ], + 71: [ + "$declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 )", + ], + 72: [ + "$call_input = :input :colon $_gen14 -> Inputs( map=$2 )", + ], + 73: [ + "$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )", + ], + 74: [ + "$_gen17 = list($type_e, :comma)", + ], + 75: [ + "$_gen10 = list($wf_body_element)", + ], + 76: [ + "$alias = :as :identifier -> $1", + ], + 77: [ + "$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )", + ], + 78: [ + "$wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )", + ], + 79: [ + "$wf_output_wildcard = :dot :asterisk -> $1", + ], + 80: [ + "$task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )", + ], + 81: [ + "$_gen2 = $import_namespace", + "$_gen2 = :_empty", + ], + 82: [ + "$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )", + ], + 83: [ + "$_gen7 = list($output_kv)", + ], + 84: [ + "$_gen6 = list($cmd_param_kv)", + ], + 85: [ + "$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )", + ], + 86: [ + "$_gen20 = list($map_kv, :comma)", + ], + 87: [ + "$runtime = :runtime $map -> Runtime( map=$1 )", + ], + 88: [ + "$wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 )", + ], + 89: [ + "$_gen16 = $wf_output_wildcard", + "$_gen16 = :_empty", + ], + 90: [ + "$workflow_or_task_or_decl = $workflow", + "$workflow_or_task_or_decl = $task", + "$workflow_or_task_or_decl = $declaration", + ], + 91: [ + "$import_namespace = :as :identifier -> $1", + ], + 92: [ + "$_gen9 = $setter", + "$_gen9 = :_empty", + ], + 93: [ + "$workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 )", + ], + 94: [ + "$command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 )", + ], + 95: [ + "$import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 )", + ], + 96: [ + "$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )", + ], + 97: [ + "$_gen14 = list($mapping, :comma)", + ], + 98: [ + "$if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 )", + ], + 99: [ + "$meta = :meta $map -> Meta( map=$1 )", + ], + 100: [ + "$_gen3 = list($declaration)", + ], + 101: [ + "$document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 )", + ], + 102: [ + "$output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 )", + ], + 103: [ + "$_gen12 = $call_body", + "$_gen12 = :_empty", + ], + 104: [ + "$wf_output = $wf_output_declaration_syntax", + "$wf_output = $wf_output_wildcard_syntax", + ], + 105: [ + "$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )", + ], + 106: [ + "$cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )", + ], + 107: [ + "$wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 )", + ], + 108: [ + "$_gen15 = list($wf_output)", + ], + 109: [ + "$wf_body_element = $call", + "$wf_body_element = $declaration", + "$wf_body_element = $while_loop", + "$wf_body_element = $if_stmt", + "$wf_body_element = $scatter", + "$wf_body_element = $wf_outputs", + "$wf_body_element = $wf_parameter_meta", + "$wf_body_element = $wf_meta", + ], + 110: [ + "$call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 )", + ], + 111: [ + "$type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 )", + "$type_e = :type <=> :qmark -> OptionalType( innerType=$0 )", + "$type_e = :type <=> :plus -> NonEmptyType( innerType=$0 )", + "$type_e = :type", + ], + 112: [ + "$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )", + ], + 113: [ + "$outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 )", + ], + 114: [ + "$_gen13 = list($call_input)", + ], + 115: [ + "$_gen0 = list($import)", + ], + 116: [ + "$command_part = :cmd_part", + "$command_part = $cmd_param", + ], +} +rules = { + 0: "$_gen0 = list($import)", + 1: "$_gen1 = list($workflow_or_task_or_decl)", + 2: "$document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 )", + 3: "$workflow_or_task_or_decl = $workflow", + 4: "$workflow_or_task_or_decl = $task", + 5: "$workflow_or_task_or_decl = $declaration", + 6: "$_gen2 = $import_namespace", + 7: "$_gen2 = :_empty", + 8: "$import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 )", + 9: "$import_namespace = :as :identifier -> $1", + 10: "$_gen3 = list($declaration)", + 11: "$_gen4 = list($sections)", + 12: "$task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 )", + 13: "$sections = $command", + 14: "$sections = $outputs", + 15: "$sections = $runtime", + 16: "$sections = $parameter_meta", + 17: "$sections = $meta", + 18: "$_gen5 = list($command_part)", + 19: "$command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 )", + 20: "$command_part = :cmd_part", + 21: "$command_part = $cmd_param", + 22: "$_gen6 = list($cmd_param_kv)", + 23: "$cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 )", + 24: "$cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 )", + 25: "$_gen7 = list($output_kv)", + 26: "$outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 )", + 27: "$output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 )", + 28: "$runtime = :runtime $map -> Runtime( map=$1 )", + 29: "$parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )", + 30: "$meta = :meta $map -> Meta( map=$1 )", + 31: "$_gen8 = list($kv)", + 32: "$map = :lbrace $_gen8 :rbrace -> $1", + 33: "$kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 )", + 34: "$_gen9 = $setter", + 35: "$_gen9 = :_empty", + 36: "$declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 )", + 37: "$setter = :equal $e -> $1", + 38: "$map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 )", + 39: "$_gen10 = list($wf_body_element)", + 40: "$workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 )", + 41: "$wf_body_element = $call", + 42: "$wf_body_element = $declaration", + 43: "$wf_body_element = $while_loop", + 44: "$wf_body_element = $if_stmt", + 45: "$wf_body_element = $scatter", + 46: "$wf_body_element = $wf_outputs", + 47: "$wf_body_element = $wf_parameter_meta", + 48: "$wf_body_element = $wf_meta", + 49: "$_gen11 = $alias", + 50: "$_gen11 = :_empty", + 51: "$_gen12 = $call_body", + 52: "$_gen12 = :_empty", + 53: "$call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 )", + 54: "$_gen13 = list($call_input)", + 55: "$call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 )", + 56: "$_gen14 = list($mapping, :comma)", + 57: "$call_input = :input :colon $_gen14 -> Inputs( map=$2 )", + 58: "$mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 )", + 59: "$alias = :as :identifier -> $1", + 60: "$_gen15 = list($wf_output)", + 61: "$wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 )", + 62: "$wf_output = $wf_output_declaration_syntax", + 63: "$wf_output = $wf_output_wildcard_syntax", + 64: "$wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 )", + 65: "$_gen16 = $wf_output_wildcard", + 66: "$_gen16 = :_empty", + 67: "$wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 )", + 68: "$wf_output_wildcard = :dot :asterisk -> $1", + 69: "$wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 )", + 70: "$wf_meta = :meta $map -> Meta( map=$1 )", + 71: "$while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 )", + 72: "$if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 )", + 73: "$scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 )", + 74: "$object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 )", + 75: "$_gen17 = list($type_e, :comma)", + 76: "$type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 )", + 77: "$type_e = :type <=> :qmark -> OptionalType( innerType=$0 )", + 78: "$type_e = :type <=> :plus -> NonEmptyType( innerType=$0 )", + 79: "$type_e = :type", + 80: "$e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 )", + 81: "$e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 )", + 82: "$e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 )", + 83: "$e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 )", + 84: "$e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 )", + 85: "$e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 )", + 86: "$e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 )", + 87: "$e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 )", + 88: "$e = $e :plus $e -> Add( lhs=$0, rhs=$2 )", + 89: "$e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 )", + 90: "$e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 )", + 91: "$e = $e :slash $e -> Divide( lhs=$0, rhs=$2 )", + 92: "$e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 )", + 93: "$e = :not $e -> LogicalNot( expression=$1 )", + 94: "$e = :plus $e -> UnaryPlus( expression=$1 )", + 95: "$e = :dash $e -> UnaryNegation( expression=$1 )", + 96: "$_gen18 = list($e, :comma)", + 97: "$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )", + 98: "$e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 )", + 99: "$e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 )", + 100: "$_gen19 = list($object_kv, :comma)", + 101: "$e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 )", + 102: "$e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 )", + 103: "$_gen20 = list($map_kv, :comma)", + 104: "$e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 )", + 105: "$e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 )", + 106: "$e = :string", + 107: "$e = :identifier", + 108: "$e = :boolean", + 109: "$e = :integer", + 110: "$e = :float", +} +def is_terminal(id): return isinstance(id, int) and 0 <= id <= 55 +def parse(tokens, errors=None, start=None): + if errors is None: + errors = DefaultSyntaxErrorHandler() + if isinstance(tokens, str): + tokens = lex(tokens, 'string', errors) + ctx = ParserContext(tokens, errors) + tree = parse_document(ctx) + if tokens.current() != None: + raise ctx.errors.excess_tokens() + return tree +def expect(ctx, terminal_id): + current = ctx.tokens.current() + if not current: + raise ctx.errors.no_more_tokens(ctx.nonterminal, terminals[terminal_id], ctx.tokens.last()) + if current.id != terminal_id: + raise ctx.errors.unexpected_symbol(ctx.nonterminal, current, [terminals[terminal_id]], ctx.rule) + next = ctx.tokens.advance() + if next and not is_terminal(next.id): + raise ctx.errors.invalid_terminal(ctx.nonterminal, next) + return current +# START definitions for expression parser: e +infix_binding_power_e = { + 22: 4000, # $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) + 23: 5000, # $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) + 12: 6000, # $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) + 43: 6000, # $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) + 18: 7000, # $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) + 24: 7000, # $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) + 41: 7000, # $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) + 48: 7000, # $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) + 45: 8000, # $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) + 47: 8000, # $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) + 28: 9000, # $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) + 3: 9000, # $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) + 36: 9000, # $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) + 11: 11000, # $e = :identifier <=> :lparen list($e, :comma) :rparen -> FunctionCall( name=$0, params=$2 ) + 19: 12000, # $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) + 10: 13000, # $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) +} +prefix_binding_power_e = { + 26: 10000, # $e = :not $e -> LogicalNot( expression=$1 ) + 45: 10000, # $e = :plus $e -> UnaryPlus( expression=$1 ) + 47: 10000, # $e = :dash $e -> UnaryNegation( expression=$1 ) +} +def get_infix_binding_power_e(terminal_id): + try: + return infix_binding_power_e[terminal_id] + except: + return 0 +def get_prefix_binding_power_e(terminal_id): + try: + return prefix_binding_power_e[terminal_id] + except: + return 0 +def parse_e(ctx): + return parse_e_internal(ctx, rbp=0) +def parse_e_internal(ctx, rbp=0): + left = nud_e(ctx) + if isinstance(left, ParseTree): + left.isExpr = True + left.isNud = True + while ctx.tokens.current() and rbp < get_infix_binding_power_e(ctx.tokens.current().id): + left = led_e(left, ctx) + if left: + left.isExpr = True + return left +def nud_e(ctx): + tree = ParseTree(NonTerminal(62, 'e')) + current = ctx.tokens.current() + ctx.nonterminal = "e" + if not current: + return tree + elif current.id in rule_first[93]: + # rule first == not + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :not $e -> LogicalNot( expression=$1 ) + ctx.rule = rules[93] + ast_parameters = OrderedDict([ + ('expression', 1), + ]) + tree.astTransform = AstTransformNodeCreator('LogicalNot', ast_parameters) + tree.nudMorphemeCount = 2 + tree.add(expect(ctx, 26)) + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(26))) + tree.isPrefix = True + elif current.id in rule_first[94]: + # rule first == plus + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :plus $e -> UnaryPlus( expression=$1 ) + ctx.rule = rules[94] + ast_parameters = OrderedDict([ + ('expression', 1), + ]) + tree.astTransform = AstTransformNodeCreator('UnaryPlus', ast_parameters) + tree.nudMorphemeCount = 2 + tree.add(expect(ctx, 45)) + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(45))) + tree.isPrefix = True + elif current.id in rule_first[95]: + # rule first == dash + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :dash $e -> UnaryNegation( expression=$1 ) + ctx.rule = rules[95] + ast_parameters = OrderedDict([ + ('expression', 1), + ]) + tree.astTransform = AstTransformNodeCreator('UnaryNegation', ast_parameters) + tree.nudMorphemeCount = 2 + tree.add(expect(ctx, 47)) + tree.add(parse_e_internal(ctx, get_prefix_binding_power_e(47))) + tree.isPrefix = True + elif current.id in rule_first[97]: + # rule first == identifier + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 ) + ctx.rule = rules[97] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 44)) + elif current.id in rule_first[98]: + # rule first == identifier + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) + ctx.rule = rules[98] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 44)) + elif current.id in rule_first[99]: + # rule first == identifier + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) + ctx.rule = rules[99] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 44)) + elif current.id in rule_first[101]: + # rule first == object + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :object :lbrace $_gen19 :rbrace -> ObjectLiteral( map=$2 ) + ctx.rule = rules[101] + ast_parameters = OrderedDict([ + ('map', 2), + ]) + tree.astTransform = AstTransformNodeCreator('ObjectLiteral', ast_parameters) + tree.nudMorphemeCount = 4 + tree.add(expect(ctx, 0)) + tree.add(expect(ctx, 25)) + tree.add(parse__gen19(ctx)) + tree.add(expect(ctx, 51)) + elif current.id in rule_first[102]: + # rule first == lsquare + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :lsquare $_gen18 :rsquare -> ArrayLiteral( values=$1 ) + ctx.rule = rules[102] + ast_parameters = OrderedDict([ + ('values', 1), + ]) + tree.astTransform = AstTransformNodeCreator('ArrayLiteral', ast_parameters) + tree.nudMorphemeCount = 3 + tree.add(expect(ctx, 19)) + tree.add(parse__gen18(ctx)) + tree.add(expect(ctx, 37)) + elif current.id in rule_first[104]: + # rule first == lbrace + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :lbrace $_gen20 :rbrace -> MapLiteral( map=$1 ) + ctx.rule = rules[104] + ast_parameters = OrderedDict([ + ('map', 1), + ]) + tree.astTransform = AstTransformNodeCreator('MapLiteral', ast_parameters) + tree.nudMorphemeCount = 3 + tree.add(expect(ctx, 25)) + tree.add(parse__gen20(ctx)) + tree.add(expect(ctx, 51)) + elif current.id in rule_first[105]: + # rule first == lparen + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :lparen $_gen18 :rparen -> TupleLiteral( values=$1 ) + ctx.rule = rules[105] + ast_parameters = OrderedDict([ + ('values', 1), + ]) + tree.astTransform = AstTransformNodeCreator('TupleLiteral', ast_parameters) + tree.nudMorphemeCount = 3 + tree.add(expect(ctx, 11)) + tree.add(parse__gen18(ctx)) + tree.add(expect(ctx, 9)) + elif current.id in rule_first[106]: + # rule first == string + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :string + ctx.rule = rules[106] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 16)) + elif current.id in rule_first[107]: + # rule first == identifier + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :identifier + ctx.rule = rules[107] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 44)) + elif current.id in rule_first[108]: + # rule first == boolean + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :boolean + ctx.rule = rules[108] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 27)) + elif current.id in rule_first[109]: + # rule first == integer + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :integer + ctx.rule = rules[109] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 49)) + elif current.id in rule_first[110]: + # rule first == float + # e first == object, string, float, integer, e, lsquare, lbrace, not, boolean, lparen, identifier, dash, plus + # $e = :float + ctx.rule = rules[110] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 17)) + return tree +def led_e(left, ctx): + tree = ParseTree(NonTerminal(62, 'e')) + current = ctx.tokens.current() + ctx.nonterminal = "e" + if current.id == 22: # :double_pipe + # $e = $e :double_pipe $e -> LogicalOr( lhs=$0, rhs=$2 ) + ctx.rule = rules[80] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('LogicalOr', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 22)) # :double_pipe + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(22) - modifier)) + if current.id == 23: # :double_ampersand + # $e = $e :double_ampersand $e -> LogicalAnd( lhs=$0, rhs=$2 ) + ctx.rule = rules[81] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('LogicalAnd', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 23)) # :double_ampersand + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(23) - modifier)) + if current.id == 12: # :double_equal + # $e = $e :double_equal $e -> Equals( lhs=$0, rhs=$2 ) + ctx.rule = rules[82] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Equals', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 12)) # :double_equal + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(12) - modifier)) + if current.id == 43: # :not_equal + # $e = $e :not_equal $e -> NotEquals( lhs=$0, rhs=$2 ) + ctx.rule = rules[83] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('NotEquals', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 43)) # :not_equal + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(43) - modifier)) + if current.id == 18: # :lt + # $e = $e :lt $e -> LessThan( lhs=$0, rhs=$2 ) + ctx.rule = rules[84] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('LessThan', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 18)) # :lt + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(18) - modifier)) + if current.id == 24: # :lteq + # $e = $e :lteq $e -> LessThanOrEqual( lhs=$0, rhs=$2 ) + ctx.rule = rules[85] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('LessThanOrEqual', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 24)) # :lteq + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(24) - modifier)) + if current.id == 41: # :gt + # $e = $e :gt $e -> GreaterThan( lhs=$0, rhs=$2 ) + ctx.rule = rules[86] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('GreaterThan', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 41)) # :gt + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(41) - modifier)) + if current.id == 48: # :gteq + # $e = $e :gteq $e -> GreaterThanOrEqual( lhs=$0, rhs=$2 ) + ctx.rule = rules[87] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('GreaterThanOrEqual', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 48)) # :gteq + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(48) - modifier)) + if current.id == 45: # :plus + # $e = $e :plus $e -> Add( lhs=$0, rhs=$2 ) + ctx.rule = rules[88] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Add', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 45)) # :plus + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(45) - modifier)) + if current.id == 47: # :dash + # $e = $e :dash $e -> Subtract( lhs=$0, rhs=$2 ) + ctx.rule = rules[89] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Subtract', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 47)) # :dash + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(47) - modifier)) + if current.id == 28: # :asterisk + # $e = $e :asterisk $e -> Multiply( lhs=$0, rhs=$2 ) + ctx.rule = rules[90] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Multiply', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 28)) # :asterisk + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(28) - modifier)) + if current.id == 3: # :slash + # $e = $e :slash $e -> Divide( lhs=$0, rhs=$2 ) + ctx.rule = rules[91] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Divide', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 3)) # :slash + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(3) - modifier)) + if current.id == 36: # :percent + # $e = $e :percent $e -> Remainder( lhs=$0, rhs=$2 ) + ctx.rule = rules[92] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Remainder', ast_parameters) + tree.isExprNud = True + tree.add(left) + tree.add(expect(ctx, 36)) # :percent + modifier = 0 + tree.isInfix = True + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(36) - modifier)) + if current.id == 11: # :lparen + # $e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 ) + ctx.rule = rules[97] + ast_parameters = OrderedDict([ + ('name', 0), + ('params', 2), + ]) + tree.astTransform = AstTransformNodeCreator('FunctionCall', ast_parameters) + tree.add(left) + tree.add(expect(ctx, 11)) # :lparen + tree.add(parse__gen18(ctx)) + tree.add(expect(ctx, 9)) # :rparen + if current.id == 19: # :lsquare + # $e = :identifier <=> :lsquare $e :rsquare -> ArrayOrMapLookup( lhs=$0, rhs=$2 ) + ctx.rule = rules[98] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('ArrayOrMapLookup', ast_parameters) + tree.add(left) + tree.add(expect(ctx, 19)) # :lsquare + modifier = 0 + tree.add(parse_e_internal(ctx, get_infix_binding_power_e(19) - modifier)) + tree.add(expect(ctx, 37)) # :rsquare + if current.id == 10: # :dot + # $e = :identifier <=> :dot :identifier -> MemberAccess( lhs=$0, rhs=$2 ) + ctx.rule = rules[99] + ast_parameters = OrderedDict([ + ('lhs', 0), + ('rhs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('MemberAccess', ast_parameters) + tree.add(left) + tree.add(expect(ctx, 10)) # :dot + tree.add(expect(ctx, 44)) # :identifier + return tree +# END definitions for expression parser: e +# START definitions for expression parser: type_e +infix_binding_power_type_e = { + 19: 1000, # $type_e = :type <=> :lsquare list($type_e, :comma) :rsquare -> Type( name=$0, subtype=$2 ) + 14: 2000, # $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) + 45: 3000, # $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) +} +prefix_binding_power_type_e = { +} +def get_infix_binding_power_type_e(terminal_id): + try: + return infix_binding_power_type_e[terminal_id] + except: + return 0 +def get_prefix_binding_power_type_e(terminal_id): + try: + return prefix_binding_power_type_e[terminal_id] + except: + return 0 +def parse_type_e(ctx): + return parse_type_e_internal(ctx, rbp=0) +def parse_type_e_internal(ctx, rbp=0): + left = nud_type_e(ctx) + if isinstance(left, ParseTree): + left.isExpr = True + left.isNud = True + while ctx.tokens.current() and rbp < get_infix_binding_power_type_e(ctx.tokens.current().id): + left = led_type_e(left, ctx) + if left: + left.isExpr = True + return left +def nud_type_e(ctx): + tree = ParseTree(NonTerminal(111, 'type_e')) + current = ctx.tokens.current() + ctx.nonterminal = "type_e" + if not current: + return tree + if current.id in rule_first[76]: + # rule first == type + # e first == type, type_e + # $type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 ) + ctx.rule = rules[76] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 8)) + elif current.id in rule_first[77]: + # rule first == type + # e first == type, type_e + # $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) + ctx.rule = rules[77] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 8)) + elif current.id in rule_first[78]: + # rule first == type + # e first == type, type_e + # $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) + ctx.rule = rules[78] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 8)) + elif current.id in rule_first[79]: + # rule first == type + # e first == type, type_e + # $type_e = :type + ctx.rule = rules[79] + tree.astTransform = AstTransformSubstitution(0) + tree.nudMorphemeCount = 1 + tree.add(expect(ctx, 8)) + return tree +def led_type_e(left, ctx): + tree = ParseTree(NonTerminal(111, 'type_e')) + current = ctx.tokens.current() + ctx.nonterminal = "type_e" + if current.id == 19: # :lsquare + # $type_e = :type <=> :lsquare $_gen17 :rsquare -> Type( name=$0, subtype=$2 ) + ctx.rule = rules[76] + ast_parameters = OrderedDict([ + ('name', 0), + ('subtype', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Type', ast_parameters) + tree.add(left) + tree.add(expect(ctx, 19)) # :lsquare + tree.add(parse__gen17(ctx)) + tree.add(expect(ctx, 37)) # :rsquare + if current.id == 14: # :qmark + # $type_e = :type <=> :qmark -> OptionalType( innerType=$0 ) + ctx.rule = rules[77] + ast_parameters = OrderedDict([ + ('innerType', 0), + ]) + tree.astTransform = AstTransformNodeCreator('OptionalType', ast_parameters) + tree.add(left) + tree.add(expect(ctx, 14)) # :qmark + if current.id == 45: # :plus + # $type_e = :type <=> :plus -> NonEmptyType( innerType=$0 ) + ctx.rule = rules[78] + ast_parameters = OrderedDict([ + ('innerType', 0), + ]) + tree.astTransform = AstTransformNodeCreator('NonEmptyType', ast_parameters) + tree.add(left) + tree.add(expect(ctx, 45)) # :plus + return tree +# END definitions for expression parser: type_e +def parse__gen0(ctx): + tree = ParseTree(NonTerminal(115, '_gen0')) + tree.list = True; + ctx.nonterminal = "_gen0" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[115]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(115)): + tree.add(parse_import(ctx)) + ctx.nonterminal = "_gen0" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen1(ctx): + tree = ParseTree(NonTerminal(67, '_gen1')) + tree.list = True; + ctx.nonterminal = "_gen1" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[67]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(67)): + tree.add(parse_workflow_or_task_or_decl(ctx)) + ctx.nonterminal = "_gen1" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen10(ctx): + tree = ParseTree(NonTerminal(75, '_gen10')) + tree.list = True; + ctx.nonterminal = "_gen10" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[75]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(75)): + tree.add(parse_wf_body_element(ctx)) + ctx.nonterminal = "_gen10" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen13(ctx): + tree = ParseTree(NonTerminal(114, '_gen13')) + tree.list = True; + ctx.nonterminal = "_gen13" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[114]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(114)): + tree.add(parse_call_input(ctx)) + ctx.nonterminal = "_gen13" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen14(ctx): + tree = ParseTree(NonTerminal(97, '_gen14')) + tree.list = True; + tree.list_separator_id = 5 + ctx.nonterminal = "_gen14" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[97]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(97)): + tree.add(parse_mapping(ctx)) + ctx.nonterminal = "_gen14" # Horrible -- because parse_* can reset this + if ctx.tokens.current() is not None and ctx.tokens.current().id == 5: + tree.add(expect(ctx, 5)); + else: + break + minimum = max(minimum - 1, 0) + return tree +def parse__gen15(ctx): + tree = ParseTree(NonTerminal(108, '_gen15')) + tree.list = True; + ctx.nonterminal = "_gen15" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[108]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(108)): + tree.add(parse_wf_output(ctx)) + ctx.nonterminal = "_gen15" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen17(ctx): + tree = ParseTree(NonTerminal(74, '_gen17')) + tree.list = True; + tree.list_separator_id = 5 + ctx.nonterminal = "_gen17" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[74]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(74)): + tree.add(parse_type_e(ctx)) + ctx.nonterminal = "_gen17" # Horrible -- because parse_* can reset this + if ctx.tokens.current() is not None and ctx.tokens.current().id == 5: + tree.add(expect(ctx, 5)); + else: + break + minimum = max(minimum - 1, 0) + return tree +def parse__gen18(ctx): + tree = ParseTree(NonTerminal(56, '_gen18')) + tree.list = True; + tree.list_separator_id = 5 + ctx.nonterminal = "_gen18" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[56]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(56)): + tree.add(parse_e(ctx)) + ctx.nonterminal = "_gen18" # Horrible -- because parse_* can reset this + if ctx.tokens.current() is not None and ctx.tokens.current().id == 5: + tree.add(expect(ctx, 5)); + else: + break + minimum = max(minimum - 1, 0) + return tree +def parse__gen19(ctx): + tree = ParseTree(NonTerminal(65, '_gen19')) + tree.list = True; + tree.list_separator_id = 5 + ctx.nonterminal = "_gen19" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[65]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(65)): + tree.add(parse_object_kv(ctx)) + ctx.nonterminal = "_gen19" # Horrible -- because parse_* can reset this + if ctx.tokens.current() is not None and ctx.tokens.current().id == 5: + tree.add(expect(ctx, 5)); + else: + break + minimum = max(minimum - 1, 0) + return tree +def parse__gen20(ctx): + tree = ParseTree(NonTerminal(86, '_gen20')) + tree.list = True; + tree.list_separator_id = 5 + ctx.nonterminal = "_gen20" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[86]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(86)): + tree.add(parse_map_kv(ctx)) + ctx.nonterminal = "_gen20" # Horrible -- because parse_* can reset this + if ctx.tokens.current() is not None and ctx.tokens.current().id == 5: + tree.add(expect(ctx, 5)); + else: + break + minimum = max(minimum - 1, 0) + return tree +def parse__gen3(ctx): + tree = ParseTree(NonTerminal(100, '_gen3')) + tree.list = True; + ctx.nonterminal = "_gen3" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[100]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(100)): + tree.add(parse_declaration(ctx)) + ctx.nonterminal = "_gen3" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen4(ctx): + tree = ParseTree(NonTerminal(60, '_gen4')) + tree.list = True; + ctx.nonterminal = "_gen4" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[60]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(60)): + tree.add(parse_sections(ctx)) + ctx.nonterminal = "_gen4" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen5(ctx): + tree = ParseTree(NonTerminal(68, '_gen5')) + tree.list = True; + ctx.nonterminal = "_gen5" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[68]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(68)): + tree.add(parse_command_part(ctx)) + ctx.nonterminal = "_gen5" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen6(ctx): + tree = ParseTree(NonTerminal(84, '_gen6')) + tree.list = True; + ctx.nonterminal = "_gen6" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[84]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(84)): + tree.add(parse_cmd_param_kv(ctx)) + ctx.nonterminal = "_gen6" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen7(ctx): + tree = ParseTree(NonTerminal(83, '_gen7')) + tree.list = True; + ctx.nonterminal = "_gen7" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[83]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(83)): + tree.add(parse_output_kv(ctx)) + ctx.nonterminal = "_gen7" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen8(ctx): + tree = ParseTree(NonTerminal(57, '_gen8')) + tree.list = True; + ctx.nonterminal = "_gen8" + if ctx.tokens.current() is not None and \ + ctx.tokens.current().id not in nonterminal_first[116] and \ + ctx.tokens.current().id in nonterminal_follow[57]: + return tree; + if ctx.tokens.current() is None: + return tree + minimum = 0; + while minimum > 0 or \ + (ctx.tokens.current() is not None and \ + ctx.tokens.current().id in nonterminal_first.get(57)): + tree.add(parse_kv(ctx)) + ctx.nonterminal = "_gen8" # Horrible -- because parse_* can reset this + minimum = max(minimum - 1, 0) + return tree +def parse__gen11(ctx): + current = ctx.tokens.current() + rule = table[8][current.id] if current else -1 + tree = ParseTree(NonTerminal(64, '_gen11')) + ctx.nonterminal = "_gen11" + if current != None and current.id in nonterminal_follow[64] and current.id not in nonterminal_first[64]: + return tree + if current == None: + return tree + if rule == 49: # $_gen11 = $alias + ctx.rule = rules[49] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_alias(ctx) + tree.add(subtree) + return tree + return tree +def parse__gen12(ctx): + current = ctx.tokens.current() + rule = table[47][current.id] if current else -1 + tree = ParseTree(NonTerminal(103, '_gen12')) + ctx.nonterminal = "_gen12" + if current != None and current.id in nonterminal_follow[103] and current.id not in nonterminal_first[103]: + return tree + if current == None: + return tree + if rule == 51: # $_gen12 = $call_body + ctx.rule = rules[51] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_call_body(ctx) + tree.add(subtree) + return tree + return tree +def parse__gen16(ctx): + current = ctx.tokens.current() + rule = table[33][current.id] if current else -1 + tree = ParseTree(NonTerminal(89, '_gen16')) + ctx.nonterminal = "_gen16" + if current != None and current.id in nonterminal_follow[89] and current.id not in nonterminal_first[89]: + return tree + if current == None: + return tree + if rule == 65: # $_gen16 = $wf_output_wildcard + ctx.rule = rules[65] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_wf_output_wildcard(ctx) + tree.add(subtree) + return tree + return tree +def parse__gen2(ctx): + current = ctx.tokens.current() + rule = table[25][current.id] if current else -1 + tree = ParseTree(NonTerminal(81, '_gen2')) + ctx.nonterminal = "_gen2" + if current != None and current.id in nonterminal_follow[81] and current.id not in nonterminal_first[81]: + return tree + if current == None: + return tree + if rule == 6: # $_gen2 = $import_namespace + ctx.rule = rules[6] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_import_namespace(ctx) + tree.add(subtree) + return tree + return tree +def parse__gen9(ctx): + current = ctx.tokens.current() + rule = table[36][current.id] if current else -1 + tree = ParseTree(NonTerminal(92, '_gen9')) + ctx.nonterminal = "_gen9" + if current != None and current.id in nonterminal_follow[92] and current.id not in nonterminal_first[92]: + return tree + if current == None: + return tree + if rule == 34: # $_gen9 = $setter + ctx.rule = rules[34] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_setter(ctx) + tree.add(subtree) + return tree + return tree +def parse_alias(ctx): + current = ctx.tokens.current() + rule = table[20][current.id] if current else -1 + tree = ParseTree(NonTerminal(76, 'alias')) + ctx.nonterminal = "alias" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 59: # $alias = :as :identifier -> $1 + ctx.rule = rules[59] + tree.astTransform = AstTransformSubstitution(1) + t = expect(ctx, 40) # :as + tree.add(t) + t = expect(ctx, 44) # :identifier + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[76] if x >=0], + rules[59] + ) +def parse_call(ctx): + current = ctx.tokens.current() + rule = table[54][current.id] if current else -1 + tree = ParseTree(NonTerminal(110, 'call')) + ctx.nonterminal = "call" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 53: # $call = :call :fqn $_gen11 $_gen12 -> Call( task=$1, alias=$2, body=$3 ) + ctx.rule = rules[53] + ast_parameters = OrderedDict([ + ('task', 1), + ('alias', 2), + ('body', 3), + ]) + tree.astTransform = AstTransformNodeCreator('Call', ast_parameters) + t = expect(ctx, 29) # :call + tree.add(t) + t = expect(ctx, 31) # :fqn + tree.add(t) + subtree = parse__gen11(ctx) + tree.add(subtree) + subtree = parse__gen12(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[110] if x >=0], + rules[53] + ) +def parse_call_body(ctx): + current = ctx.tokens.current() + rule = table[2][current.id] if current else -1 + tree = ParseTree(NonTerminal(58, 'call_body')) + ctx.nonterminal = "call_body" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 55: # $call_body = :lbrace $_gen3 $_gen13 :rbrace -> CallBody( declarations=$1, io=$2 ) + ctx.rule = rules[55] + ast_parameters = OrderedDict([ + ('declarations', 1), + ('io', 2), + ]) + tree.astTransform = AstTransformNodeCreator('CallBody', ast_parameters) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen3(ctx) + tree.add(subtree) + subtree = parse__gen13(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[58] if x >=0], + rules[55] + ) +def parse_call_input(ctx): + current = ctx.tokens.current() + rule = table[16][current.id] if current else -1 + tree = ParseTree(NonTerminal(72, 'call_input')) + ctx.nonterminal = "call_input" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 57: # $call_input = :input :colon $_gen14 -> Inputs( map=$2 ) + ctx.rule = rules[57] + ast_parameters = OrderedDict([ + ('map', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Inputs', ast_parameters) + t = expect(ctx, 39) # :input + tree.add(t) + t = expect(ctx, 30) # :colon + tree.add(t) + subtree = parse__gen14(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[72] if x >=0], + rules[57] + ) +def parse_cmd_param(ctx): + current = ctx.tokens.current() + rule = table[50][current.id] if current else -1 + tree = ParseTree(NonTerminal(106, 'cmd_param')) + ctx.nonterminal = "cmd_param" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 23: # $cmd_param = :cmd_param_start $_gen6 $e :cmd_param_end -> CommandParameter( attributes=$1, expr=$2 ) + ctx.rule = rules[23] + ast_parameters = OrderedDict([ + ('attributes', 1), + ('expr', 2), + ]) + tree.astTransform = AstTransformNodeCreator('CommandParameter', ast_parameters) + t = expect(ctx, 6) # :cmd_param_start + tree.add(t) + subtree = parse__gen6(ctx) + tree.add(subtree) + subtree = parse_e(ctx) + tree.add(subtree) + t = expect(ctx, 32) # :cmd_param_end + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[106] if x >=0], + rules[23] + ) +def parse_cmd_param_kv(ctx): + current = ctx.tokens.current() + rule = table[26][current.id] if current else -1 + tree = ParseTree(NonTerminal(82, 'cmd_param_kv')) + ctx.nonterminal = "cmd_param_kv" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 24: # $cmd_param_kv = :cmd_attr_hint :identifier :equal $e -> CommandParameterAttr( key=$1, value=$3 ) + ctx.rule = rules[24] + ast_parameters = OrderedDict([ + ('key', 1), + ('value', 3), + ]) + tree.astTransform = AstTransformNodeCreator('CommandParameterAttr', ast_parameters) + t = expect(ctx, 50) # :cmd_attr_hint + tree.add(t) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 33) # :equal + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[82] if x >=0], + rules[24] + ) +def parse_command(ctx): + current = ctx.tokens.current() + rule = table[38][current.id] if current else -1 + tree = ParseTree(NonTerminal(94, 'command')) + ctx.nonterminal = "command" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 19: # $command = :raw_command :raw_cmd_start $_gen5 :raw_cmd_end -> RawCommand( parts=$2 ) + ctx.rule = rules[19] + ast_parameters = OrderedDict([ + ('parts', 2), + ]) + tree.astTransform = AstTransformNodeCreator('RawCommand', ast_parameters) + t = expect(ctx, 53) # :raw_command + tree.add(t) + t = expect(ctx, 4) # :raw_cmd_start + tree.add(t) + subtree = parse__gen5(ctx) + tree.add(subtree) + t = expect(ctx, 55) # :raw_cmd_end + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[94] if x >=0], + rules[19] + ) +def parse_command_part(ctx): + current = ctx.tokens.current() + rule = table[60][current.id] if current else -1 + tree = ParseTree(NonTerminal(116, 'command_part')) + ctx.nonterminal = "command_part" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 20: # $command_part = :cmd_part + ctx.rule = rules[20] + tree.astTransform = AstTransformSubstitution(0) + t = expect(ctx, 38) # :cmd_part + tree.add(t) + return tree + elif rule == 21: # $command_part = $cmd_param + ctx.rule = rules[21] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_cmd_param(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[116] if x >=0], + rules[21] + ) +def parse_declaration(ctx): + current = ctx.tokens.current() + rule = table[15][current.id] if current else -1 + tree = ParseTree(NonTerminal(71, 'declaration')) + ctx.nonterminal = "declaration" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 36: # $declaration = $type_e :identifier $_gen9 -> Declaration( type=$0, name=$1, expression=$2 ) + ctx.rule = rules[36] + ast_parameters = OrderedDict([ + ('type', 0), + ('name', 1), + ('expression', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Declaration', ast_parameters) + subtree = parse_type_e(ctx) + tree.add(subtree) + t = expect(ctx, 44) # :identifier + tree.add(t) + subtree = parse__gen9(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[71] if x >=0], + rules[36] + ) +def parse_document(ctx): + current = ctx.tokens.current() + rule = table[45][current.id] if current else -1 + tree = ParseTree(NonTerminal(101, 'document')) + ctx.nonterminal = "document" + if current != None and current.id in nonterminal_follow[101] and current.id not in nonterminal_first[101]: + return tree + if current == None: + return tree + if rule == 2: # $document = $_gen0 $_gen1 -> Namespace( imports=$0, body=$1 ) + ctx.rule = rules[2] + ast_parameters = OrderedDict([ + ('imports', 0), + ('body', 1), + ]) + tree.astTransform = AstTransformNodeCreator('Namespace', ast_parameters) + subtree = parse__gen0(ctx) + tree.add(subtree) + subtree = parse__gen1(ctx) + tree.add(subtree) + return tree + return tree +def parse_if_stmt(ctx): + current = ctx.tokens.current() + rule = table[42][current.id] if current else -1 + tree = ParseTree(NonTerminal(98, 'if_stmt')) + ctx.nonterminal = "if_stmt" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 72: # $if_stmt = :if :lparen $e :rparen :lbrace $_gen10 :rbrace -> If( expression=$2, body=$5 ) + ctx.rule = rules[72] + ast_parameters = OrderedDict([ + ('expression', 2), + ('body', 5), + ]) + tree.astTransform = AstTransformNodeCreator('If', ast_parameters) + t = expect(ctx, 21) # :if + tree.add(t) + t = expect(ctx, 11) # :lparen + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + t = expect(ctx, 9) # :rparen + tree.add(t) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen10(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[98] if x >=0], + rules[72] + ) +def parse_import(ctx): + current = ctx.tokens.current() + rule = table[39][current.id] if current else -1 + tree = ParseTree(NonTerminal(95, 'import')) + ctx.nonterminal = "import" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 8: # $import = :import :string $_gen2 -> Import( uri=$1, namespace=$2 ) + ctx.rule = rules[8] + ast_parameters = OrderedDict([ + ('uri', 1), + ('namespace', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Import', ast_parameters) + t = expect(ctx, 46) # :import + tree.add(t) + t = expect(ctx, 16) # :string + tree.add(t) + subtree = parse__gen2(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[95] if x >=0], + rules[8] + ) +def parse_import_namespace(ctx): + current = ctx.tokens.current() + rule = table[35][current.id] if current else -1 + tree = ParseTree(NonTerminal(91, 'import_namespace')) + ctx.nonterminal = "import_namespace" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 9: # $import_namespace = :as :identifier -> $1 + ctx.rule = rules[9] + tree.astTransform = AstTransformSubstitution(1) + t = expect(ctx, 40) # :as + tree.add(t) + t = expect(ctx, 44) # :identifier + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[91] if x >=0], + rules[9] + ) +def parse_kv(ctx): + current = ctx.tokens.current() + rule = table[56][current.id] if current else -1 + tree = ParseTree(NonTerminal(112, 'kv')) + ctx.nonterminal = "kv" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 33: # $kv = :identifier :colon $e -> RuntimeAttribute( key=$0, value=$2 ) + ctx.rule = rules[33] + ast_parameters = OrderedDict([ + ('key', 0), + ('value', 2), + ]) + tree.astTransform = AstTransformNodeCreator('RuntimeAttribute', ast_parameters) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 30) # :colon + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[112] if x >=0], + rules[33] + ) +def parse_map(ctx): + current = ctx.tokens.current() + rule = table[14][current.id] if current else -1 + tree = ParseTree(NonTerminal(70, 'map')) + ctx.nonterminal = "map" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 32: # $map = :lbrace $_gen8 :rbrace -> $1 + ctx.rule = rules[32] + tree.astTransform = AstTransformSubstitution(1) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen8(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[70] if x >=0], + rules[32] + ) +def parse_map_kv(ctx): + current = ctx.tokens.current() + rule = table[49][current.id] if current else -1 + tree = ParseTree(NonTerminal(105, 'map_kv')) + ctx.nonterminal = "map_kv" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 38: # $map_kv = $e :colon $e -> MapLiteralKv( key=$0, value=$2 ) + ctx.rule = rules[38] + ast_parameters = OrderedDict([ + ('key', 0), + ('value', 2), + ]) + tree.astTransform = AstTransformNodeCreator('MapLiteralKv', ast_parameters) + subtree = parse_e(ctx) + tree.add(subtree) + t = expect(ctx, 30) # :colon + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[105] if x >=0], + rules[38] + ) +def parse_mapping(ctx): + current = ctx.tokens.current() + rule = table[17][current.id] if current else -1 + tree = ParseTree(NonTerminal(73, 'mapping')) + ctx.nonterminal = "mapping" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 58: # $mapping = :identifier :equal $e -> IOMapping( key=$0, value=$2 ) + ctx.rule = rules[58] + ast_parameters = OrderedDict([ + ('key', 0), + ('value', 2), + ]) + tree.astTransform = AstTransformNodeCreator('IOMapping', ast_parameters) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 33) # :equal + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[73] if x >=0], + rules[58] + ) +def parse_meta(ctx): + current = ctx.tokens.current() + rule = table[43][current.id] if current else -1 + tree = ParseTree(NonTerminal(99, 'meta')) + ctx.nonterminal = "meta" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 30: # $meta = :meta $map -> Meta( map=$1 ) + ctx.rule = rules[30] + ast_parameters = OrderedDict([ + ('map', 1), + ]) + tree.astTransform = AstTransformNodeCreator('Meta', ast_parameters) + t = expect(ctx, 1) # :meta + tree.add(t) + subtree = parse_map(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[99] if x >=0], + rules[30] + ) +def parse_object_kv(ctx): + current = ctx.tokens.current() + rule = table[29][current.id] if current else -1 + tree = ParseTree(NonTerminal(85, 'object_kv')) + ctx.nonterminal = "object_kv" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 74: # $object_kv = :identifier :colon $e -> ObjectKV( key=$0, value=$2 ) + ctx.rule = rules[74] + ast_parameters = OrderedDict([ + ('key', 0), + ('value', 2), + ]) + tree.astTransform = AstTransformNodeCreator('ObjectKV', ast_parameters) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 30) # :colon + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[85] if x >=0], + rules[74] + ) +def parse_output_kv(ctx): + current = ctx.tokens.current() + rule = table[46][current.id] if current else -1 + tree = ParseTree(NonTerminal(102, 'output_kv')) + ctx.nonterminal = "output_kv" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 27: # $output_kv = $type_e :identifier :equal $e -> Output( type=$0, name=$1, expression=$3 ) + ctx.rule = rules[27] + ast_parameters = OrderedDict([ + ('type', 0), + ('name', 1), + ('expression', 3), + ]) + tree.astTransform = AstTransformNodeCreator('Output', ast_parameters) + subtree = parse_type_e(ctx) + tree.add(subtree) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 33) # :equal + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[102] if x >=0], + rules[27] + ) +def parse_outputs(ctx): + current = ctx.tokens.current() + rule = table[57][current.id] if current else -1 + tree = ParseTree(NonTerminal(113, 'outputs')) + ctx.nonterminal = "outputs" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 26: # $outputs = :output :lbrace $_gen7 :rbrace -> Outputs( attributes=$2 ) + ctx.rule = rules[26] + ast_parameters = OrderedDict([ + ('attributes', 2), + ]) + tree.astTransform = AstTransformNodeCreator('Outputs', ast_parameters) + t = expect(ctx, 7) # :output + tree.add(t) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen7(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[113] if x >=0], + rules[26] + ) +def parse_parameter_meta(ctx): + current = ctx.tokens.current() + rule = table[21][current.id] if current else -1 + tree = ParseTree(NonTerminal(77, 'parameter_meta')) + ctx.nonterminal = "parameter_meta" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 29: # $parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 ) + ctx.rule = rules[29] + ast_parameters = OrderedDict([ + ('map', 1), + ]) + tree.astTransform = AstTransformNodeCreator('ParameterMeta', ast_parameters) + t = expect(ctx, 52) # :parameter_meta + tree.add(t) + subtree = parse_map(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[77] if x >=0], + rules[29] + ) +def parse_runtime(ctx): + current = ctx.tokens.current() + rule = table[31][current.id] if current else -1 + tree = ParseTree(NonTerminal(87, 'runtime')) + ctx.nonterminal = "runtime" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 28: # $runtime = :runtime $map -> Runtime( map=$1 ) + ctx.rule = rules[28] + ast_parameters = OrderedDict([ + ('map', 1), + ]) + tree.astTransform = AstTransformNodeCreator('Runtime', ast_parameters) + t = expect(ctx, 2) # :runtime + tree.add(t) + subtree = parse_map(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[87] if x >=0], + rules[28] + ) +def parse_scatter(ctx): + current = ctx.tokens.current() + rule = table[40][current.id] if current else -1 + tree = ParseTree(NonTerminal(96, 'scatter')) + ctx.nonterminal = "scatter" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 73: # $scatter = :scatter :lparen :identifier :in $e :rparen :lbrace $_gen10 :rbrace -> Scatter( item=$2, collection=$4, body=$7 ) + ctx.rule = rules[73] + ast_parameters = OrderedDict([ + ('item', 2), + ('collection', 4), + ('body', 7), + ]) + tree.astTransform = AstTransformNodeCreator('Scatter', ast_parameters) + t = expect(ctx, 54) # :scatter + tree.add(t) + t = expect(ctx, 11) # :lparen + tree.add(t) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 34) # :in + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + t = expect(ctx, 9) # :rparen + tree.add(t) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen10(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[96] if x >=0], + rules[73] + ) +def parse_sections(ctx): + current = ctx.tokens.current() + rule = table[3][current.id] if current else -1 + tree = ParseTree(NonTerminal(59, 'sections')) + ctx.nonterminal = "sections" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 13: # $sections = $command + ctx.rule = rules[13] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_command(ctx) + tree.add(subtree) + return tree + elif rule == 14: # $sections = $outputs + ctx.rule = rules[14] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_outputs(ctx) + tree.add(subtree) + return tree + elif rule == 15: # $sections = $runtime + ctx.rule = rules[15] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_runtime(ctx) + tree.add(subtree) + return tree + elif rule == 16: # $sections = $parameter_meta + ctx.rule = rules[16] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_parameter_meta(ctx) + tree.add(subtree) + return tree + elif rule == 17: # $sections = $meta + ctx.rule = rules[17] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_meta(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[59] if x >=0], + rules[17] + ) +def parse_setter(ctx): + current = ctx.tokens.current() + rule = table[7][current.id] if current else -1 + tree = ParseTree(NonTerminal(63, 'setter')) + ctx.nonterminal = "setter" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 37: # $setter = :equal $e -> $1 + ctx.rule = rules[37] + tree.astTransform = AstTransformSubstitution(1) + t = expect(ctx, 33) # :equal + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[63] if x >=0], + rules[37] + ) +def parse_task(ctx): + current = ctx.tokens.current() + rule = table[24][current.id] if current else -1 + tree = ParseTree(NonTerminal(80, 'task')) + ctx.nonterminal = "task" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 12: # $task = :task :identifier :lbrace $_gen3 $_gen4 :rbrace -> Task( name=$1, declarations=$3, sections=$4 ) + ctx.rule = rules[12] + ast_parameters = OrderedDict([ + ('name', 1), + ('declarations', 3), + ('sections', 4), + ]) + tree.astTransform = AstTransformNodeCreator('Task', ast_parameters) + t = expect(ctx, 15) # :task + tree.add(t) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen3(ctx) + tree.add(subtree) + subtree = parse__gen4(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[80] if x >=0], + rules[12] + ) +def parse_wf_body_element(ctx): + current = ctx.tokens.current() + rule = table[53][current.id] if current else -1 + tree = ParseTree(NonTerminal(109, 'wf_body_element')) + ctx.nonterminal = "wf_body_element" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 41: # $wf_body_element = $call + ctx.rule = rules[41] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_call(ctx) + tree.add(subtree) + return tree + elif rule == 42: # $wf_body_element = $declaration + ctx.rule = rules[42] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_declaration(ctx) + tree.add(subtree) + return tree + elif rule == 43: # $wf_body_element = $while_loop + ctx.rule = rules[43] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_while_loop(ctx) + tree.add(subtree) + return tree + elif rule == 44: # $wf_body_element = $if_stmt + ctx.rule = rules[44] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_if_stmt(ctx) + tree.add(subtree) + return tree + elif rule == 45: # $wf_body_element = $scatter + ctx.rule = rules[45] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_scatter(ctx) + tree.add(subtree) + return tree + elif rule == 46: # $wf_body_element = $wf_outputs + ctx.rule = rules[46] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_wf_outputs(ctx) + tree.add(subtree) + return tree + elif rule == 47: # $wf_body_element = $wf_parameter_meta + ctx.rule = rules[47] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_wf_parameter_meta(ctx) + tree.add(subtree) + return tree + elif rule == 48: # $wf_body_element = $wf_meta + ctx.rule = rules[48] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_wf_meta(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[109] if x >=0], + rules[48] + ) +def parse_wf_meta(ctx): + current = ctx.tokens.current() + rule = table[10][current.id] if current else -1 + tree = ParseTree(NonTerminal(66, 'wf_meta')) + ctx.nonterminal = "wf_meta" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 70: # $wf_meta = :meta $map -> Meta( map=$1 ) + ctx.rule = rules[70] + ast_parameters = OrderedDict([ + ('map', 1), + ]) + tree.astTransform = AstTransformNodeCreator('Meta', ast_parameters) + t = expect(ctx, 1) # :meta + tree.add(t) + subtree = parse_map(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[66] if x >=0], + rules[70] + ) +def parse_wf_output(ctx): + current = ctx.tokens.current() + rule = table[48][current.id] if current else -1 + tree = ParseTree(NonTerminal(104, 'wf_output')) + ctx.nonterminal = "wf_output" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 62: # $wf_output = $wf_output_declaration_syntax + ctx.rule = rules[62] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_wf_output_declaration_syntax(ctx) + tree.add(subtree) + return tree + elif rule == 63: # $wf_output = $wf_output_wildcard_syntax + ctx.rule = rules[63] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_wf_output_wildcard_syntax(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[104] if x >=0], + rules[63] + ) +def parse_wf_output_declaration_syntax(ctx): + current = ctx.tokens.current() + rule = table[51][current.id] if current else -1 + tree = ParseTree(NonTerminal(107, 'wf_output_declaration_syntax')) + ctx.nonterminal = "wf_output_declaration_syntax" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 64: # $wf_output_declaration_syntax = $type_e :identifier :equal $e -> WorkflowOutputDeclaration( type=$0, name=$1, expression=$3 ) + ctx.rule = rules[64] + ast_parameters = OrderedDict([ + ('type', 0), + ('name', 1), + ('expression', 3), + ]) + tree.astTransform = AstTransformNodeCreator('WorkflowOutputDeclaration', ast_parameters) + subtree = parse_type_e(ctx) + tree.add(subtree) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 33) # :equal + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[107] if x >=0], + rules[64] + ) +def parse_wf_output_wildcard(ctx): + current = ctx.tokens.current() + rule = table[23][current.id] if current else -1 + tree = ParseTree(NonTerminal(79, 'wf_output_wildcard')) + ctx.nonterminal = "wf_output_wildcard" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 68: # $wf_output_wildcard = :dot :asterisk -> $1 + ctx.rule = rules[68] + tree.astTransform = AstTransformSubstitution(1) + t = expect(ctx, 10) # :dot + tree.add(t) + t = expect(ctx, 28) # :asterisk + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[79] if x >=0], + rules[68] + ) +def parse_wf_output_wildcard_syntax(ctx): + current = ctx.tokens.current() + rule = table[13][current.id] if current else -1 + tree = ParseTree(NonTerminal(69, 'wf_output_wildcard_syntax')) + ctx.nonterminal = "wf_output_wildcard_syntax" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 67: # $wf_output_wildcard_syntax = :fqn $_gen16 -> WorkflowOutputWildcard( fqn=$0, wildcard=$1 ) + ctx.rule = rules[67] + ast_parameters = OrderedDict([ + ('fqn', 0), + ('wildcard', 1), + ]) + tree.astTransform = AstTransformNodeCreator('WorkflowOutputWildcard', ast_parameters) + t = expect(ctx, 31) # :fqn + tree.add(t) + subtree = parse__gen16(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[69] if x >=0], + rules[67] + ) +def parse_wf_outputs(ctx): + current = ctx.tokens.current() + rule = table[32][current.id] if current else -1 + tree = ParseTree(NonTerminal(88, 'wf_outputs')) + ctx.nonterminal = "wf_outputs" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 61: # $wf_outputs = :output :lbrace $_gen15 :rbrace -> WorkflowOutputs( outputs=$2 ) + ctx.rule = rules[61] + ast_parameters = OrderedDict([ + ('outputs', 2), + ]) + tree.astTransform = AstTransformNodeCreator('WorkflowOutputs', ast_parameters) + t = expect(ctx, 7) # :output + tree.add(t) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen15(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[88] if x >=0], + rules[61] + ) +def parse_wf_parameter_meta(ctx): + current = ctx.tokens.current() + rule = table[22][current.id] if current else -1 + tree = ParseTree(NonTerminal(78, 'wf_parameter_meta')) + ctx.nonterminal = "wf_parameter_meta" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 69: # $wf_parameter_meta = :parameter_meta $map -> ParameterMeta( map=$1 ) + ctx.rule = rules[69] + ast_parameters = OrderedDict([ + ('map', 1), + ]) + tree.astTransform = AstTransformNodeCreator('ParameterMeta', ast_parameters) + t = expect(ctx, 52) # :parameter_meta + tree.add(t) + subtree = parse_map(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[78] if x >=0], + rules[69] + ) +def parse_while_loop(ctx): + current = ctx.tokens.current() + rule = table[5][current.id] if current else -1 + tree = ParseTree(NonTerminal(61, 'while_loop')) + ctx.nonterminal = "while_loop" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 71: # $while_loop = :while :lparen $e :rparen :lbrace $_gen10 :rbrace -> WhileLoop( expression=$2, body=$5 ) + ctx.rule = rules[71] + ast_parameters = OrderedDict([ + ('expression', 2), + ('body', 5), + ]) + tree.astTransform = AstTransformNodeCreator('WhileLoop', ast_parameters) + t = expect(ctx, 13) # :while + tree.add(t) + t = expect(ctx, 11) # :lparen + tree.add(t) + subtree = parse_e(ctx) + tree.add(subtree) + t = expect(ctx, 9) # :rparen + tree.add(t) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen10(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[61] if x >=0], + rules[71] + ) +def parse_workflow(ctx): + current = ctx.tokens.current() + rule = table[37][current.id] if current else -1 + tree = ParseTree(NonTerminal(93, 'workflow')) + ctx.nonterminal = "workflow" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 40: # $workflow = :workflow :identifier :lbrace $_gen10 :rbrace -> Workflow( name=$1, body=$3 ) + ctx.rule = rules[40] + ast_parameters = OrderedDict([ + ('name', 1), + ('body', 3), + ]) + tree.astTransform = AstTransformNodeCreator('Workflow', ast_parameters) + t = expect(ctx, 20) # :workflow + tree.add(t) + t = expect(ctx, 44) # :identifier + tree.add(t) + t = expect(ctx, 25) # :lbrace + tree.add(t) + subtree = parse__gen10(ctx) + tree.add(subtree) + t = expect(ctx, 51) # :rbrace + tree.add(t) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[93] if x >=0], + rules[40] + ) +def parse_workflow_or_task_or_decl(ctx): + current = ctx.tokens.current() + rule = table[34][current.id] if current else -1 + tree = ParseTree(NonTerminal(90, 'workflow_or_task_or_decl')) + ctx.nonterminal = "workflow_or_task_or_decl" + if current == None: + raise ctx.errors.unexpected_eof() + if rule == 3: # $workflow_or_task_or_decl = $workflow + ctx.rule = rules[3] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_workflow(ctx) + tree.add(subtree) + return tree + elif rule == 4: # $workflow_or_task_or_decl = $task + ctx.rule = rules[4] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_task(ctx) + tree.add(subtree) + return tree + elif rule == 5: # $workflow_or_task_or_decl = $declaration + ctx.rule = rules[5] + tree.astTransform = AstTransformSubstitution(0) + subtree = parse_declaration(ctx) + tree.add(subtree) + return tree + raise ctx.errors.unexpected_symbol( + ctx.nonterminal, + ctx.tokens.current(), + [terminals[x] for x in nonterminal_first[90] if x >=0], + rules[5] + ) +# Lexer Code # +# START USER CODE +def init(): + return { + 'context': None, + 'replacements': { + re.compile(r"\\n"): 0x000A, + re.compile(r"\\r"): 0x000D, + re.compile(r"\\b"): 0x0008, + re.compile(r"\\t"): 0x0009, + re.compile(r"\\a"): 0x0007, + re.compile(r"\\v"): 0x000B, + re.compile(r'\\"'): 0x0022, + re.compile(r"\\'"): 0x0027, + re.compile(r"\\\?"): 0x003F + }, + 'escapes': { + re.compile(r'(\\([0-7]{1,3}))'): 8, + re.compile(r'(\\[xX]([0-9a-fA-F]{1,4}))'): 16, + re.compile(r'(\\[uU]([0-9a-fA-F]{4}))'): 16 + } + } +def workflow(ctx, terminal, source_string, line, col): + ctx.user_context['context'] = 'workflow' + default_action(ctx, terminal, source_string, line, col) +def task(ctx, terminal, source_string, line, col): + ctx.user_context['context'] = 'task' + default_action(ctx, terminal, source_string, line, col) +def output(ctx, terminal, source_string, line, col): + if ctx.user_context['context'] == 'workflow': + ctx.stack.append('wf_output') + default_action(ctx, terminal, source_string, line, col) +def wdl_unescape(ctx, terminal, source_string, line, col): + for regex, c in ctx.user_context['replacements'].items(): + source_string = regex.sub(chr(c), source_string) + source_string = source_string.replace("\u005C\u005C", "\u005C") + for regex, base in ctx.user_context['escapes'].items(): + for escape_sequence, number in regex.findall(source_string): + source_string = source_string.replace(escape_sequence, chr(int(number, base))) + default_action(ctx, terminal, source_string[1:-1], line, col) +# END USER CODE +def emit(ctx, terminal, source_string, line, col): + if terminal: + ctx.tokens.append(Terminal(terminals[terminal], terminal, source_string, ctx.resource, line, col)) +def default_action(ctx, terminal, source_string, line, col): + emit(ctx, terminal, source_string, line, col) +def destroy(context): + pass +class LexerStackPush: + def __init__(self, mode): + self.mode = mode +class LexerAction: + def __init__(self, action): + self.action = action +class LexerContext: + def __init__(self, string, resource, errors, user_context): + self.__dict__.update(locals()) + self.stack = ['default'] + self.line = 1 + self.col = 1 + self.tokens = [] + self.user_context = user_context + self.re_match = None # https://docs.python.org/3/library/re.html#match-objects +class HermesLexer: + regex = { + 'default': OrderedDict([ + (re.compile(r'\s+'), [ + # (terminal, group, function) + ]), + (re.compile(r'/\*(.*?)\*/', re.DOTALL), [ + # (terminal, group, function) + ]), + (re.compile(r'#.*'), [ + # (terminal, group, function) + ]), + (re.compile(r'task(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('task', 0, task), + ]), + (re.compile(r'(call)\s+'), [ + # (terminal, group, function) + ('call', 1, None), + LexerStackPush('task_fqn'), + ]), + (re.compile(r'workflow(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('workflow', 0, workflow), + ]), + (re.compile(r'import(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('import', 0, None), + ]), + (re.compile(r'input(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('input', 0, None), + ]), + (re.compile(r'output(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('output', 0, output), + ]), + (re.compile(r'as(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('as', 0, None), + ]), + (re.compile(r'if(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('if', 0, None), + ]), + (re.compile(r'while(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('while', 0, None), + ]), + (re.compile(r'runtime(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('runtime', 0, None), + ]), + (re.compile(r'scatter(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('scatter', 0, None), + LexerStackPush('scatter'), + ]), + (re.compile(r'command\s*(?=<<<)'), [ + # (terminal, group, function) + ('raw_command', 0, None), + LexerStackPush('raw_command2'), + ]), + (re.compile(r'command\s*(?=\{)'), [ + # (terminal, group, function) + ('raw_command', 0, None), + LexerStackPush('raw_command'), + ]), + (re.compile(r'parameter_meta(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('parameter_meta', 0, None), + ]), + (re.compile(r'meta(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('meta', 0, None), + ]), + (re.compile(r'(true|false)(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('boolean', 0, None), + ]), + (re.compile(r'(object)\s*(\{)'), [ + # (terminal, group, function) + ('object', 0, None), + ('lbrace', 0, None), + ]), + (re.compile(r'(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('type', 0, None), + ]), + (re.compile(r'[a-zA-Z]([a-zA-Z0-9_])*'), [ + # (terminal, group, function) + ('identifier', 0, None), + ]), + (re.compile(r'"([^\\\"\n]|\\[\\"\'nrbtfav\?]|\\[0-7]{1,3}|\\x[0-9a-fA-F]+|\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*"'), [ + # (terminal, group, function) + ('string', 0, wdl_unescape), + ]), + (re.compile(r'\'([^\\\'\n]|\\[\\"\'nrbtfav\?]|\\[0-7]{1,3}|\\x[0-9a-fA-F]+|\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\''), [ + # (terminal, group, function) + ('string', 0, wdl_unescape), + ]), + (re.compile(r':'), [ + # (terminal, group, function) + ('colon', 0, None), + ]), + (re.compile(r','), [ + # (terminal, group, function) + ('comma', 0, None), + ]), + (re.compile(r'=='), [ + # (terminal, group, function) + ('double_equal', 0, None), + ]), + (re.compile(r'\|\|'), [ + # (terminal, group, function) + ('double_pipe', 0, None), + ]), + (re.compile(r'\&\&'), [ + # (terminal, group, function) + ('double_ampersand', 0, None), + ]), + (re.compile(r'!='), [ + # (terminal, group, function) + ('not_equal', 0, None), + ]), + (re.compile(r'='), [ + # (terminal, group, function) + ('equal', 0, None), + ]), + (re.compile(r'\.'), [ + # (terminal, group, function) + ('dot', 0, None), + ]), + (re.compile(r'\{'), [ + # (terminal, group, function) + ('lbrace', 0, None), + ]), + (re.compile(r'\}'), [ + # (terminal, group, function) + ('rbrace', 0, None), + ]), + (re.compile(r'\('), [ + # (terminal, group, function) + ('lparen', 0, None), + ]), + (re.compile(r'\)'), [ + # (terminal, group, function) + ('rparen', 0, None), + ]), + (re.compile(r'\['), [ + # (terminal, group, function) + ('lsquare', 0, None), + ]), + (re.compile(r'\]'), [ + # (terminal, group, function) + ('rsquare', 0, None), + ]), + (re.compile(r'\+'), [ + # (terminal, group, function) + ('plus', 0, None), + ]), + (re.compile(r'\*'), [ + # (terminal, group, function) + ('asterisk', 0, None), + ]), + (re.compile(r'-'), [ + # (terminal, group, function) + ('dash', 0, None), + ]), + (re.compile(r'/'), [ + # (terminal, group, function) + ('slash', 0, None), + ]), + (re.compile(r'%'), [ + # (terminal, group, function) + ('percent', 0, None), + ]), + (re.compile(r'<='), [ + # (terminal, group, function) + ('lteq', 0, None), + ]), + (re.compile(r'<'), [ + # (terminal, group, function) + ('lt', 0, None), + ]), + (re.compile(r'>='), [ + # (terminal, group, function) + ('gteq', 0, None), + ]), + (re.compile(r'>'), [ + # (terminal, group, function) + ('gt', 0, None), + ]), + (re.compile(r'!'), [ + # (terminal, group, function) + ('not', 0, None), + ]), + (re.compile(r'\?'), [ + # (terminal, group, function) + ('qmark', 0, None), + ]), + (re.compile(r'-?[0-9]+\.[0-9]+'), [ + # (terminal, group, function) + ('float', 0, None), + ]), + (re.compile(r'[0-9]+'), [ + # (terminal, group, function) + ('integer', 0, None), + ]), + ]), + 'wf_output': OrderedDict([ + (re.compile(r'\s+'), [ + # (terminal, group, function) + ]), + (re.compile(r'#.*'), [ + # (terminal, group, function) + ]), + (re.compile(r'(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('type', 0, None), + LexerAction('pop'), + LexerStackPush('wf_output_declaration'), + ]), + (re.compile(r'\{'), [ + # (terminal, group, function) + ('lbrace', 0, None), + ]), + (re.compile(r'\}'), [ + # (terminal, group, function) + ('rbrace', 0, None), + LexerAction('pop'), + ]), + (re.compile(r','), [ + # (terminal, group, function) + ('comma', 0, None), + ]), + (re.compile(r'\.'), [ + # (terminal, group, function) + ('dot', 0, None), + ]), + (re.compile(r'\*'), [ + # (terminal, group, function) + ('asterisk', 0, None), + ]), + (re.compile(r'[a-zA-Z]([a-zA-Z0-9_])*(\.[a-zA-Z]([a-zA-Z0-9_])*)*'), [ + # (terminal, group, function) + ('fqn', 0, None), + ]), + ]), + 'wf_output_declaration': OrderedDict([ + (re.compile(r'\s+'), [ + # (terminal, group, function) + ]), + (re.compile(r'#.*'), [ + # (terminal, group, function) + ]), + (re.compile(r'\}'), [ + # (terminal, group, function) + ('rbrace', 0, None), + LexerAction('pop'), + ]), + (re.compile(r'\['), [ + # (terminal, group, function) + ('lsquare', 0, None), + ]), + (re.compile(r'\]'), [ + # (terminal, group, function) + ('rsquare', 0, None), + ]), + (re.compile(r'='), [ + # (terminal, group, function) + ('equal', 0, None), + ]), + (re.compile(r'\+'), [ + # (terminal, group, function) + ('plus', 0, None), + ]), + (re.compile(r'\*'), [ + # (terminal, group, function) + ('asterisk', 0, None), + ]), + (re.compile(r'[0-9]+'), [ + # (terminal, group, function) + ('integer', 0, None), + ]), + (re.compile(r'(true|false)(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('boolean', 0, None), + ]), + (re.compile(r'(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('type', 0, None), + ]), + (re.compile(r'[a-zA-Z]([a-zA-Z0-9_])*'), [ + # (terminal, group, function) + ('identifier', 0, None), + ]), + (re.compile(r':'), [ + # (terminal, group, function) + ('colon', 0, None), + ]), + (re.compile(r','), [ + # (terminal, group, function) + ('comma', 0, None), + ]), + (re.compile(r'\.'), [ + # (terminal, group, function) + ('dot', 0, None), + ]), + (re.compile(r'=='), [ + # (terminal, group, function) + ('double_equal', 0, None), + ]), + (re.compile(r'\|\|'), [ + # (terminal, group, function) + ('double_pipe', 0, None), + ]), + (re.compile(r'\&\&'), [ + # (terminal, group, function) + ('double_ampersand', 0, None), + ]), + (re.compile(r'!='), [ + # (terminal, group, function) + ('not_equal', 0, None), + ]), + (re.compile(r'='), [ + # (terminal, group, function) + ('equal', 0, None), + ]), + (re.compile(r'\.'), [ + # (terminal, group, function) + ('dot', 0, None), + ]), + (re.compile(r'\{'), [ + # (terminal, group, function) + ('lbrace', 0, None), + ]), + (re.compile(r'\('), [ + # (terminal, group, function) + ('lparen', 0, None), + ]), + (re.compile(r'\)'), [ + # (terminal, group, function) + ('rparen', 0, None), + ]), + (re.compile(r'\['), [ + # (terminal, group, function) + ('lsquare', 0, None), + ]), + (re.compile(r'\]'), [ + # (terminal, group, function) + ('rsquare', 0, None), + ]), + (re.compile(r'\+'), [ + # (terminal, group, function) + ('plus', 0, None), + ]), + (re.compile(r'\*'), [ + # (terminal, group, function) + ('asterisk', 0, None), + ]), + (re.compile(r'-'), [ + # (terminal, group, function) + ('dash', 0, None), + ]), + (re.compile(r'/'), [ + # (terminal, group, function) + ('slash', 0, None), + ]), + (re.compile(r'%'), [ + # (terminal, group, function) + ('percent', 0, None), + ]), + (re.compile(r'<='), [ + # (terminal, group, function) + ('lteq', 0, None), + ]), + (re.compile(r'<'), [ + # (terminal, group, function) + ('lt', 0, None), + ]), + (re.compile(r'>='), [ + # (terminal, group, function) + ('gteq', 0, None), + ]), + (re.compile(r'>'), [ + # (terminal, group, function) + ('gt', 0, None), + ]), + (re.compile(r'!'), [ + # (terminal, group, function) + ('not', 0, None), + ]), + (re.compile(r'\?'), [ + # (terminal, group, function) + ('qmark', 0, None), + ]), + (re.compile(r'"([^\\\"\n]|\\[\\"\'nrbtfav\?]|\\[0-7]{1,3}|\\x[0-9a-fA-F]+|\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*"'), [ + # (terminal, group, function) + ('string', 0, wdl_unescape), + ]), + (re.compile(r'\'([^\\\'\n]|\\[\\"\'nrbtfav\?]|\\[0-7]{1,3}|\\x[0-9a-fA-F]+|\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\''), [ + # (terminal, group, function) + ('string', 0, wdl_unescape), + ]), + (re.compile(r'-?[0-9]+\.[0-9]+'), [ + # (terminal, group, function) + ('float', 0, None), + ]), + (re.compile(r'[0-9]+'), [ + # (terminal, group, function) + ('integer', 0, None), + ]), + ]), + 'task_fqn': OrderedDict([ + (re.compile(r'\s+'), [ + # (terminal, group, function) + ]), + (re.compile(r'[a-zA-Z]([a-zA-Z0-9_])*(\.[a-zA-Z]([a-zA-Z0-9_])*)*'), [ + # (terminal, group, function) + ('fqn', 0, None), + LexerAction('pop'), + ]), + ]), + 'scatter': OrderedDict([ + (re.compile(r'\s+'), [ + # (terminal, group, function) + ]), + (re.compile(r'\)'), [ + # (terminal, group, function) + ('rparen', 0, None), + LexerAction('pop'), + ]), + (re.compile(r'\('), [ + # (terminal, group, function) + ('lparen', 0, None), + ]), + (re.compile(r'\.'), [ + # (terminal, group, function) + ('dot', 0, None), + ]), + (re.compile(r'\['), [ + # (terminal, group, function) + ('lsquare', 0, None), + ]), + (re.compile(r'\]'), [ + # (terminal, group, function) + ('rsquare', 0, None), + ]), + (re.compile(r'in(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('in', 0, None), + ]), + (re.compile(r'[a-zA-Z]([a-zA-Z0-9_])*'), [ + # (terminal, group, function) + ('identifier', 0, None), + ]), + ]), + 'raw_command': OrderedDict([ + (re.compile(r'\{'), [ + # (terminal, group, function) + ('raw_cmd_start', 0, None), + ]), + (re.compile(r'\}'), [ + # (terminal, group, function) + ('raw_cmd_end', 0, None), + LexerAction('pop'), + ]), + (re.compile(r'\$\{'), [ + # (terminal, group, function) + ('cmd_param_start', 0, None), + LexerStackPush('cmd_param'), + ]), + (re.compile(r'(.*?)(?=\$\{|\})', re.DOTALL), [ + # (terminal, group, function) + ('cmd_part', 0, None), + ]), + ]), + 'raw_command2': OrderedDict([ + (re.compile(r'<<<'), [ + # (terminal, group, function) + ('raw_cmd_start', 0, None), + ]), + (re.compile(r'>>>'), [ + # (terminal, group, function) + ('raw_cmd_end', 0, None), + LexerAction('pop'), + ]), + (re.compile(r'\$\{'), [ + # (terminal, group, function) + ('cmd_param_start', 0, None), + LexerStackPush('cmd_param'), + ]), + (re.compile(r'(.*?)(?=\$\{|>>>)', re.DOTALL), [ + # (terminal, group, function) + ('cmd_part', 0, None), + ]), + ]), + 'cmd_param': OrderedDict([ + (re.compile(r'\s+'), [ + # (terminal, group, function) + ]), + (re.compile(r'\}'), [ + # (terminal, group, function) + ('cmd_param_end', 0, None), + LexerAction('pop'), + ]), + (re.compile(r'\['), [ + # (terminal, group, function) + ('lsquare', 0, None), + ]), + (re.compile(r'\]'), [ + # (terminal, group, function) + ('rsquare', 0, None), + ]), + (re.compile(r'='), [ + # (terminal, group, function) + ('equal', 0, None), + ]), + (re.compile(r'\+'), [ + # (terminal, group, function) + ('plus', 0, None), + ]), + (re.compile(r'\*'), [ + # (terminal, group, function) + ('asterisk', 0, None), + ]), + (re.compile(r'[0-9]+'), [ + # (terminal, group, function) + ('integer', 0, None), + ]), + (re.compile(r'[a-zA-Z]([a-zA-Z0-9_])*(?=\s*=)'), [ + # (terminal, group, function) + ('cmd_attr_hint', None, None), + ('identifier', 0, None), + ]), + (re.compile(r'(true|false)(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('boolean', 0, None), + ]), + (re.compile(r'(Array|Map|Object|Pair|Boolean|Int|Float|Uri|File|String)(?![a-zA-Z0-9_])(?![a-zA-Z0-9_])'), [ + # (terminal, group, function) + ('type', 0, None), + ]), + (re.compile(r'[a-zA-Z]([a-zA-Z0-9_])*'), [ + # (terminal, group, function) + ('identifier', 0, None), + ]), + (re.compile(r':'), [ + # (terminal, group, function) + ('colon', 0, None), + ]), + (re.compile(r','), [ + # (terminal, group, function) + ('comma', 0, None), + ]), + (re.compile(r'\.'), [ + # (terminal, group, function) + ('dot', 0, None), + ]), + (re.compile(r'=='), [ + # (terminal, group, function) + ('double_equal', 0, None), + ]), + (re.compile(r'\|\|'), [ + # (terminal, group, function) + ('double_pipe', 0, None), + ]), + (re.compile(r'\&\&'), [ + # (terminal, group, function) + ('double_ampersand', 0, None), + ]), + (re.compile(r'!='), [ + # (terminal, group, function) + ('not_equal', 0, None), + ]), + (re.compile(r'='), [ + # (terminal, group, function) + ('equal', 0, None), + ]), + (re.compile(r'\.'), [ + # (terminal, group, function) + ('dot', 0, None), + ]), + (re.compile(r'\{'), [ + # (terminal, group, function) + ('lbrace', 0, None), + ]), + (re.compile(r'\('), [ + # (terminal, group, function) + ('lparen', 0, None), + ]), + (re.compile(r'\)'), [ + # (terminal, group, function) + ('rparen', 0, None), + ]), + (re.compile(r'\['), [ + # (terminal, group, function) + ('lsquare', 0, None), + ]), + (re.compile(r'\]'), [ + # (terminal, group, function) + ('rsquare', 0, None), + ]), + (re.compile(r'\+'), [ + # (terminal, group, function) + ('plus', 0, None), + ]), + (re.compile(r'\*'), [ + # (terminal, group, function) + ('asterisk', 0, None), + ]), + (re.compile(r'-'), [ + # (terminal, group, function) + ('dash', 0, None), + ]), + (re.compile(r'/'), [ + # (terminal, group, function) + ('slash', 0, None), + ]), + (re.compile(r'%'), [ + # (terminal, group, function) + ('percent', 0, None), + ]), + (re.compile(r'<='), [ + # (terminal, group, function) + ('lteq', 0, None), + ]), + (re.compile(r'<'), [ + # (terminal, group, function) + ('lt', 0, None), + ]), + (re.compile(r'>='), [ + # (terminal, group, function) + ('gteq', 0, None), + ]), + (re.compile(r'>'), [ + # (terminal, group, function) + ('gt', 0, None), + ]), + (re.compile(r'!'), [ + # (terminal, group, function) + ('not', 0, None), + ]), + (re.compile(r'"([^\\\"\n]|\\[\\"\'nrbtfav\?]|\\[0-7]{1,3}|\\x[0-9a-fA-F]+|\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*"'), [ + # (terminal, group, function) + ('string', 0, wdl_unescape), + ]), + (re.compile(r'\'([^\\\'\n]|\\[\\"\'nrbtfav\?]|\\[0-7]{1,3}|\\x[0-9a-fA-F]+|\\[uU]([0-9a-fA-F]{4})([0-9a-fA-F]{4})?)*\''), [ + # (terminal, group, function) + ('string', 0, wdl_unescape), + ]), + (re.compile(r'-?[0-9]+\.[0-9]+'), [ + # (terminal, group, function) + ('float', 0, None), + ]), + (re.compile(r'[0-9]+'), [ + # (terminal, group, function) + ('integer', 0, None), + ]), + ]), + } + def _advance_line_col(self, string, length, line, col): + for i in range(length): + if string[i] == '\n': + line += 1 + col = 1 + else: + col += 1 + return (line, col) + def _advance_string(self, ctx, string): + (ctx.line, ctx.col) = self._advance_line_col(string, len(string), ctx.line, ctx.col) + ctx.string = ctx.string[len(string):] + def _next(self, ctx, debug=False): + for regex, outputs in self.regex[ctx.stack[-1]].items(): + if debug: + from xtermcolor import colorize + token_count = len(ctx.tokens) + print('{1} ({2}, {3}) regex: {0}'.format( + colorize(regex.pattern, ansi=40), colorize(ctx.string[:20].replace('\n', '\\n'), ansi=15), ctx.line, ctx.col) + ) + match = regex.match(ctx.string) + if match: + ctx.re_match = match + for output in outputs: + if isinstance(output, tuple): + (terminal, group, function) = output + function = function if function else default_action + source_string = match.group(group) if group is not None else '' + (group_line, group_col) = self._advance_line_col(ctx.string, match.start(group) if group else 0, ctx.line, ctx.col) + function( + ctx, + terminal, + source_string, + group_line, + group_col + ) + if debug: + print(' matched: {}'.format(colorize(match.group(0).replace('\n', '\\n'), ansi=3))) + for token in ctx.tokens[token_count:]: + print(' emit: [{}] [{}, {}] [{}] stack:{} context:{}'.format( + colorize(token.str, ansi=9), + colorize(str(token.line), ansi=5), + colorize(str(token.col), ansi=5), + colorize(token.source_string, ansi=3), + colorize(str(ctx.stack), ansi=4), + colorize(str(ctx.user_context), ansi=13) + )) + token_count = len(ctx.tokens) + if isinstance(output, LexerStackPush): + ctx.stack.append(output.mode) + if debug: + print(' push on stack: {}'.format(colorize(output.mode, ansi=4))) + if isinstance(output, LexerAction): + if output.action == 'pop': + mode = ctx.stack.pop() + if debug: + print(' pop off stack: {}'.format(colorize(mode, ansi=4))) + self._advance_string(ctx, match.group(0)) + return len(match.group(0)) > 0 + return False + def lex(self, string, resource, errors=None, debug=False): + if errors is None: + errors = DefaultSyntaxErrorHandler() + string_copy = string + user_context = init() + ctx = LexerContext(string, resource, errors, user_context) + while len(ctx.string): + matched = self._next(ctx, debug) + if matched == False: + raise ctx.errors.unrecognized_token(string_copy, ctx.line, ctx.col) + destroy(ctx.user_context) + return ctx.tokens +def lex(source, resource, errors=None, debug=False): + return TokenStream(HermesLexer().lex(source, resource, errors, debug)) diff --git a/python/README.md b/python/README.md deleted file mode 100644 index 764c848..0000000 --- a/python/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# PyWDL - -A Python implementation of a WDL parser and language bindings. - -**This repository has moved to https://github.com/broadinstitute/pywdl**