Package net.sf.laja.parser.engine2.inspector

Examples of net.sf.laja.parser.engine2.inspector.DefaultSyntaxErrorHandler


        Data.BehaviourBehaviourMethodAsMethod behaviourBehaviourMethodAsMethod = data2.new BehaviourBehaviourMethodAsMethod("behaviourBehaviourMethodAsMethod");
        Data.BehaviourBehaviourImports behaviourBehaviourImports = data2.new BehaviourBehaviourImports("behaviourBehaviourImports");
        Data.StateConstructorStateConstructorStatement stateConstructorStateConstructorStatement = data2.new StateConstructorStateConstructorStatement("stateConstructorStateConstructorStatement");

        // *** Declarations ***
        OrList newline = new OrList(1, "newline");
        OrList comment = new OrList(2, "comment");
        Repeat ws = new Repeat(3, "ws");
        Optional s = new Optional(4, "s");
        Str ff = new Str(5, "\"");
        ElementList str = new ElementList(6, "str");
        OrList letter = new OrList(7, "letter");
        Range digit = new Range(8, "digit", "0", "9");
        ElementList name = new ElementList(9, "name");
        ElementList uname = new ElementList(10, "uname");
        Optional _public = new Optional(11, "public");
        ElementList packagestatement = new ElementList(12, "packagestatement");
        ElementList packagename = new ElementList(13, "packagename");
        ElementList fullclassname = new ElementList(14, "fullclassname");
        ElementList importstatement = new ElementList(15, "importstatement", importstatementImportstatement);
        Optional imports = new Optional(16, "imports");
        ElementList parameter = new ElementList(17, "parameter");
        ElementList parameters = new ElementList(18, "parameters");
        ElementList statement = new ElementList(19, "statement");
        Optional skipCurlyBrace = new Optional(20, "skipCurlyBrace");
        ElementList stateStatement = new ElementList(21, "stateStatement");
        ElementList stateConstructor = new ElementList(22, "stateConstructor");
        ElementList asMethod = new ElementList(23, "asMethod");
        ElementList behaviourMethod = new ElementList(24, "behaviourMethod");
        ElementList behaviour = new ElementList(25, "behaviour");

        // *** Statements ***

        // newline = "\r\n" | "\n"
        newline.add(27, new Str(26, "\r\n"));
        newline.add(29, new Str(28, "\n"));

        // comment = ("/*" [(comment | !"*/")+] "*/") | ("//" [!newline+] newline|END)
        ElementList comment_1 = new ElementList(30, "comment_1");
        comment_1.add(32, new Str(31, "/*"));
        Optional comment_1_1 = new Optional(33, "comment_1_1");
        Repeat comment_1_1_1 = new Repeat(34, "comment_1_1_1");
        OrList comment_1_1_1_1 = new OrList(35, "comment_1_1_1_1");
        comment_1_1_1_1.add(36, comment);
        comment_1_1_1_1.add(38, new Str(37, "*/", NOT));
        comment_1_1_1.add(39, comment_1_1_1_1);
        comment_1_1.add(40, comment_1_1_1);
        comment_1.add(41, comment_1_1);
        comment_1.add(43, new Str(42, "*/"));
        comment.add(44, comment_1);
        ElementList comment_2 = new ElementList(45, "comment_2");
        comment_2.add(47, new Str(46, "//"));
        Optional comment_2_1 = new Optional(48, "comment_2_1");
        Repeat comment_2_1_1 = new Repeat(49, "comment_2_1_1");
        comment_2_1_1.add(50, newline, NOT);
        comment_2_1.add(51, comment_2_1_1);
        comment_2.add(52, comment_2_1);
        OrList comment_2_2 = new OrList(53, "comment_2_2");
        comment_2_2.add(54, newline);
        comment_2_2.add(56, new End(55, "comment_2_2"));
        comment_2.add(57, comment_2_2);
        comment.add(58, comment_2);

        // ws = (newline | " " | "\t" | comment)+
        OrList ws_1 = new OrList(59, "ws_1");
        ws_1.add(60, newline);
        ws_1.add(62, new Str(61, " "));
        ws_1.add(64, new Str(63, "\t"));
        ws_1.add(65, comment);
        ws.add(66, ws_1);

        // s = [ws]
        s.add(67, ws);

        // ff = "\""

        // str = ff (("\\\"" | !(ff|newline))+):strval ff
        str.add(68, ff);
        Repeat str_1 = new Repeat(69, "str_1");
        OrList str_1_1 = new OrList(70, "str_1_1");
        str_1_1.add(72, new Str(71, "\\\""));
        OrList str_1_1_1 = new OrList(73, "str_1_1_1", NOT);
        str_1_1_1.add(74, ff);
        str_1_1_1.add(75, newline);
        str_1_1.add(76, str_1_1_1);
        str_1.add(77, str_1_1);
        str.add(78, str_1);
        str.add(79, ff);

        // letter = "a".."z" | "A".."Z" | "_" | "$"
        letter.add(81, new Range(80, "letter", "a", "z"));
        letter.add(83, new Range(82, "letter", "A", "Z"));
        letter.add(85, new Str(84, "_"));
        letter.add(87, new Str(86, "$"));

        // digit = "0".."9"

        // name = letter [letter | digit]+
        name.add(88, letter);
        Optional name_1 = new Optional(89, "name_1");
        Repeat name_1_1 = new Repeat(90, "name_1_1");
        OrList name_1_1_1 = new OrList(91, "name_1_1_1");
        name_1_1_1.add(92, letter);
        name_1_1_1.add(93, digit);
        name_1_1.add(94, name_1_1_1);
        name_1.add(95, name_1_1);
        name.add(96, name_1);

        // uname = "A".."Z" [letter | digit]+
        uname.add(98, new Range(97, "uname", "A", "Z"));
        Optional uname_1 = new Optional(99, "uname_1");
        Repeat uname_1_1 = new Repeat(100, "uname_1_1");
        OrList uname_1_1_1 = new OrList(101, "uname_1_1_1");
        uname_1_1_1.add(102, letter);
        uname_1_1_1.add(103, digit);
        uname_1_1.add(104, uname_1_1_1);
        uname_1.add(105, uname_1_1);
        uname.add(106, uname_1);

        // public = ["public" ws]
        _public.add(108, new Str(107, "public"));
        _public.add(109, ws);

        // packagestatement = "package" ws packagename:statement s ";"
        packagestatement.add(111, new Str(110, "package"));
        packagestatement.add(112, ws);
        packagestatement.add(113, packagename, behaviourPackagestatementStatement);
        packagestatement.add(114, s);
        packagestatement.add(116, new Str(115, ";"));

        // packagename = name ["." name|"*"]+
        packagename.add(117, name);
        Optional packagename_1 = new Optional(118, "packagename_1");
        Repeat packagename_1_1 = new Repeat(119, "packagename_1_1");
        packagename_1_1.add(121, new Str(120, "."));
        OrList packagename_1_1_1 = new OrList(122, "packagename_1_1_1");
        packagename_1_1_1.add(123, name);
        packagename_1_1_1.add(125, new Str(124, "*"));
        packagename_1_1.add(126, packagename_1_1_1);
        packagename_1.add(127, packagename_1_1);
        packagename.add(128, packagename_1);

        // fullclassname = packagename
        fullclassname.add(129, packagename);

        // importstatement = "import" ws ["static":static ws] fullclassname s ";"
        importstatement.add(131, new Str(130, "import"));
        importstatement.add(132, ws);
        Optional importstatement_1 = new Optional(133, "importstatement_1");
        importstatement_1.add(135, new Str(134, "static", importstatementImportstatementStatic));
        importstatement_1.add(136, ws);
        importstatement.add(137, importstatement_1);
        importstatement.add(138, fullclassname, importstatementImportstatementFullclassname);
        importstatement.add(139, s);
        importstatement.add(141, new Str(140, ";"));

        // imports = [s importstatement]+
        Repeat imports_1 = new Repeat(142, "imports_1");
        imports_1.add(143, s);
        imports_1.add(144, importstatement, importsImportsImportstatement);
        imports.add(145, imports_1);

        // parameter = s name:type ws name:variable s
        parameter.add(146, s);
        parameter.add(147, name, parameterParameterType);
        parameter.add(148, ws);
        parameter.add(149, name, parameterParameterVariable);
        parameter.add(150, s);

        // parameters = [parameter] ["," s parameter]+
        Optional parameters_1 = new Optional(151, "parameters_1");
        parameters_1.add(152, parameter, parametersParametersParameter);
        parameters.add(153, parameters_1);
        Optional parameters_2 = new Optional(154, "parameters_2");
        Repeat parameters_2_1 = new Repeat(155, "parameters_2_1");
        parameters_2_1.add(157, new Str(156, ","));
        parameters_2_1.add(158, s);
        parameters_2_1.add(159, parameter, parametersParametersParameter);
        parameters_2.add(160, parameters_2_1);
        parameters.add(161, parameters_2);

        // statement = "{" s [(statement | str | !"}")+]:innerStatement "}"
        statement.add(163, new Str(162, "{"));
        statement.add(164, s);
        Optional statement_1 = new Optional(165, "statement_1", statementStatementInnerStatement);
        Repeat statement_1_1 = new Repeat(166, "statement_1_1");
        OrList statement_1_1_1 = new OrList(167, "statement_1_1_1");
        statement_1_1_1.add(168, statement, statementStatementStatement);
        statement_1_1_1.add(169, str);
        statement_1_1_1.add(171, new Str(170, "}", NOT));
        statement_1_1.add(172, statement_1_1_1);
        statement_1.add(173, statement_1_1);
        statement.add(174, statement_1);
        statement.add(176, new Str(175, "}"));

        // skipCurlyBrace = [!"{"+]
        Repeat skipCurlyBrace_1 = new Repeat(177, "skipCurlyBrace_1");
        skipCurlyBrace_1.add(179, new Str(178, "{", NOT));
        skipCurlyBrace.add(180, skipCurlyBrace_1);

        // stateStatement = public "class" ws name [ws "extends" ws uname:extendsClass] skipCurlyBrace "{" [!stateConstructor:x+] stateConstructor
        stateStatement.add(181, _public);
        stateStatement.add(183, new Str(182, "class"));
        stateStatement.add(184, ws);
        stateStatement.add(185, name);
        Optional stateStatement_1 = new Optional(186, "stateStatement_1");
        stateStatement_1.add(187, ws);
        stateStatement_1.add(189, new Str(188, "extends"));
        stateStatement_1.add(190, ws);
        stateStatement_1.add(191, uname, behaviourStateStatementExtendsClass);
        stateStatement.add(192, stateStatement_1);
        stateStatement.add(193, skipCurlyBrace);
        stateStatement.add(195, new Str(194, "{"));
        Optional stateStatement_2 = new Optional(196, "stateStatement_2");
        Repeat stateStatement_2_1 = new Repeat(197, "stateStatement_2_1");
        stateStatement_2_1.add(198, stateConstructor, NOT);
        stateStatement_2.add(199, stateStatement_2_1);
        stateStatement.add(200, stateStatement_2);
        stateStatement.add(201, stateConstructor);

        // stateConstructor = s public name s "(" s ["final" s] name:stateClass ws name parameters skipCurlyBrace statement
        stateConstructor.add(202, s);
        stateConstructor.add(203, _public);
        stateConstructor.add(204, name);
        stateConstructor.add(205, s);
        stateConstructor.add(207, new Str(206, "("));
        stateConstructor.add(208, s);
        Optional stateConstructor_1 = new Optional(209, "stateConstructor_1");
        stateConstructor_1.add(211, new Str(210, "final"));
        stateConstructor_1.add(212, s);
        stateConstructor.add(213, stateConstructor_1);
        stateConstructor.add(214, name, behaviourStateConstructorStateClass);
        stateConstructor.add(215, ws);
        stateConstructor.add(216, name);
        stateConstructor.add(217, parameters, behaviourStateConstructorParameters);
        stateConstructor.add(218, skipCurlyBrace);
        stateConstructor.add(219, statement, stateConstructorStateConstructorStatement);

        // asMethod =
        //   [!newline+ newline]:comment s
        //   ["public"|"private" ws] uname:returnclass ws ("as" uname):methodName s "(" s parameters s ")" s statement
        Optional asMethod_1 = new Optional(220, "asMethod_1", asMethodAsMethodComment);
        Repeat asMethod_1_1 = new Repeat(221, "asMethod_1_1");
        asMethod_1_1.add(222, newline, NOT);
        asMethod_1.add(223, asMethod_1_1);
        asMethod_1.add(224, newline);
        asMethod.add(225, asMethod_1);
        asMethod.add(226, s);
        Optional asMethod_2 = new Optional(227, "asMethod_2");
        OrList asMethod_2_1 = new OrList(228, "asMethod_2_1");
        asMethod_2_1.add(230, new Str(229, "public"));
        asMethod_2_1.add(232, new Str(231, "private"));
        asMethod_2.add(233, asMethod_2_1);
        asMethod_2.add(234, ws);
        asMethod.add(235, asMethod_2);
        asMethod.add(236, uname, asMethodAsMethodReturnclass);
        asMethod.add(237, ws);
        ElementList asMethod_3 = new ElementList(238, "asMethod_3", asMethodAsMethodMethodName);
        asMethod_3.add(240, new Str(239, "as"));
        asMethod_3.add(241, uname);
        asMethod.add(242, asMethod_3);
        asMethod.add(243, s);
        asMethod.add(245, new Str(244, "("));
        asMethod.add(246, s);
        asMethod.add(247, parameters, asMethodAsMethodParameters);
        asMethod.add(248, s);
        asMethod.add(250, new Str(249, ")"));
        asMethod.add(251, s);
        asMethod.add(252, statement, asMethodAsMethodStatement);

        // behaviourMethod = "//" s asMethod
        behaviourMethod.add(254, new Str(253, "//"));
        behaviourMethod.add(255, s);
        behaviourMethod.add(256, asMethod, behaviourBehaviourMethodAsMethod);

        // behaviour = [packagestatement] s [imports] s [stateStatement] [!behaviourMethod:x+|END [behaviourMethod]]+ *
        Optional behaviour_1 = new Optional(257, "behaviour_1");
        behaviour_1.add(258, packagestatement);
        behaviour.add(259, behaviour_1);
        behaviour.add(260, s);
        Optional behaviour_2 = new Optional(261, "behaviour_2");
        behaviour_2.add(262, imports, behaviourBehaviourImports);
        behaviour.add(263, behaviour_2);
        behaviour.add(264, s);
        Optional behaviour_3 = new Optional(265, "behaviour_3");
        behaviour_3.add(266, stateStatement);
        behaviour.add(267, behaviour_3);
        Optional behaviour_4 = new Optional(268, "behaviour_4");
        Repeat behaviour_4_1 = new Repeat(269, "behaviour_4_1");
        OrList behaviour_4_1_1 = new OrList(270, "behaviour_4_1_1");
        Repeat behaviour_4_1_1_1 = new Repeat(271, "behaviour_4_1_1_1");
        behaviour_4_1_1_1.add(272, behaviourMethod, NOT);
        behaviour_4_1_1.add(273, behaviour_4_1_1_1);
        behaviour_4_1_1.add(275, new End(274, "behaviour_4_1_1"));
        behaviour_4_1.add(276, behaviour_4_1_1);
        Optional behaviour_4_1_2 = new Optional(277, "behaviour_4_1_2");
        behaviour_4_1_2.add(278, behaviourMethod);
        behaviour_4_1.add(279, behaviour_4_1_2);
        behaviour_4.add(280, behaviour_4_1);
View Full Code Here


    private net.sf.laja.parser.engine2.element.Element getGrammar1() {
        // *** Output classes ***

        // *** Declarations ***
        OrList newline = new OrList(1, "newline");
        OrList comment = new OrList(2, "comment");
        Repeat ws = new Repeat(3, "ws");
        Optional s = new Optional(4, "s");
        Str ff = new Str(5, "\"");
        ElementList str = new ElementList(6, "str");
        OrList letter = new OrList(7, "letter");
        Range digit = new Range(8, "digit", "0", "9");
        ElementList name = new ElementList(9, "name");
        ElementList uname = new ElementList(10, "uname");
        Optional _public = new Optional(11, "public");
        ElementList packagestatement = new ElementList(12, "packagestatement");
        ElementList packagename = new ElementList(13, "packagename");
        ElementList fullclassname = new ElementList(14, "fullclassname");
        ElementList importstatement = new ElementList(15, "importstatement");
        Optional imports = new Optional(16, "imports");
        ElementList parameter = new ElementList(17, "parameter");
        ElementList parameters = new ElementList(18, "parameters");
        ElementList statement = new ElementList(19, "statement");
        Optional skipCurlyBrace = new Optional(20, "skipCurlyBrace");
        ElementList stateStatement = new ElementList(21, "stateStatement");
        ElementList stateConstructor = new ElementList(22, "stateConstructor");
        ElementList asMethod = new ElementList(23, "asMethod");
        ElementList behaviourMethod = new ElementList(24, "behaviourMethod");
        ElementList behaviour = new ElementList(25, "behaviour");

        // *** Statements ***

        // newline = "\r\n" | "\n"
        newline.add(27, new Str(26, "\r\n"));
        newline.add(29, new Str(28, "\n"));

        // comment = ("/*" [(comment | !"*/")+] "*/") | ("//" [!newline+] newline|END)
        ElementList comment_1 = new ElementList(30, "comment_1");
        comment_1.add(32, new Str(31, "/*"));
        Optional comment_1_1 = new Optional(33, "comment_1_1");
        Repeat comment_1_1_1 = new Repeat(34, "comment_1_1_1");
        OrList comment_1_1_1_1 = new OrList(35, "comment_1_1_1_1");
        comment_1_1_1_1.add(36, comment);
        comment_1_1_1_1.add(38, new Str(37, "*/", NOT));
        comment_1_1_1.add(39, comment_1_1_1_1);
        comment_1_1.add(40, comment_1_1_1);
        comment_1.add(41, comment_1_1);
        comment_1.add(43, new Str(42, "*/"));
        comment.add(44, comment_1);
        ElementList comment_2 = new ElementList(45, "comment_2");
        comment_2.add(47, new Str(46, "//"));
        Optional comment_2_1 = new Optional(48, "comment_2_1");
        Repeat comment_2_1_1 = new Repeat(49, "comment_2_1_1");
        comment_2_1_1.add(50, newline, NOT);
        comment_2_1.add(51, comment_2_1_1);
        comment_2.add(52, comment_2_1);
        OrList comment_2_2 = new OrList(53, "comment_2_2");
        comment_2_2.add(54, newline);
        comment_2_2.add(56, new End(55, "comment_2_2"));
        comment_2.add(57, comment_2_2);
        comment.add(58, comment_2);

        // ws = (newline | " " | "\t" | comment)+
        OrList ws_1 = new OrList(59, "ws_1");
        ws_1.add(60, newline);
        ws_1.add(62, new Str(61, " "));
        ws_1.add(64, new Str(63, "\t"));
        ws_1.add(65, comment);
        ws.add(66, ws_1);

        // s = [ws]
        s.add(67, ws);

        // ff = "\""

        // str = ff (("\\\"" | !(ff|newline))+):strval ff
        str.add(68, ff);
        Repeat str_1 = new Repeat(69, "str_1");
        OrList str_1_1 = new OrList(70, "str_1_1");
        str_1_1.add(72, new Str(71, "\\\""));
        OrList str_1_1_1 = new OrList(73, "str_1_1_1", NOT);
        str_1_1_1.add(74, ff);
        str_1_1_1.add(75, newline);
        str_1_1.add(76, str_1_1_1);
        str_1.add(77, str_1_1);
        str.add(78, str_1);
        str.add(79, ff);

        // letter = "a".."z" | "A".."Z" | "_" | "$"
        letter.add(81, new Range(80, "letter", "a", "z"));
        letter.add(83, new Range(82, "letter", "A", "Z"));
        letter.add(85, new Str(84, "_"));
        letter.add(87, new Str(86, "$"));

        // digit = "0".."9"

        // name = letter [letter | digit]+
        name.add(88, letter);
        Optional name_1 = new Optional(89, "name_1");
        Repeat name_1_1 = new Repeat(90, "name_1_1");
        OrList name_1_1_1 = new OrList(91, "name_1_1_1");
        name_1_1_1.add(92, letter);
        name_1_1_1.add(93, digit);
        name_1_1.add(94, name_1_1_1);
        name_1.add(95, name_1_1);
        name.add(96, name_1);

        // uname = "A".."Z" [letter | digit]+
        uname.add(98, new Range(97, "uname", "A", "Z"));
        Optional uname_1 = new Optional(99, "uname_1");
        Repeat uname_1_1 = new Repeat(100, "uname_1_1");
        OrList uname_1_1_1 = new OrList(101, "uname_1_1_1");
        uname_1_1_1.add(102, letter);
        uname_1_1_1.add(103, digit);
        uname_1_1.add(104, uname_1_1_1);
        uname_1.add(105, uname_1_1);
        uname.add(106, uname_1);

        // public = ["public" ws]
        _public.add(108, new Str(107, "public"));
        _public.add(109, ws);

        // packagestatement = "package" ws packagename:statement s ";"
        packagestatement.add(111, new Str(110, "package"));
        packagestatement.add(112, ws);
        packagestatement.add(113, packagename);
        packagestatement.add(114, s);
        packagestatement.add(116, new Str(115, ";"));

        // packagename = name ["." name|"*"]+
        packagename.add(117, name);
        Optional packagename_1 = new Optional(118, "packagename_1");
        Repeat packagename_1_1 = new Repeat(119, "packagename_1_1");
        packagename_1_1.add(121, new Str(120, "."));
        OrList packagename_1_1_1 = new OrList(122, "packagename_1_1_1");
        packagename_1_1_1.add(123, name);
        packagename_1_1_1.add(125, new Str(124, "*"));
        packagename_1_1.add(126, packagename_1_1_1);
        packagename_1.add(127, packagename_1_1);
        packagename.add(128, packagename_1);

        // fullclassname = packagename
        fullclassname.add(129, packagename);

        // importstatement = "import" ws ["static":static ws] fullclassname s ";"
        importstatement.add(131, new Str(130, "import"));
        importstatement.add(132, ws);
        Optional importstatement_1 = new Optional(133, "importstatement_1");
        importstatement_1.add(135, new Str(134, "static"));
        importstatement_1.add(136, ws);
        importstatement.add(137, importstatement_1);
        importstatement.add(138, fullclassname);
        importstatement.add(139, s);
        importstatement.add(141, new Str(140, ";"));

        // imports = [s importstatement]+
        Repeat imports_1 = new Repeat(142, "imports_1");
        imports_1.add(143, s);
        imports_1.add(144, importstatement);
        imports.add(145, imports_1);

        // parameter = s name:type ws name:variable s
        parameter.add(146, s);
        parameter.add(147, name);
        parameter.add(148, ws);
        parameter.add(149, name);
        parameter.add(150, s);

        // parameters = [parameter] ["," s parameter]+
        Optional parameters_1 = new Optional(151, "parameters_1");
        parameters_1.add(152, parameter);
        parameters.add(153, parameters_1);
        Optional parameters_2 = new Optional(154, "parameters_2");
        Repeat parameters_2_1 = new Repeat(155, "parameters_2_1");
        parameters_2_1.add(157, new Str(156, ","));
        parameters_2_1.add(158, s);
        parameters_2_1.add(159, parameter);
        parameters_2.add(160, parameters_2_1);
        parameters.add(161, parameters_2);

        // statement = "{" s [(statement | str | !"}")+]:innerStatement "}"
        statement.add(163, new Str(162, "{"));
        statement.add(164, s);
        Optional statement_1 = new Optional(165, "statement_1");
        Repeat statement_1_1 = new Repeat(166, "statement_1_1");
        OrList statement_1_1_1 = new OrList(167, "statement_1_1_1");
        statement_1_1_1.add(168, statement);
        statement_1_1_1.add(169, str);
        statement_1_1_1.add(171, new Str(170, "}", NOT));
        statement_1_1.add(172, statement_1_1_1);
        statement_1.add(173, statement_1_1);
        statement.add(174, statement_1);
        statement.add(176, new Str(175, "}"));

        // skipCurlyBrace = [!"{"+]
        Repeat skipCurlyBrace_1 = new Repeat(177, "skipCurlyBrace_1");
        skipCurlyBrace_1.add(179, new Str(178, "{", NOT));
        skipCurlyBrace.add(180, skipCurlyBrace_1);

        // stateStatement = public "class" ws name [ws "extends" ws uname:extendsClass] skipCurlyBrace "{" [!stateConstructor:x+] stateConstructor
        stateStatement.add(181, _public);
        stateStatement.add(183, new Str(182, "class"));
        stateStatement.add(184, ws);
        stateStatement.add(185, name);
        Optional stateStatement_1 = new Optional(186, "stateStatement_1");
        stateStatement_1.add(187, ws);
        stateStatement_1.add(189, new Str(188, "extends"));
        stateStatement_1.add(190, ws);
        stateStatement_1.add(191, uname);
        stateStatement.add(192, stateStatement_1);
        stateStatement.add(193, skipCurlyBrace);
        stateStatement.add(195, new Str(194, "{"));
        Optional stateStatement_2 = new Optional(196, "stateStatement_2");
        Repeat stateStatement_2_1 = new Repeat(197, "stateStatement_2_1");
        stateStatement_2_1.add(198, stateConstructor, NOT);
        stateStatement_2.add(199, stateStatement_2_1);
        stateStatement.add(200, stateStatement_2);
        stateStatement.add(201, stateConstructor);

        // stateConstructor = s public name s "(" s ["final" s] name:stateClass ws name parameters skipCurlyBrace statement
        stateConstructor.add(202, s);
        stateConstructor.add(203, _public);
        stateConstructor.add(204, name);
        stateConstructor.add(205, s);
        stateConstructor.add(207, new Str(206, "("));
        stateConstructor.add(208, s);
        Optional stateConstructor_1 = new Optional(209, "stateConstructor_1");
        stateConstructor_1.add(211, new Str(210, "final"));
        stateConstructor_1.add(212, s);
        stateConstructor.add(213, stateConstructor_1);
        stateConstructor.add(214, name);
        stateConstructor.add(215, ws);
        stateConstructor.add(216, name);
        stateConstructor.add(217, parameters);
        stateConstructor.add(218, skipCurlyBrace);
        stateConstructor.add(219, statement);

        // asMethod =
        //   [!newline+ newline]:comment s
        //   ["public"|"private" ws] uname:returnclass ws ("as" uname):methodName s "(" s parameters s ")" s statement
        Optional asMethod_1 = new Optional(220, "asMethod_1");
        Repeat asMethod_1_1 = new Repeat(221, "asMethod_1_1");
        asMethod_1_1.add(222, newline, NOT);
        asMethod_1.add(223, asMethod_1_1);
        asMethod_1.add(224, newline);
        asMethod.add(225, asMethod_1);
        asMethod.add(226, s);
        Optional asMethod_2 = new Optional(227, "asMethod_2");
        OrList asMethod_2_1 = new OrList(228, "asMethod_2_1");
        asMethod_2_1.add(230, new Str(229, "public"));
        asMethod_2_1.add(232, new Str(231, "private"));
        asMethod_2.add(233, asMethod_2_1);
        asMethod_2.add(234, ws);
        asMethod.add(235, asMethod_2);
        asMethod.add(236, uname);
        asMethod.add(237, ws);
        ElementList asMethod_3 = new ElementList(238, "asMethod_3");
        asMethod_3.add(240, new Str(239, "as"));
        asMethod_3.add(241, uname);
        asMethod.add(242, asMethod_3);
        asMethod.add(243, s);
        asMethod.add(245, new Str(244, "("));
        asMethod.add(246, s);
        asMethod.add(247, parameters);
        asMethod.add(248, s);
        asMethod.add(250, new Str(249, ")"));
        asMethod.add(251, s);
        asMethod.add(252, statement);

        // behaviourMethod = "//" s asMethod
        behaviourMethod.add(254, new Str(253, "//"));
        behaviourMethod.add(255, s);
        behaviourMethod.add(256, asMethod);

        // behaviour = [packagestatement] s [imports] s [stateStatement] [!behaviourMethod:x+|END [behaviourMethod]]+ *
        Optional behaviour_1 = new Optional(257, "behaviour_1");
        behaviour_1.add(258, packagestatement);
        behaviour.add(259, behaviour_1);
        behaviour.add(260, s);
        Optional behaviour_2 = new Optional(261, "behaviour_2");
        behaviour_2.add(262, imports);
        behaviour.add(263, behaviour_2);
        behaviour.add(264, s);
        Optional behaviour_3 = new Optional(265, "behaviour_3");
        behaviour_3.add(266, stateStatement);
        behaviour.add(267, behaviour_3);
        Optional behaviour_4 = new Optional(268, "behaviour_4");
        Repeat behaviour_4_1 = new Repeat(269, "behaviour_4_1");
        OrList behaviour_4_1_1 = new OrList(270, "behaviour_4_1_1");
        Repeat behaviour_4_1_1_1 = new Repeat(271, "behaviour_4_1_1_1");
        behaviour_4_1_1_1.add(272, behaviourMethod, NOT);
        behaviour_4_1_1.add(273, behaviour_4_1_1_1);
        behaviour_4_1_1.add(275, new End(274, "behaviour_4_1_1"));
        behaviour_4_1.add(276, behaviour_4_1_1);
        Optional behaviour_4_1_2 = new Optional(277, "behaviour_4_1_2");
        behaviour_4_1_2.add(278, behaviourMethod);
        behaviour_4_1.add(279, behaviour_4_1_2);
        behaviour_4.add(280, behaviour_4_1);
View Full Code Here

        Data.TemplateTemplateBlock templateTemplateBlock = data2.new TemplateTemplateBlock("templateTemplateBlock");
        Data.ConditionElementConditionElementBooleanData conditionElementConditionElementBooleanData = data2.new ConditionElementConditionElementBooleanData("conditionElementConditionElementBooleanData");
        Data.TextTextStringref textTextStringref = data2.new TextTextStringref("textTextStringref");

        // *** 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", booleanDataBooleanData);
        Repeat unsignedInt = new Repeat(9, "unsignedInt");
        ElementList integerData = new ElementList(10, "integerData", integerDataIntegerData);
        ElementList floatData = new ElementList(11, "floatData", floatDataFloatData);
        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", dataData);
        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", textText);
        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, stringExpStringExpStringref);
        Repeat stringExp_1_1_1_1 = new Repeat(171, "stringExp_1_1_1_1", stringExpStringExpText);
        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, stringExpStringExpStringref);
        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, newStatementNewStatementClassOrPackageName);
        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, newStatementNewStatementClassOrPackageName);
        newStatement_1.add(209, newStatement_1_1);
        newStatement.add(210, newStatement_1);
        newStatement.add(211, s);
        newStatement.add(212, args, newStatementNewStatementArgs);

        // data = newStatement | stringExp | listData | mapDataRef | nullData | booleanData | reference | floatData | integerData
        data.add(213, newStatement, dataDataNewStatement);
        data.add(214, stringExp, dataDataStringExp);
        data.add(215, listData, dataDataListData);
        data.add(216, mapDataRef, dataDataMapDataRef);
        data.add(217, nullData, dataDataNullData);
        data.add(218, booleanData, dataDataBooleanData);
        data.add(219, reference, dataDataReference);
        data.add(220, floatData, dataDataFloatData);
        data.add(221, integerData, dataDataIntegerData);

        // 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, listDataListDataData);
        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, listDataListDataData);
        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", listDataListDataArray));
        listData.add(244, listData_2);

        // mapMember = varname:name s ":" s data
        mapMember.add(245, varname, mapMemberMapMemberName);
        mapMember.add(246, s);
        mapMember.add(248, new Str(247, ":"));
        mapMember.add(249, s);
        mapMember.add(250, data, mapMemberMapMemberData);

        // mapDataRef = "{" [mapData] "}"
        mapDataRef.add(252, new Str(251, "{"));
        Optional mapDataRef_1 = new Optional(253, "mapDataRef_1");
        mapDataRef_1.add(254, mapData, mapDataRefMapDataRefMapData);
        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, mapDataMapDataMapMember);
        mapData.add(261, mapData_1);
        mapData.add(262, s);

        // indexItem = unsignedInt | reference
        indexItem.add(263, unsignedInt, indexItemIndexItemUnsignedInt);
        indexItem.add(264, reference, indexItemIndexItemReference);

        // listIndex = ("[" indexItem "]")+
        listIndex.add(266, new Str(265, "["));
        listIndex.add(267, indexItem, listIndexListIndexIndexItem);
        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, argsArgsMapData);
        Optional args_1_1 = new Optional(275, "args_1_1");
        args_1_1.add(276, data, argsArgsData);
        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, argsArgsData);
        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", namespaceRefNamespaceRefNamespace);
        namespaceRef_1.add(294, varname);
        namespaceRef.add(295, namespaceRef_1);

        // variableRef = varname:variableName
        variableRef.add(296, varname, variableRefVariableRefVariableName);

        // methodRef = varname:methodName s args
        methodRef.add(297, varname, methodRefMethodRefMethodName);
        methodRef.add(298, s);
        methodRef.add(299, args, methodRefMethodRefArgs);

        // attributeRef = methodRef|variableRef [listIndex]
        OrList attributeRef_1 = new OrList(300, "attributeRef_1");
        attributeRef_1.add(301, methodRef, attributeRefAttributeRefMethodRef);
        attributeRef_1.add(302, variableRef, attributeRefAttributeRefVariableRef);
        attributeRef.add(303, attributeRef_1);
        Optional attributeRef_2 = new Optional(304, "attributeRef_2");
        attributeRef_2.add(305, listIndex, attributeRefAttributeRefListIndex);
        attributeRef.add(306, attributeRef_2);

        // attributeVariableRef = variableRef [listIndex]
        attributeVariableRef.add(307, variableRef, attributeVariableRefAttributeVariableRefVariableRef);
        Optional attributeVariableRef_1 = new Optional(308, "attributeVariableRef_1");
        attributeVariableRef_1.add(309, listIndex, attributeVariableRefAttributeVariableRefListIndex);
        attributeVariableRef.add(310, attributeVariableRef_1);

        // attributeMethodRef = methodRef [listIndex]
        attributeMethodRef.add(311, methodRef, attributeMethodRefAttributeMethodRefMethodRef);
        Optional attributeMethodRef_1 = new Optional(312, "attributeMethodRef_1");
        attributeMethodRef_1.add(313, listIndex, attributeMethodRefAttributeMethodRefListIndex);
        attributeMethodRef.add(314, attributeMethodRef_1);

        // reference =
        //   :begin (([namespaceRef "."] attributeRef)|namespaceRef ["." attributeRef:nextAttributeRef]+) |
        //   (floatData|integerData|stringExp ("." attributeRef:nextAttributeRef)+)
        reference.add(316, new Marker(315, "begin", referenceReferenceBegin));
        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, referenceReferenceNamespaceRef);
        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, referenceReferenceAttributeRef);
        reference_1_1_1.add(327, reference_1_1_1_1);
        reference_1_1_1.add(328, namespaceRef, referenceReferenceNamespaceRef);
        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, referenceReferenceNextAttributeRef);
        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, referenceReferenceFloatData);
        reference_1_2_1.add(341, integerData, referenceReferenceIntegerData);
        reference_1_2_1.add(342, stringExp, referenceReferenceStringExp);
        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, referenceReferenceNextAttributeRef);
        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", callReferenceCallReferenceBegin));
        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, callReferenceCallReferenceNamespaceRef);
        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, callReferenceCallReferenceAttributeMethodRef);
        ElementList callReference_1_1_2_1 = new ElementList(362, "callReference_1_1_2_1");
        callReference_1_1_2_1.add(363, attributeVariableRef, callReferenceCallReferenceAttributeVariableRef);
        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, callReferenceCallReferenceNextAttributeRef);
        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, callReferenceCallReferenceNextAttributeRef);
        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", stringrefStringrefBegin));
        stringref.add(383, new Str(382, "{"));
        OrList stringref_1 = new OrList(384, "stringref_1");
        stringref_1.add(386, new Str(385, "..", stringrefStringrefParentDir));
        stringref_1.add(388, new Str(387, ".", stringrefStringrefCurrentDir));
        stringref_1.add(389, reference, stringrefStringrefReference);
        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", writeWriteBegin));
        write.add(402, new Str(401, "#write"));
        write.add(403, ws);
        write.add(404, stringExp, writeWriteFilename);
        write.add(405, skip);
        write.add(406, block, writeWriteBlock);
        write.add(407, end);

        // set = :begin "#set" s "(" s reference:target s "=" s comparition|data s ")" skip
        set.add(409, new Marker(408, "begin", setSetBegin));
        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, setSetTarget);
        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, setSetComparition);
        set_1.add(423, data, setSetData);
        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, localLocalTarget);
        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, localLocalComparition);
        local_1.add(442, data, localLocalData);
        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, "==", operatorOperatorEquals));
        operator.add(451, new Str(450, "!=", operatorOperatorNotEquals));
        operator.add(453, new Str(452, "<=", operatorOperatorLessOrEqual));
        operator.add(455, new Str(454, "<", operatorOperatorLessThan));
        operator.add(457, new Str(456, ">=", operatorOperatorGreaterOrEqual));
        operator.add(459, new Str(458, ">", operatorOperatorGreaterThan));

        // comparition = data:leftOperand s operator s data:rightOperand
        comparition.add(460, data, comparitionComparitionLeftOperand);
        comparition.add(461, s);
        comparition.add(462, operator, comparitionComparitionOperator);
        comparition.add(463, s);
        comparition.add(464, data, comparitionComparitionRightOperand);

        // conditionElement = ["!":not] s (comparition | (reference & (!booleanData *)) | booleanData:booleanCondition)
        Optional conditionElement_1 = new Optional(465, "conditionElement_1");
        conditionElement_1.add(467, new Str(466, "!", conditionElementConditionElementNot));
        conditionElement.add(468, conditionElement_1);
        conditionElement.add(469, s);
        OrList conditionElement_2 = new OrList(470, "conditionElement_2");
        conditionElement_2.add(471, comparition, conditionElementConditionElementComparition);
        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, conditionElementConditionElementReference);
        ElementList conditionElement_2_1_1_1 = new ElementList(475, "conditionElement_2_1_1_1");
        conditionElement_2_1_1_1.add(476, booleanData, NOT, conditionElementConditionElementBooleanData);
        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, conditionElementConditionElementBooleanCondition);
        conditionElement.add(483, conditionElement_2);

        // conditionBase = conditionElement | (s "(" s condition s ")")
        conditionBase.add(484, conditionElement, conditionBaseConditionBaseConditionElement);
        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, conditionBaseConditionBaseCondition);
        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, conditionAndConditionAndConditionBase);
        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, conditionAndConditionAndConditionBase);
        conditionAnd_1.add(503, conditionAnd_1_1);
        conditionAnd.add(504, conditionAnd_1);

        // condition = conditionAnd [s "||" s conditionAnd]+
        condition.add(505, conditionAnd, conditionConditionConditionAnd);
        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, conditionConditionConditionAnd);
        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, ifcmdIfcmdCondition);
        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, ifcmdIfcmdBlock);
        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, ifcmdIfcmdElseif);
        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, ifcmdIfcmdElse);
        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, elseifElseifCondition);
        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, elseifElseifBlock);
        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, elseElseBlock);
        _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, whilecmdWhilecmdCondition);
        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, whilecmdWhilecmdBlock);
        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", callCallBegin));
        call.add(582, new Str(581, "#"));
        call.add(583, callReference, callCallCallReference);
        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", callCallTargetNamespace);
        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, callCallTargetVariable);
        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", foreachForeachBegin));
        foreach.add(604, new Str(603, "#foreach"));
        foreach.add(605, s);
        foreach.add(607, new Str(606, "("));
        foreach.add(608, varname, foreachForeachVariable);
        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, foreachForeachListData);
        foreach_1.add(615, mapDataRef, foreachForeachMapDataRef);
        foreach_1.add(616, reference, foreachForeachReference);
        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, foreachForeachCondition);
        foreach_2.add(624, s);
        foreach.add(625, foreach_2);
        foreach.add(627, new Str(626, ")"));
        foreach.add(628, skip);
        foreach.add(629, block, foreachForeachBlock);
        foreach.add(630, end);

        // importcmd = :begin "#import" ws stringExp:filename [ws "as text":asText] skip
        importcmd.add(632, new Marker(631, "begin", importcmdImportcmdBegin));
        importcmd.add(634, new Str(633, "#import"));
        importcmd.add(635, ws);
        importcmd.add(636, stringExp, importcmdImportcmdFilename);
        Optional importcmd_1 = new Optional(637, "importcmd_1");
        importcmd_1.add(638, ws);
        importcmd_1.add(640, new Str(639, "as text", importcmdImportcmdAsText));
        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", macroMacroBegin));
        macro.add(646, new Str(645, "#macro"));
        macro.add(647, ws);
        macro.add(648, varname, macroMacroName);
        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, macroMacroParameter);
        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, macroMacroParameter);
        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, macroMacroBlock);
        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, returncmdReturncmdData);
        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, returncmdReturncmdComparition);
        returncmd_2.add(690, data, returncmdReturncmdData);
        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, functionFunctionName);
        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, functionFunctionParameter);
        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, functionFunctionParameter);
        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, functionFunctionBlock);
        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, namespaceNamespaceName);
        namespace.add(727, skip);

        // error = :begin "#error" s "(" s stringExp:message s ")" skip
        error.add(729, new Marker(728, "begin", errorErrorBegin));
        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, errorErrorMessage);
        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, commandCommandLocal);
        command_2.add(746, set, commandCommandSet);
        command_2.add(747, write, commandCommandWrite);
        command_2.add(748, ifcmd, commandCommandIfcmd);
        command_2.add(749, whilecmd, commandCommandWhilecmd);
        command_2.add(750, foreach, commandCommandForeach);
        command_2.add(751, importcmd, commandCommandImportcmd);
        command_2.add(752, error, commandCommandError);
        command_2.add(753, macro, commandCommandMacro);
        command_2.add(754, function, commandCommandFunction);
        command_2.add(755, call, commandCommandCall);
        command.add(756, command_2);

        // astext = "#>" [!"<#"+]:text "<#"
        astext.add(758, new Str(757, "#>"));
        Optional astext_1 = new Optional(759, "astext_1", blockAstextText);
        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, textTextStringref);
        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, blockBlockReturncmd);
        block_1_1.add(796, command, blockBlockCommand);
        block_1_1.add(797, stringref, blockBlockStringref);
        block_1_1.add(798, comment);
        block_1_1.add(799, text, blockBlockText);
        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, templateTemplateNamespace);
        template_1_1.add(806, new Marker(805, "defaultNamespace", templateTemplateDefaultNamespace));
        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, templateTemplateBlock);
        template_2.add(812, new End(811, "template_2"));
        template.add(813, template_2);

        return new TopElement(data2, template);
    }
View Full Code Here

        Repeat constructor_1_1 = new Repeat(10, "constructor_1_1");
        constructor_1_1.add(11, constructorComment, NOT);
        constructor_1.add(12, constructor_1_1);
        constructor_1.add(13, constructorComment);
        constructor.add(14, constructor_1);
        OrList constructor_2 = new OrList(15, "constructor_2");
        ElementList constructor_2_1 = new ElementList(16, "constructor_2_1");
        constructor_2_1.add(17, constructorCodeBlock);
        constructor_2_1.add(19, new Complete(18, "constructor_2_1", constructorConstructorLastPart));
        constructor_2.add(20, constructor_2_1);
        ElementList constructor_2_2 = new ElementList(21, "constructor_2_2", constructorConstructorLastPart);
        constructor_2_2.add(23, new Marker(22, "endCodeBlock"));
        constructor_2_2.add(25, new Complete(24, "constructor_2_2"));
        constructor_2.add(26, constructor_2_2);
        constructor.add(27, constructor_2);

        return new TopElement(data2, constructor);
    }
View Full Code Here

        Repeat constructor_1_1 = new Repeat(10, "constructor_1_1");
        constructor_1_1.add(11, constructorComment, NOT);
        constructor_1.add(12, constructor_1_1);
        constructor_1.add(13, constructorComment);
        constructor.add(14, constructor_1);
        OrList constructor_2 = new OrList(15, "constructor_2");
        ElementList constructor_2_1 = new ElementList(16, "constructor_2_1");
        constructor_2_1.add(17, constructorCodeBlock);
        constructor_2_1.add(19, new Complete(18, "constructor_2_1"));
        constructor_2.add(20, constructor_2_1);
        ElementList constructor_2_2 = new ElementList(21, "constructor_2_2");
        constructor_2_2.add(23, new Marker(22, "endCodeBlock"));
        constructor_2_2.add(25, new Complete(24, "constructor_2_2"));
        constructor_2.add(26, constructor_2_2);
        constructor.add(27, constructor_2);

        return new TopElement(data1, constructor);
    }
View Full Code Here

        Repeat ws = new Repeat(3, "ws");
        Optional s = new Optional(4, "s");
        Str ff = new Str(5, "\"");
        ElementList str = new ElementList(6, "str");
        OrList letter = new OrList(7, "letter");
        Range digit = new Range(8, "digit", "0", "9");
        ElementList name = new ElementList(9, "name");
        ElementList uname = new ElementList(10, "uname");
        Optional _public = new Optional(11, "public");
        ElementList packagestatement = new ElementList(12, "packagestatement");
        ElementList packagename = new ElementList(13, "packagename");
        ElementList fullclassname = new ElementList(14, "fullclassname");
        ElementList importstatement = new ElementList(15, "importstatement", importstatementImportstatement);
        Optional imports = new Optional(16, "imports");
        ElementList parameter = new ElementList(17, "parameter");
        ElementList parameters = new ElementList(18, "parameters");
        ElementList statement = new ElementList(19, "statement");
        Optional skipCurlyBrace = new Optional(20, "skipCurlyBrace");
        ElementList stateStatement = new ElementList(21, "stateStatement");
        ElementList stateConstructor = new ElementList(22, "stateConstructor");
        ElementList asMethod = new ElementList(23, "asMethod");
        ElementList behaviourMethod = new ElementList(24, "behaviourMethod");
        ElementList behaviour = new ElementList(25, "behaviour");

        // *** Statements ***

        // newline = "\r\n" | "\n"
        newline.add(27, new Str(26, "\r\n"));
        newline.add(29, new Str(28, "\n"));

        // comment = ("/*" [(comment | !"*/")+] "*/") | ("//" [!newline+] newline|END)
        ElementList comment_1 = new ElementList(30, "comment_1");
        comment_1.add(32, new Str(31, "/*"));
        Optional comment_1_1 = new Optional(33, "comment_1_1");
        Repeat comment_1_1_1 = new Repeat(34, "comment_1_1_1");
        OrList comment_1_1_1_1 = new OrList(35, "comment_1_1_1_1");
        comment_1_1_1_1.add(36, comment);
        comment_1_1_1_1.add(38, new Str(37, "*/", NOT));
        comment_1_1_1.add(39, comment_1_1_1_1);
        comment_1_1.add(40, comment_1_1_1);
        comment_1.add(41, comment_1_1);
        comment_1.add(43, new Str(42, "*/"));
        comment.add(44, comment_1);
        ElementList comment_2 = new ElementList(45, "comment_2");
        comment_2.add(47, new Str(46, "//"));
        Optional comment_2_1 = new Optional(48, "comment_2_1");
        Repeat comment_2_1_1 = new Repeat(49, "comment_2_1_1");
        comment_2_1_1.add(50, newline, NOT);
        comment_2_1.add(51, comment_2_1_1);
        comment_2.add(52, comment_2_1);
        OrList comment_2_2 = new OrList(53, "comment_2_2");
        comment_2_2.add(54, newline);
        comment_2_2.add(56, new End(55, "comment_2_2"));
        comment_2.add(57, comment_2_2);
        comment.add(58, comment_2);

        // ws = (newline | " " | "\t" | comment)+
        OrList ws_1 = new OrList(59, "ws_1");
        ws_1.add(60, newline);
        ws_1.add(62, new Str(61, " "));
        ws_1.add(64, new Str(63, "\t"));
        ws_1.add(65, comment);
        ws.add(66, ws_1);

        // s = [ws]
        s.add(67, ws);

        // ff = "\""

        // str = ff (("\\\"" | !(ff|newline))+):strval ff
        str.add(68, ff);
        Repeat str_1 = new Repeat(69, "str_1");
        OrList str_1_1 = new OrList(70, "str_1_1");
        str_1_1.add(72, new Str(71, "\\\""));
        OrList str_1_1_1 = new OrList(73, "str_1_1_1", NOT);
        str_1_1_1.add(74, ff);
        str_1_1_1.add(75, newline);
        str_1_1.add(76, str_1_1_1);
        str_1.add(77, str_1_1);
        str.add(78, str_1);
        str.add(79, ff);

        // letter = "a".."z" | "A".."Z" | "_" | "$"
        letter.add(81, new Range(80, "letter", "a", "z"));
        letter.add(83, new Range(82, "letter", "A", "Z"));
        letter.add(85, new Str(84, "_"));
        letter.add(87, new Str(86, "$"));

        // digit = "0".."9"

        // name = letter [letter | digit]+
        name.add(88, letter);
        Optional name_1 = new Optional(89, "name_1");
        Repeat name_1_1 = new Repeat(90, "name_1_1");
        OrList name_1_1_1 = new OrList(91, "name_1_1_1");
        name_1_1_1.add(92, letter);
        name_1_1_1.add(93, digit);
        name_1_1.add(94, name_1_1_1);
        name_1.add(95, name_1_1);
        name.add(96, name_1);

        // uname = "A".."Z" [letter | digit]+
        uname.add(98, new Range(97, "uname", "A", "Z"));
        Optional uname_1 = new Optional(99, "uname_1");
        Repeat uname_1_1 = new Repeat(100, "uname_1_1");
        OrList uname_1_1_1 = new OrList(101, "uname_1_1_1");
        uname_1_1_1.add(102, letter);
        uname_1_1_1.add(103, digit);
View Full Code Here

        Repeat ws = new Repeat(3, "ws");
        Optional s = new Optional(4, "s");
        Str ff = new Str(5, "\"");
        ElementList str = new ElementList(6, "str");
        OrList letter = new OrList(7, "letter");
        Range digit = new Range(8, "digit", "0", "9");
        ElementList name = new ElementList(9, "name");
        ElementList uname = new ElementList(10, "uname");
        Optional _public = new Optional(11, "public");
        ElementList packagestatement = new ElementList(12, "packagestatement");
        ElementList packagename = new ElementList(13, "packagename");
        ElementList fullclassname = new ElementList(14, "fullclassname");
        ElementList importstatement = new ElementList(15, "importstatement");
        Optional imports = new Optional(16, "imports");
        ElementList parameter = new ElementList(17, "parameter");
        ElementList parameters = new ElementList(18, "parameters");
        ElementList statement = new ElementList(19, "statement");
        Optional skipCurlyBrace = new Optional(20, "skipCurlyBrace");
        ElementList stateStatement = new ElementList(21, "stateStatement");
        ElementList stateConstructor = new ElementList(22, "stateConstructor");
        ElementList asMethod = new ElementList(23, "asMethod");
        ElementList behaviourMethod = new ElementList(24, "behaviourMethod");
        ElementList behaviour = new ElementList(25, "behaviour");

        // *** Statements ***

        // newline = "\r\n" | "\n"
        newline.add(27, new Str(26, "\r\n"));
        newline.add(29, new Str(28, "\n"));

        // comment = ("/*" [(comment | !"*/")+] "*/") | ("//" [!newline+] newline|END)
        ElementList comment_1 = new ElementList(30, "comment_1");
        comment_1.add(32, new Str(31, "/*"));
        Optional comment_1_1 = new Optional(33, "comment_1_1");
        Repeat comment_1_1_1 = new Repeat(34, "comment_1_1_1");
        OrList comment_1_1_1_1 = new OrList(35, "comment_1_1_1_1");
        comment_1_1_1_1.add(36, comment);
        comment_1_1_1_1.add(38, new Str(37, "*/", NOT));
        comment_1_1_1.add(39, comment_1_1_1_1);
        comment_1_1.add(40, comment_1_1_1);
        comment_1.add(41, comment_1_1);
        comment_1.add(43, new Str(42, "*/"));
        comment.add(44, comment_1);
        ElementList comment_2 = new ElementList(45, "comment_2");
        comment_2.add(47, new Str(46, "//"));
        Optional comment_2_1 = new Optional(48, "comment_2_1");
        Repeat comment_2_1_1 = new Repeat(49, "comment_2_1_1");
        comment_2_1_1.add(50, newline, NOT);
        comment_2_1.add(51, comment_2_1_1);
        comment_2.add(52, comment_2_1);
        OrList comment_2_2 = new OrList(53, "comment_2_2");
        comment_2_2.add(54, newline);
        comment_2_2.add(56, new End(55, "comment_2_2"));
        comment_2.add(57, comment_2_2);
        comment.add(58, comment_2);

        // ws = (newline | " " | "\t" | comment)+
        OrList ws_1 = new OrList(59, "ws_1");
        ws_1.add(60, newline);
        ws_1.add(62, new Str(61, " "));
        ws_1.add(64, new Str(63, "\t"));
        ws_1.add(65, comment);
        ws.add(66, ws_1);

        // s = [ws]
        s.add(67, ws);

        // ff = "\""

        // str = ff (("\\\"" | !(ff|newline))+):strval ff
        str.add(68, ff);
        Repeat str_1 = new Repeat(69, "str_1");
        OrList str_1_1 = new OrList(70, "str_1_1");
        str_1_1.add(72, new Str(71, "\\\""));
        OrList str_1_1_1 = new OrList(73, "str_1_1_1", NOT);
        str_1_1_1.add(74, ff);
        str_1_1_1.add(75, newline);
        str_1_1.add(76, str_1_1_1);
        str_1.add(77, str_1_1);
        str.add(78, str_1);
        str.add(79, ff);

        // letter = "a".."z" | "A".."Z" | "_" | "$"
        letter.add(81, new Range(80, "letter", "a", "z"));
        letter.add(83, new Range(82, "letter", "A", "Z"));
        letter.add(85, new Str(84, "_"));
        letter.add(87, new Str(86, "$"));

        // digit = "0".."9"

        // name = letter [letter | digit]+
        name.add(88, letter);
        Optional name_1 = new Optional(89, "name_1");
        Repeat name_1_1 = new Repeat(90, "name_1_1");
        OrList name_1_1_1 = new OrList(91, "name_1_1_1");
        name_1_1_1.add(92, letter);
        name_1_1_1.add(93, digit);
        name_1_1.add(94, name_1_1_1);
        name_1.add(95, name_1_1);
        name.add(96, name_1);

        // uname = "A".."Z" [letter | digit]+
        uname.add(98, new Range(97, "uname", "A", "Z"));
        Optional uname_1 = new Optional(99, "uname_1");
        Repeat uname_1_1 = new Repeat(100, "uname_1_1");
        OrList uname_1_1_1 = new OrList(101, "uname_1_1_1");
        uname_1_1_1.add(102, letter);
        uname_1_1_1.add(103, digit);
View Full Code Here

        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", booleanDataBooleanData);
        Repeat unsignedInt = new Repeat(9, "unsignedInt");
        ElementList integerData = new ElementList(10, "integerData", integerDataIntegerData);
        ElementList floatData = new ElementList(11, "floatData", floatDataFloatData);
        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", dataData);
        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", textText);
        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");
View Full Code Here

        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");
View Full Code Here

        // *** Declarations ***
        OrList newline = new OrList(1, "newline", grammarNewline);
        OrList comment = new OrList(2, "comment");
        Repeat ws = new Repeat(3, "ws");
        Optional s = new Optional(4, "s");
        Range digit = new Range(5, "digit", "0", "9");
        Repeat integer = new Repeat(6, "integer", integerInteger);
        Range lower = new Range(7, "lower", "a", "z");
        Range upper = new Range(8, "upper", "A", "Z");
        Optional xname = new Optional(9, "xname");
        ElementList lname = new ElementList(10, "lname");
        ElementList uname = new ElementList(11, "uname");
        Str ff = new Str(12, "\"");
        ElementList str = new ElementList(13, "str");
View Full Code Here

TOP

Related Classes of net.sf.laja.parser.engine2.inspector.DefaultSyntaxErrorHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.