private net.sf.laja.parser.engine2.element.Element getGrammar1() {
// *** Output classes ***
// *** Declarations ***
OrList newline = new OrList(1, "newline");
ElementList comment = new ElementList(2, "comment");
Repeat ws = new Repeat(3, "ws");
Optional s = new Optional(4, "s");
Str ff = new Str(5, "\"");
Repeat spaces = new Repeat(6, "spaces");
Range digit = new Range(7, "digit", "0", "9");
FollowedBy booleanData = new FollowedBy(8, "booleanData");
Repeat unsignedInt = new Repeat(9, "unsignedInt");
ElementList integerData = new ElementList(10, "integerData");
ElementList floatData = new ElementList(11, "floatData");
OrList letter = new OrList(12, "letter");
ElementList varname = new ElementList(13, "varname");
Optional skip = new Optional(14, "skip");
FollowedBy nullData = new FollowedBy(15, "nullData");
ElementList stringExp = new ElementList(16, "stringExp");
ElementList classOrPackageName = new ElementList(17, "classOrPackageName");
ElementList newStatement = new ElementList(18, "newStatement");
OrList data = new OrList(19, "data");
ElementList listData = new ElementList(20, "listData");
ElementList mapMember = new ElementList(21, "mapMember");
ElementList mapDataRef = new ElementList(22, "mapDataRef");
ElementList mapData = new ElementList(23, "mapData");
OrList indexItem = new OrList(24, "indexItem");
Repeat listIndex = new Repeat(25, "listIndex");
ElementList args = new ElementList(26, "args");
ElementList namespaceRef = new ElementList(27, "namespaceRef");
ElementList variableRef = new ElementList(28, "variableRef");
ElementList methodRef = new ElementList(29, "methodRef");
ElementList attributeRef = new ElementList(30, "attributeRef");
ElementList attributeVariableRef = new ElementList(31, "attributeVariableRef");
ElementList attributeMethodRef = new ElementList(32, "attributeMethodRef");
ElementList reference = new ElementList(33, "reference");
ElementList callReference = new ElementList(34, "callReference");
ElementList stringref = new ElementList(35, "stringref");
ElementList end = new ElementList(36, "end");
ElementList write = new ElementList(37, "write");
ElementList set = new ElementList(38, "set");
ElementList local = new ElementList(39, "local");
OrList operator = new OrList(40, "operator");
ElementList comparition = new ElementList(41, "comparition");
ElementList conditionElement = new ElementList(42, "conditionElement");
OrList conditionBase = new OrList(43, "conditionBase");
ElementList conditionAnd = new ElementList(44, "conditionAnd");
ElementList condition = new ElementList(45, "condition");
ElementList ifcmd = new ElementList(46, "ifcmd");
ElementList elseif = new ElementList(47, "elseif");
ElementList _else = new ElementList(48, "else");
ElementList whilecmd = new ElementList(49, "whilecmd");
ElementList call = new ElementList(50, "call");
ElementList foreach = new ElementList(51, "foreach");
ElementList importcmd = new ElementList(52, "importcmd");
ElementList macro = new ElementList(53, "macro");
ElementList returncmd = new ElementList(54, "returncmd");
ElementList function = new ElementList(55, "function");
ElementList namespace = new ElementList(56, "namespace");
ElementList error = new ElementList(57, "error");
ElementList command = new ElementList(58, "command");
ElementList astext = new ElementList(59, "astext");
Repeat text = new Repeat(60, "text");
Optional block = new Optional(61, "block");
ElementList template = new ElementList(62, "template");
// *** Statements ***
// newline = "\r\n" | "\n"
newline.add(64, new Str(63, "\r\n"));
newline.add(66, new Str(65, "\n"));
// comment = [spaces] ("#*" [(comment | !"*#")+] "*#") | ("##" [!newline+] newline|END) skip
Optional comment_1 = new Optional(67, "comment_1");
comment_1.add(68, spaces);
comment.add(69, comment_1);
OrList comment_2 = new OrList(70, "comment_2");
ElementList comment_2_1 = new ElementList(71, "comment_2_1");
comment_2_1.add(73, new Str(72, "#*"));
Optional comment_2_1_1 = new Optional(74, "comment_2_1_1");
Repeat comment_2_1_1_1 = new Repeat(75, "comment_2_1_1_1");
OrList comment_2_1_1_1_1 = new OrList(76, "comment_2_1_1_1_1");
comment_2_1_1_1_1.add(77, comment);
comment_2_1_1_1_1.add(79, new Str(78, "*#", NOT));
comment_2_1_1_1.add(80, comment_2_1_1_1_1);
comment_2_1_1.add(81, comment_2_1_1_1);
comment_2_1.add(82, comment_2_1_1);
comment_2_1.add(84, new Str(83, "*#"));
comment_2.add(85, comment_2_1);
ElementList comment_2_2 = new ElementList(86, "comment_2_2");
comment_2_2.add(88, new Str(87, "##"));
Optional comment_2_2_1 = new Optional(89, "comment_2_2_1");
Repeat comment_2_2_1_1 = new Repeat(90, "comment_2_2_1_1");
comment_2_2_1_1.add(91, newline, NOT);
comment_2_2_1.add(92, comment_2_2_1_1);
comment_2_2.add(93, comment_2_2_1);
OrList comment_2_2_2 = new OrList(94, "comment_2_2_2");
comment_2_2_2.add(95, newline);
comment_2_2_2.add(97, new End(96, "comment_2_2_2"));
comment_2_2.add(98, comment_2_2_2);
comment_2.add(99, comment_2_2);
comment.add(100, comment_2);
comment.add(101, skip);
// ws = (newline | " " | "\t" | comment)+
OrList ws_1 = new OrList(102, "ws_1");
ws_1.add(103, newline);
ws_1.add(105, new Str(104, " "));
ws_1.add(107, new Str(106, "\t"));
ws_1.add(108, comment);
ws.add(109, ws_1);
// s = [ws]
s.add(110, ws);
// ff = "\""
// spaces = (" " | "\t")+
OrList spaces_1 = new OrList(111, "spaces_1");
spaces_1.add(113, new Str(112, " "));
spaces_1.add(115, new Str(114, "\t"));
spaces.add(116, spaces_1);
// digit = "0".."9"
// booleanData = "true":true | "false":false \ !(letter|digit)
OrList booleanData_1 = new OrList(117, "booleanData_1");
booleanData_1.add(119, new Str(118, "true"));
booleanData_1.add(121, new Str(120, "false"));
booleanData.setElement(122, booleanData_1);
OrList booleanData_2 = new OrList(123, "booleanData_2", NOT);
booleanData_2.add(124, letter);
booleanData_2.add(125, digit);
booleanData.followedby(126, booleanData_2);
// unsignedInt = digit+
unsignedInt.add(127, digit);
// integerData = ["-"] unsignedInt
Optional integerData_1 = new Optional(128, "integerData_1");
integerData_1.add(130, new Str(129, "-"));
integerData.add(131, integerData_1);
integerData.add(132, unsignedInt);
// floatData = ["-"] unsignedInt "." unsignedInt
Optional floatData_1 = new Optional(133, "floatData_1");
floatData_1.add(135, new Str(134, "-"));
floatData.add(136, floatData_1);
floatData.add(137, unsignedInt);
floatData.add(139, new Str(138, "."));
floatData.add(140, unsignedInt);
// letter = "a".."z" | "A".."Z" | "_"
letter.add(142, new Range(141, "letter", "a", "z"));
letter.add(144, new Range(143, "letter", "A", "Z"));
letter.add(146, new Str(145, "_"));
// varname = letter [letter|digit]+
varname.add(147, letter);
Optional varname_1 = new Optional(148, "varname_1");
Repeat varname_1_1 = new Repeat(149, "varname_1_1");
OrList varname_1_1_1 = new OrList(150, "varname_1_1_1");
varname_1_1_1.add(151, letter);
varname_1_1_1.add(152, digit);
varname_1_1.add(153, varname_1_1_1);
varname_1.add(154, varname_1_1);
varname.add(155, varname_1);
// skip = [[spaces] newline]
Optional skip_1 = new Optional(156, "skip_1");
skip_1.add(157, spaces);
skip.add(158, skip_1);
skip.add(159, newline);
// nullData = "null" \ !(letter|digit)
nullData.setElement(161, new Str(160, "null"));
OrList nullData_1 = new OrList(162, "nullData_1", NOT);
nullData_1.add(163, letter);
nullData_1.add(164, digit);
nullData.followedby(165, nullData_1);
// stringExp = ff [stringref | (("\\\"" | !(ff|stringref))+):text]+ ff
stringExp.add(166, ff);
Optional stringExp_1 = new Optional(167, "stringExp_1");
Repeat stringExp_1_1 = new Repeat(168, "stringExp_1_1");
OrList stringExp_1_1_1 = new OrList(169, "stringExp_1_1_1");
stringExp_1_1_1.add(170, stringref);
Repeat stringExp_1_1_1_1 = new Repeat(171, "stringExp_1_1_1_1");
OrList stringExp_1_1_1_1_1 = new OrList(172, "stringExp_1_1_1_1_1");
stringExp_1_1_1_1_1.add(174, new Str(173, "\\\""));
OrList stringExp_1_1_1_1_1_1 = new OrList(175, "stringExp_1_1_1_1_1_1", NOT);
stringExp_1_1_1_1_1_1.add(176, ff);
stringExp_1_1_1_1_1_1.add(177, stringref);
stringExp_1_1_1_1_1.add(178, stringExp_1_1_1_1_1_1);
stringExp_1_1_1_1.add(179, stringExp_1_1_1_1_1);
stringExp_1_1_1.add(180, stringExp_1_1_1_1);
stringExp_1_1.add(181, stringExp_1_1_1);
stringExp_1.add(182, stringExp_1_1);
stringExp.add(183, stringExp_1);
stringExp.add(184, ff);
// classOrPackageName = letter|"$" [letter|digit|"$"]+
OrList classOrPackageName_1 = new OrList(185, "classOrPackageName_1");
classOrPackageName_1.add(186, letter);
classOrPackageName_1.add(188, new Str(187, "$"));
classOrPackageName.add(189, classOrPackageName_1);
Optional classOrPackageName_2 = new Optional(190, "classOrPackageName_2");
Repeat classOrPackageName_2_1 = new Repeat(191, "classOrPackageName_2_1");
OrList classOrPackageName_2_1_1 = new OrList(192, "classOrPackageName_2_1_1");
classOrPackageName_2_1_1.add(193, letter);
classOrPackageName_2_1_1.add(194, digit);
classOrPackageName_2_1_1.add(196, new Str(195, "$"));
classOrPackageName_2_1.add(197, classOrPackageName_2_1_1);
classOrPackageName_2.add(198, classOrPackageName_2_1);
classOrPackageName.add(199, classOrPackageName_2);
// newStatement = "new" ws classOrPackageName ["." classOrPackageName]+ s args
newStatement.add(201, new Str(200, "new"));
newStatement.add(202, ws);
newStatement.add(203, classOrPackageName);
Optional newStatement_1 = new Optional(204, "newStatement_1");
Repeat newStatement_1_1 = new Repeat(205, "newStatement_1_1");
newStatement_1_1.add(207, new Str(206, "."));
newStatement_1_1.add(208, classOrPackageName);
newStatement_1.add(209, newStatement_1_1);
newStatement.add(210, newStatement_1);
newStatement.add(211, s);
newStatement.add(212, args);
// data = newStatement | stringExp | listData | mapDataRef | nullData | booleanData | reference | floatData | integerData
data.add(213, newStatement);
data.add(214, stringExp);
data.add(215, listData);
data.add(216, mapDataRef);
data.add(217, nullData);
data.add(218, booleanData);
data.add(219, reference);
data.add(220, floatData);
data.add(221, integerData);
// listData = "[" s [data [s "," s data]+ s] "]" [s "as array":array]
listData.add(223, new Str(222, "["));
listData.add(224, s);
Optional listData_1 = new Optional(225, "listData_1");
listData_1.add(226, data);
Optional listData_1_1 = new Optional(227, "listData_1_1");
Repeat listData_1_1_1 = new Repeat(228, "listData_1_1_1");
listData_1_1_1.add(229, s);
listData_1_1_1.add(231, new Str(230, ","));
listData_1_1_1.add(232, s);
listData_1_1_1.add(233, data);
listData_1_1.add(234, listData_1_1_1);
listData_1.add(235, listData_1_1);
listData_1.add(236, s);
listData.add(237, listData_1);
listData.add(239, new Str(238, "]"));
Optional listData_2 = new Optional(240, "listData_2");
listData_2.add(241, s);
listData_2.add(243, new Str(242, "as array"));
listData.add(244, listData_2);
// mapMember = varname:name s ":" s data
mapMember.add(245, varname);
mapMember.add(246, s);
mapMember.add(248, new Str(247, ":"));
mapMember.add(249, s);
mapMember.add(250, data);
// mapDataRef = "{" [mapData] "}"
mapDataRef.add(252, new Str(251, "{"));
Optional mapDataRef_1 = new Optional(253, "mapDataRef_1");
mapDataRef_1.add(254, mapData);
mapDataRef.add(255, mapDataRef_1);
mapDataRef.add(257, new Str(256, "}"));
// mapData = (s mapMember)+ s
Repeat mapData_1 = new Repeat(258, "mapData_1");
mapData_1.add(259, s);
mapData_1.add(260, mapMember);
mapData.add(261, mapData_1);
mapData.add(262, s);
// indexItem = unsignedInt | reference
indexItem.add(263, unsignedInt);
indexItem.add(264, reference);
// listIndex = ("[" indexItem "]")+
listIndex.add(266, new Str(265, "["));
listIndex.add(267, indexItem);
listIndex.add(269, new Str(268, "]"));
// args = "(" s mapData|([data [s "," s data]+]) s ")"
args.add(271, new Str(270, "("));
args.add(272, s);
OrList args_1 = new OrList(273, "args_1");
args_1.add(274, mapData);
Optional args_1_1 = new Optional(275, "args_1_1");
args_1_1.add(276, data);
Optional args_1_1_1 = new Optional(277, "args_1_1_1");
Repeat args_1_1_1_1 = new Repeat(278, "args_1_1_1_1");
args_1_1_1_1.add(279, s);
args_1_1_1_1.add(281, new Str(280, ","));
args_1_1_1_1.add(282, s);
args_1_1_1_1.add(283, data);
args_1_1_1.add(284, args_1_1_1_1);
args_1_1.add(285, args_1_1_1);
args_1.add(286, args_1_1);
args.add(287, args_1);
args.add(288, s);
args.add(290, new Str(289, ")"));
// namespaceRef = "$" [varname]:namespace
namespaceRef.add(292, new Str(291, "$"));
Optional namespaceRef_1 = new Optional(293, "namespaceRef_1");
namespaceRef_1.add(294, varname);
namespaceRef.add(295, namespaceRef_1);
// variableRef = varname:variableName
variableRef.add(296, varname);
// methodRef = varname:methodName s args
methodRef.add(297, varname);
methodRef.add(298, s);
methodRef.add(299, args);
// attributeRef = methodRef|variableRef [listIndex]
OrList attributeRef_1 = new OrList(300, "attributeRef_1");
attributeRef_1.add(301, methodRef);
attributeRef_1.add(302, variableRef);
attributeRef.add(303, attributeRef_1);
Optional attributeRef_2 = new Optional(304, "attributeRef_2");
attributeRef_2.add(305, listIndex);
attributeRef.add(306, attributeRef_2);
// attributeVariableRef = variableRef [listIndex]
attributeVariableRef.add(307, variableRef);
Optional attributeVariableRef_1 = new Optional(308, "attributeVariableRef_1");
attributeVariableRef_1.add(309, listIndex);
attributeVariableRef.add(310, attributeVariableRef_1);
// attributeMethodRef = methodRef [listIndex]
attributeMethodRef.add(311, methodRef);
Optional attributeMethodRef_1 = new Optional(312, "attributeMethodRef_1");
attributeMethodRef_1.add(313, listIndex);
attributeMethodRef.add(314, attributeMethodRef_1);
// reference =
// :begin (([namespaceRef "."] attributeRef)|namespaceRef ["." attributeRef:nextAttributeRef]+) |
// (floatData|integerData|stringExp ("." attributeRef:nextAttributeRef)+)
reference.add(316, new Marker(315, "begin"));
OrList reference_1 = new OrList(317, "reference_1");
ElementList reference_1_1 = new ElementList(318, "reference_1_1");
OrList reference_1_1_1 = new OrList(319, "reference_1_1_1");
ElementList reference_1_1_1_1 = new ElementList(320, "reference_1_1_1_1");
Optional reference_1_1_1_1_1 = new Optional(321, "reference_1_1_1_1_1");
reference_1_1_1_1_1.add(322, namespaceRef);
reference_1_1_1_1_1.add(324, new Str(323, "."));
reference_1_1_1_1.add(325, reference_1_1_1_1_1);
reference_1_1_1_1.add(326, attributeRef);
reference_1_1_1.add(327, reference_1_1_1_1);
reference_1_1_1.add(328, namespaceRef);
reference_1_1.add(329, reference_1_1_1);
Optional reference_1_1_2 = new Optional(330, "reference_1_1_2");
Repeat reference_1_1_2_1 = new Repeat(331, "reference_1_1_2_1");
reference_1_1_2_1.add(333, new Str(332, "."));
reference_1_1_2_1.add(334, attributeRef);
reference_1_1_2.add(335, reference_1_1_2_1);
reference_1_1.add(336, reference_1_1_2);
reference_1.add(337, reference_1_1);
ElementList reference_1_2 = new ElementList(338, "reference_1_2");
OrList reference_1_2_1 = new OrList(339, "reference_1_2_1");
reference_1_2_1.add(340, floatData);
reference_1_2_1.add(341, integerData);
reference_1_2_1.add(342, stringExp);
reference_1_2.add(343, reference_1_2_1);
Repeat reference_1_2_2 = new Repeat(344, "reference_1_2_2");
reference_1_2_2.add(346, new Str(345, "."));
reference_1_2_2.add(347, attributeRef);
reference_1_2.add(348, reference_1_2_2);
reference_1.add(349, reference_1_2);
reference.add(350, reference_1);
// callReference =
// :begin (([namespaceRef "."](attributeMethodRef)|(attributeVariableRef ("." attributeRef:nextAttributeRef)+))
// ["." attributeRef:nextAttributeRef]+)
callReference.add(352, new Marker(351, "begin"));
ElementList callReference_1 = new ElementList(353, "callReference_1");
ElementList callReference_1_1 = new ElementList(354, "callReference_1_1");
Optional callReference_1_1_1 = new Optional(355, "callReference_1_1_1");
callReference_1_1_1.add(356, namespaceRef);
callReference_1_1_1.add(358, new Str(357, "."));
callReference_1_1.add(359, callReference_1_1_1);
OrList callReference_1_1_2 = new OrList(360, "callReference_1_1_2");
callReference_1_1_2.add(361, attributeMethodRef);
ElementList callReference_1_1_2_1 = new ElementList(362, "callReference_1_1_2_1");
callReference_1_1_2_1.add(363, attributeVariableRef);
Repeat callReference_1_1_2_1_1 = new Repeat(364, "callReference_1_1_2_1_1");
callReference_1_1_2_1_1.add(366, new Str(365, "."));
callReference_1_1_2_1_1.add(367, attributeRef);
callReference_1_1_2_1.add(368, callReference_1_1_2_1_1);
callReference_1_1_2.add(369, callReference_1_1_2_1);
callReference_1_1.add(370, callReference_1_1_2);
callReference_1.add(371, callReference_1_1);
Optional callReference_1_2 = new Optional(372, "callReference_1_2");
Repeat callReference_1_2_1 = new Repeat(373, "callReference_1_2_1");
callReference_1_2_1.add(375, new Str(374, "."));
callReference_1_2_1.add(376, attributeRef);
callReference_1_2.add(377, callReference_1_2_1);
callReference_1.add(378, callReference_1_2);
callReference.add(379, callReference_1);
// stringref = :begin "{" "..":parentDir | ".":currentDir | reference "}"
stringref.add(381, new Marker(380, "begin"));
stringref.add(383, new Str(382, "{"));
OrList stringref_1 = new OrList(384, "stringref_1");
stringref_1.add(386, new Str(385, ".."));
stringref_1.add(388, new Str(387, "."));
stringref_1.add(389, reference);
stringref.add(390, stringref_1);
stringref.add(392, new Str(391, "}"));
// end = [spaces] "#end" skip
Optional end_1 = new Optional(393, "end_1");
end_1.add(394, spaces);
end.add(395, end_1);
end.add(397, new Str(396, "#end"));
end.add(398, skip);
// write = :begin "#write" ws stringExp:filename skip block end
write.add(400, new Marker(399, "begin"));
write.add(402, new Str(401, "#write"));
write.add(403, ws);
write.add(404, stringExp);
write.add(405, skip);
write.add(406, block);
write.add(407, end);
// set = :begin "#set" s "(" s reference:target s "=" s comparition|data s ")" skip
set.add(409, new Marker(408, "begin"));
set.add(411, new Str(410, "#set"));
set.add(412, s);
set.add(414, new Str(413, "("));
set.add(415, s);
set.add(416, reference);
set.add(417, s);
set.add(419, new Str(418, "="));
set.add(420, s);
OrList set_1 = new OrList(421, "set_1");
set_1.add(422, comparition);
set_1.add(423, data);
set.add(424, set_1);
set.add(425, s);
set.add(427, new Str(426, ")"));
set.add(428, skip);
// local = "#local" s "(" s reference:target s "=" s comparition|data s ")" skip
local.add(430, new Str(429, "#local"));
local.add(431, s);
local.add(433, new Str(432, "("));
local.add(434, s);
local.add(435, reference);
local.add(436, s);
local.add(438, new Str(437, "="));
local.add(439, s);
OrList local_1 = new OrList(440, "local_1");
local_1.add(441, comparition);
local_1.add(442, data);
local.add(443, local_1);
local.add(444, s);
local.add(446, new Str(445, ")"));
local.add(447, skip);
// operator = "==":equals | "!=":notEquals | "<=":lessOrEqual | "<":lessThan | ">=":greaterOrEqual | ">":greaterThan
operator.add(449, new Str(448, "=="));
operator.add(451, new Str(450, "!="));
operator.add(453, new Str(452, "<="));
operator.add(455, new Str(454, "<"));
operator.add(457, new Str(456, ">="));
operator.add(459, new Str(458, ">"));
// comparition = data:leftOperand s operator s data:rightOperand
comparition.add(460, data);
comparition.add(461, s);
comparition.add(462, operator);
comparition.add(463, s);
comparition.add(464, data);
// conditionElement = ["!":not] s (comparition | (reference & (!booleanData *)) | booleanData:booleanCondition)
Optional conditionElement_1 = new Optional(465, "conditionElement_1");
conditionElement_1.add(467, new Str(466, "!"));
conditionElement.add(468, conditionElement_1);
conditionElement.add(469, s);
OrList conditionElement_2 = new OrList(470, "conditionElement_2");
conditionElement_2.add(471, comparition);
ElementList conditionElement_2_1 = new ElementList(472, "conditionElement_2_1");
AndList conditionElement_2_1_1 = new AndList(473, "conditionElement_2_1_1");
conditionElement_2_1_1.mainAnd(474, reference);
ElementList conditionElement_2_1_1_1 = new ElementList(475, "conditionElement_2_1_1_1");
conditionElement_2_1_1_1.add(476, booleanData, NOT);
conditionElement_2_1_1_1.add(478, new Complete(477, "conditionElement_2_1_1_1"));
conditionElement_2_1_1.and(479, conditionElement_2_1_1_1);
conditionElement_2_1.add(480, conditionElement_2_1_1);
conditionElement_2.add(481, conditionElement_2_1);
conditionElement_2.add(482, booleanData);
conditionElement.add(483, conditionElement_2);
// conditionBase = conditionElement | (s "(" s condition s ")")
conditionBase.add(484, conditionElement);
ElementList conditionBase_1 = new ElementList(485, "conditionBase_1");
conditionBase_1.add(486, s);
conditionBase_1.add(488, new Str(487, "("));
conditionBase_1.add(489, s);
conditionBase_1.add(490, condition);
conditionBase_1.add(491, s);
conditionBase_1.add(493, new Str(492, ")"));
conditionBase.add(494, conditionBase_1);
// conditionAnd = conditionBase [s "&&" s conditionBase]+
conditionAnd.add(495, conditionBase);
Optional conditionAnd_1 = new Optional(496, "conditionAnd_1");
Repeat conditionAnd_1_1 = new Repeat(497, "conditionAnd_1_1");
conditionAnd_1_1.add(498, s);
conditionAnd_1_1.add(500, new Str(499, "&&"));
conditionAnd_1_1.add(501, s);
conditionAnd_1_1.add(502, conditionBase);
conditionAnd_1.add(503, conditionAnd_1_1);
conditionAnd.add(504, conditionAnd_1);
// condition = conditionAnd [s "||" s conditionAnd]+
condition.add(505, conditionAnd);
Optional condition_1 = new Optional(506, "condition_1");
Repeat condition_1_1 = new Repeat(507, "condition_1_1");
condition_1_1.add(508, s);
condition_1_1.add(510, new Str(509, "||"));
condition_1_1.add(511, s);
condition_1_1.add(512, conditionAnd);
condition_1.add(513, condition_1_1);
condition.add(514, condition_1);
// ifcmd = "#if" s "(" s condition s ")" skip [block] [elseif]+ [else] end
ifcmd.add(516, new Str(515, "#if"));
ifcmd.add(517, s);
ifcmd.add(519, new Str(518, "("));
ifcmd.add(520, s);
ifcmd.add(521, condition);
ifcmd.add(522, s);
ifcmd.add(524, new Str(523, ")"));
ifcmd.add(525, skip);
Optional ifcmd_1 = new Optional(526, "ifcmd_1");
ifcmd_1.add(527, block);
ifcmd.add(528, ifcmd_1);
Optional ifcmd_2 = new Optional(529, "ifcmd_2");
Repeat ifcmd_2_1 = new Repeat(530, "ifcmd_2_1");
ifcmd_2_1.add(531, elseif);
ifcmd_2.add(532, ifcmd_2_1);
ifcmd.add(533, ifcmd_2);
Optional ifcmd_3 = new Optional(534, "ifcmd_3");
ifcmd_3.add(535, _else);
ifcmd.add(536, ifcmd_3);
ifcmd.add(537, end);
// elseif = [spaces] "#else if" s "(" s condition s ")" skip [block]
Optional elseif_1 = new Optional(538, "elseif_1");
elseif_1.add(539, spaces);
elseif.add(540, elseif_1);
elseif.add(542, new Str(541, "#else if"));
elseif.add(543, s);
elseif.add(545, new Str(544, "("));
elseif.add(546, s);
elseif.add(547, condition);
elseif.add(548, s);
elseif.add(550, new Str(549, ")"));
elseif.add(551, skip);
Optional elseif_2 = new Optional(552, "elseif_2");
elseif_2.add(553, block);
elseif.add(554, elseif_2);
// else = [spaces] "#else" skip [block]
Optional else_1 = new Optional(555, "else_1");
else_1.add(556, spaces);
_else.add(557, else_1);
_else.add(559, new Str(558, "#else"));
_else.add(560, skip);
Optional else_2 = new Optional(561, "else_2");
else_2.add(562, block);
_else.add(563, else_2);
// whilecmd = "#while" s "(" s condition s ")" skip [block] end
whilecmd.add(565, new Str(564, "#while"));
whilecmd.add(566, s);
whilecmd.add(568, new Str(567, "("));
whilecmd.add(569, s);
whilecmd.add(570, condition);
whilecmd.add(571, s);
whilecmd.add(573, new Str(572, ")"));
whilecmd.add(574, skip);
Optional whilecmd_1 = new Optional(575, "whilecmd_1");
whilecmd_1.add(576, block);
whilecmd.add(577, whilecmd_1);
whilecmd.add(578, end);
// call = :begin "#" callReference [ws "into" ws ("$" [varname]:targetNamespace)|varname:targetVariable] skip
call.add(580, new Marker(579, "begin"));
call.add(582, new Str(581, "#"));
call.add(583, callReference);
Optional call_1 = new Optional(584, "call_1");
call_1.add(585, ws);
call_1.add(587, new Str(586, "into"));
call_1.add(588, ws);
OrList call_1_1 = new OrList(589, "call_1_1");
ElementList call_1_1_1 = new ElementList(590, "call_1_1_1");
call_1_1_1.add(592, new Str(591, "$"));
Optional call_1_1_1_1 = new Optional(593, "call_1_1_1_1");
call_1_1_1_1.add(594, varname);
call_1_1_1.add(595, call_1_1_1_1);
call_1_1.add(596, call_1_1_1);
call_1_1.add(597, varname);
call_1.add(598, call_1_1);
call.add(599, call_1);
call.add(600, skip);
// foreach =
// :begin "#foreach" s "(" varname:variable ws "in" ws listData|mapDataRef|reference s
// ["where" s condition s] ")" skip block end
foreach.add(602, new Marker(601, "begin"));
foreach.add(604, new Str(603, "#foreach"));
foreach.add(605, s);
foreach.add(607, new Str(606, "("));
foreach.add(608, varname);
foreach.add(609, ws);
foreach.add(611, new Str(610, "in"));
foreach.add(612, ws);
OrList foreach_1 = new OrList(613, "foreach_1");
foreach_1.add(614, listData);
foreach_1.add(615, mapDataRef);
foreach_1.add(616, reference);
foreach.add(617, foreach_1);
foreach.add(618, s);
Optional foreach_2 = new Optional(619, "foreach_2");
foreach_2.add(621, new Str(620, "where"));
foreach_2.add(622, s);
foreach_2.add(623, condition);
foreach_2.add(624, s);
foreach.add(625, foreach_2);
foreach.add(627, new Str(626, ")"));
foreach.add(628, skip);
foreach.add(629, block);
foreach.add(630, end);
// importcmd = :begin "#import" ws stringExp:filename [ws "as text":asText] skip
importcmd.add(632, new Marker(631, "begin"));
importcmd.add(634, new Str(633, "#import"));
importcmd.add(635, ws);
importcmd.add(636, stringExp);
Optional importcmd_1 = new Optional(637, "importcmd_1");
importcmd_1.add(638, ws);
importcmd_1.add(640, new Str(639, "as text"));
importcmd.add(641, importcmd_1);
importcmd.add(642, skip);
// macro = :begin "#macro" ws varname:name s "(" s [varname:parameter [s "," s varname:parameter]+] s ")" skip [block] end
macro.add(644, new Marker(643, "begin"));
macro.add(646, new Str(645, "#macro"));
macro.add(647, ws);
macro.add(648, varname);
macro.add(649, s);
macro.add(651, new Str(650, "("));
macro.add(652, s);
Optional macro_1 = new Optional(653, "macro_1");
macro_1.add(654, varname);
Optional macro_1_1 = new Optional(655, "macro_1_1");
Repeat macro_1_1_1 = new Repeat(656, "macro_1_1_1");
macro_1_1_1.add(657, s);
macro_1_1_1.add(659, new Str(658, ","));
macro_1_1_1.add(660, s);
macro_1_1_1.add(661, varname);
macro_1_1.add(662, macro_1_1_1);
macro_1.add(663, macro_1_1);
macro.add(664, macro_1);
macro.add(665, s);
macro.add(667, new Str(666, ")"));
macro.add(668, skip);
Optional macro_2 = new Optional(669, "macro_2");
macro_2.add(670, block);
macro.add(671, macro_2);
macro.add(672, end);
// returncmd = [spaces] "#return" s ("(" s data s ")") | comparition|data skip
Optional returncmd_1 = new Optional(673, "returncmd_1");
returncmd_1.add(674, spaces);
returncmd.add(675, returncmd_1);
returncmd.add(677, new Str(676, "#return"));
returncmd.add(678, s);
OrList returncmd_2 = new OrList(679, "returncmd_2");
ElementList returncmd_2_1 = new ElementList(680, "returncmd_2_1");
returncmd_2_1.add(682, new Str(681, "("));
returncmd_2_1.add(683, s);
returncmd_2_1.add(684, data);
returncmd_2_1.add(685, s);
returncmd_2_1.add(687, new Str(686, ")"));
returncmd_2.add(688, returncmd_2_1);
returncmd_2.add(689, comparition);
returncmd_2.add(690, data);
returncmd.add(691, returncmd_2);
returncmd.add(692, skip);
// function = :begin "#function" ws varname:name s "(" s [varname:parameter [s "," s varname:parameter]+] s ")" skip [block] end
function.add(694, new Marker(693, "begin"));
function.add(696, new Str(695, "#function"));
function.add(697, ws);
function.add(698, varname);
function.add(699, s);
function.add(701, new Str(700, "("));
function.add(702, s);
Optional function_1 = new Optional(703, "function_1");
function_1.add(704, varname);
Optional function_1_1 = new Optional(705, "function_1_1");
Repeat function_1_1_1 = new Repeat(706, "function_1_1_1");
function_1_1_1.add(707, s);
function_1_1_1.add(709, new Str(708, ","));
function_1_1_1.add(710, s);
function_1_1_1.add(711, varname);
function_1_1.add(712, function_1_1_1);
function_1.add(713, function_1_1);
function.add(714, function_1);
function.add(715, s);
function.add(717, new Str(716, ")"));
function.add(718, skip);
Optional function_2 = new Optional(719, "function_2");
function_2.add(720, block);
function.add(721, function_2);
function.add(722, end);
// namespace = "#namespace" ws varname:name skip
namespace.add(724, new Str(723, "#namespace"));
namespace.add(725, ws);
namespace.add(726, varname);
namespace.add(727, skip);
// error = :begin "#error" s "(" s stringExp:message s ")" skip
error.add(729, new Marker(728, "begin"));
error.add(731, new Str(730, "#error"));
error.add(732, s);
error.add(734, new Str(733, "("));
error.add(735, s);
error.add(736, stringExp);
error.add(737, s);
error.add(739, new Str(738, ")"));
error.add(740, skip);
// command = [spaces] local|set|write|ifcmd|whilecmd|foreach|importcmd|error|macro|function|call
Optional command_1 = new Optional(741, "command_1");
command_1.add(742, spaces);
command.add(743, command_1);
OrList command_2 = new OrList(744, "command_2");
command_2.add(745, local);
command_2.add(746, set);
command_2.add(747, write);
command_2.add(748, ifcmd);
command_2.add(749, whilecmd);
command_2.add(750, foreach);
command_2.add(751, importcmd);
command_2.add(752, error);
command_2.add(753, macro);
command_2.add(754, function);
command_2.add(755, call);
command.add(756, command_2);
// astext = "#>" [!"<#"+]:text "<#"
astext.add(758, new Str(757, "#>"));
Optional astext_1 = new Optional(759, "astext_1");
Repeat astext_1_1 = new Repeat(760, "astext_1_1");
astext_1_1.add(762, new Str(761, "<#", NOT));
astext_1.add(763, astext_1_1);
astext.add(764, astext_1);
astext.add(766, new Str(765, "<#"));
// text = !(([spaces] "##"|"#*"|"#>"|("#" (letter | "$"))) | stringref)+
OrList text_1 = new OrList(767, "text_1");
ElementList text_1_1 = new ElementList(768, "text_1_1");
Optional text_1_1_1 = new Optional(769, "text_1_1_1");
text_1_1_1.add(770, spaces);
text_1_1.add(771, text_1_1_1);
OrList text_1_1_2 = new OrList(772, "text_1_1_2");
text_1_1_2.add(774, new Str(773, "##"));
text_1_1_2.add(776, new Str(775, "#*"));
text_1_1_2.add(778, new Str(777, "#>"));
ElementList text_1_1_2_1 = new ElementList(779, "text_1_1_2_1");
text_1_1_2_1.add(781, new Str(780, "#"));
OrList text_1_1_2_1_1 = new OrList(782, "text_1_1_2_1_1");
text_1_1_2_1_1.add(783, letter);
text_1_1_2_1_1.add(785, new Str(784, "$"));
text_1_1_2_1.add(786, text_1_1_2_1_1);
text_1_1_2.add(787, text_1_1_2_1);
text_1_1.add(788, text_1_1_2);
text_1.add(789, text_1_1);
text_1.add(790, stringref);
text.add(791, text_1, NOT);
// block = [astext|returncmd|command|stringref|comment|text]+
Repeat block_1 = new Repeat(792, "block_1");
OrList block_1_1 = new OrList(793, "block_1_1");
block_1_1.add(794, astext);
block_1_1.add(795, returncmd);
block_1_1.add(796, command);
block_1_1.add(797, stringref);
block_1_1.add(798, comment);
block_1_1.add(799, text);
block_1.add(800, block_1_1);
block.add(801, block_1);
// template = [namespace|(:defaultNamespace)] block|END
Optional template_1 = new Optional(802, "template_1");
OrList template_1_1 = new OrList(803, "template_1_1");
template_1_1.add(804, namespace);
template_1_1.add(806, new Marker(805, "defaultNamespace"));
template_1.add(807, template_1_1);
template.add(808, template_1);
OrList template_2 = new OrList(809, "template_2");
template_2.add(810, block);
template_2.add(812, new End(811, "template_2"));
template.add(813, template_2);
return new TopElement(data1, template);
}