Examples of ElementList


Examples of net.sf.laja.parser.engine2.element.ElementList

    Str cd = new Str(10, "cd");
    Repeat ar = new Repeat(11, "ar");
    Repeat br = new Repeat(12, "br");
    Repeat dr = new Repeat(13, "dr");
    Repeat er = new Repeat(14, "er");
    ElementList t111 = new ElementList(15, "t111");
    ElementList t112 = new ElementList(16, "t112");
    Repeat t113 = new Repeat(17, "t113");
    ElementList t114 = new ElementList(18, "t114");
    ElementList t121 = new ElementList(19, "t121");
    ElementList t122 = new ElementList(20, "t122");
    Repeat t123 = new Repeat(21, "t123");
    ElementList t124 = new ElementList(22, "t124");
    ElementList t131 = new ElementList(23, "t131", NOT, testcaseT131X);
    ElementList t132 = new ElementList(24, "t132", NOT, testcaseT132X);
    Repeat t133 = new Repeat(25, "t133", NOT, testcaseT133X);
    ElementList t134 = new ElementList(26, "t134", NOT, testcaseT134X);
    ElementList t141 = new ElementList(27, "t141");
    Repeat t142 = new Repeat(28, "t142");
    ElementList t143 = new ElementList(29, "t143");
    Repeat t144 = new Repeat(30, "t144");
    Optional t151 = new Optional(31, "t151");
    ElementList t152 = new ElementList(32, "t152");
    Optional t153 = new Optional(33, "t153");
    ElementList t154 = new ElementList(34, "t154");
    Optional t161 = new Optional(35, "t161");
    ElementList t162 = new ElementList(36, "t162");
    Optional t163 = new Optional(37, "t163");
    ElementList t164 = new ElementList(38, "t164");
    Optional t165 = new Optional(39, "t165", testcaseT165X);
    ElementList t211 = new ElementList(40, "t211");
    ElementList t212 = new ElementList(41, "t212");
    Optional t213 = new Optional(42, "t213");
    Optional t214 = new Optional(43, "t214");
    Repeat t311 = new Repeat(44, "t311", new net.sf.laja.parser.engine2.Repeats(3));
    Repeat t312 = new Repeat(45, "t312", new net.sf.laja.parser.engine2.Repeats(3,5));
    ElementList t313a = new ElementList(46, "t313a");
    Repeat t313 = new Repeat(47, "t313", new net.sf.laja.parser.engine2.Repeats(2));
    ElementList t411 = new ElementList(48, "t411");
    Repeat t511a = new Repeat(49, "t511a");
    ElementList t511 = new ElementList(50, "t511");
    ElementList t512 = new ElementList(51, "t512");
    ElementList testcase = new ElementList(52, "testcase");

    // cr = ("\r" ["\n"]) | "\n"
    ElementList cr_1 = new ElementList(53, "cr_1");
    cr_1.add(55, new Str(54, "\r"));
    Optional cr_1_1 = new Optional(56, "cr_1_1");
    cr_1_1.add(58, new Str(57, "\n"));
    cr_1.add(59, cr_1_1);
    cr.add(60, cr_1);
    cr.add(62, new Str(61, "\n"));

    // comment = ("/*" [!"*/"+] "*/") | ("//" [!(cr|END)+] cr|END)
    ElementList comment_1 = new ElementList(63, "comment_1");
    comment_1.add(65, new Str(64, "/*"));
    Optional comment_1_1 = new Optional(66, "comment_1_1");
    Repeat comment_1_1_1 = new Repeat(67, "comment_1_1_1");
    comment_1_1_1.add(69, new Str(68, "*/", NOT));
    comment_1_1.add(70, comment_1_1_1);
    comment_1.add(71, comment_1_1);
    comment_1.add(73, new Str(72, "*/"));
    comment.add(74, comment_1);
    ElementList comment_2 = new ElementList(75, "comment_2");
    comment_2.add(77, new Str(76, "//"));
    Optional comment_2_1 = new Optional(78, "comment_2_1");
    Repeat comment_2_1_1 = new Repeat(79, "comment_2_1_1");
    OrList comment_2_1_1_1 = new OrList(80, "comment_2_1_1_1");
    comment_2_1_1_1.add(81, cr);
    comment_2_1_1_1.add(83, new End(82, "comment_2_1_1_1"));
    comment_2_1_1.add(84, comment_2_1_1_1, NOT);
    comment_2_1.add(85, comment_2_1_1);
    comment_2.add(86, comment_2_1);
    OrList comment_2_2 = new OrList(87, "comment_2_2");
    comment_2_2.add(88, cr);
    comment_2_2.add(90, new End(89, "comment_2_2"));
    comment_2.add(91, comment_2_2);
    comment.add(92, comment_2);

    // ws = (cr | " " | "\t" | comment)+
    OrList ws_1 = new OrList(93, "ws_1");
    ws_1.add(94, cr);
    ws_1.add(96, new Str(95, " "));
    ws_1.add(98, new Str(97, "\t"));
    ws_1.add(99, comment);
    ws.add(100, ws_1);

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

    // a = "a"

    // b = "b"

    // c = "c"

    // d = "d"

    // ab = "ab"

    // cd = "cd"

    // ar = "a"+
    ar.add(103, new Str(102, "a"));

    // br = "b"+
    br.add(105, new Str(104, "b"));

    // dr = "d"+
    dr.add(107, new Str(106, "d"));

    // er = "e"+
    er.add(109, new Str(108, "e"));

    // t111 = ab
    t111.add(110, ab, testcaseT111Ab);

    // t112 = !ab
    t112.add(111, ab, NOT, testcaseT112Ab);

    // t113 = ab+
    t113.add(112, ab, testcaseT113Ab);

    // t114 = !ab:notab+ ab
    Repeat t114_1 = new Repeat(113, "t114_1");
    t114_1.add(114, ab, NOT, testcaseT114Notab);
    t114.add(115, t114_1);
    t114.add(116, ab);

    // t121 = (ab)
    t121.add(117, ab, testcaseT121Ab);

    // t122 = (!ab)
    t122.add(118, ab, NOT, testcaseT122Ab);

    // t123 = (ab+)
    t123.add(119, ab, testcaseT123Ab);

    // t124 = (!ab:notab+) ab
    Repeat t124_1 = new Repeat(120, "t124_1");
    t124_1.add(121, ab, NOT, testcaseT124Notab);
    t124.add(122, t124_1);
    t124.add(123, ab);

    // t131 = !(ab):x
    t131.add(124, ab, testcaseT131Ab);

    // t132 = !(!a):x
    t132.add(125, a, NOT, testcaseT132A);

    // t133 = !(ab+):x
    t133.add(126, ab);

    // t134 = !(!a+):x
    Repeat t134_1 = new Repeat(127, "t134_1");
    t134_1.add(128, a, NOT);
    t134.add(129, t134_1);

    // t141 = !(ab:notab):x+ ab
    Repeat t141_1 = new Repeat(130, "t141_1");
    ElementList t141_1_1 = new ElementList(131, "t141_1_1");
    t141_1_1.add(132, ab, testcaseT141Notab);
    t141_1.add(133, t141_1_1, NOT, testcaseT141X);
    t141.add(134, t141_1);
    t141.add(135, ab, testcaseT141Ab);

    // t142 = !(!a):x+
    ElementList t142_1 = new ElementList(136, "t142_1");
    t142_1.add(137, a, NOT, testcaseT142A);
    t142.add(138, t142_1, NOT, testcaseT142X);

    // t143 = !(ab:notab+):x+ ab
    Repeat t143_1 = new Repeat(139, "t143_1");
    Repeat t143_1_1 = new Repeat(140, "t143_1_1");
View Full Code Here

Examples of net.sf.laja.parser.engine2.element.ElementList

    Str cd = new Str(10, "cd");
    Repeat ar = new Repeat(11, "ar");
    Repeat br = new Repeat(12, "br");
    Repeat dr = new Repeat(13, "dr");
    Repeat er = new Repeat(14, "er");
    ElementList t111 = new ElementList(15, "t111");
    ElementList t112 = new ElementList(16, "t112");
    Repeat t113 = new Repeat(17, "t113");
    ElementList t114 = new ElementList(18, "t114");
    ElementList t121 = new ElementList(19, "t121");
    ElementList t122 = new ElementList(20, "t122");
    Repeat t123 = new Repeat(21, "t123");
    ElementList t124 = new ElementList(22, "t124");
    ElementList t131 = new ElementList(23, "t131", NOT);
    ElementList t132 = new ElementList(24, "t132", NOT);
    Repeat t133 = new Repeat(25, "t133", NOT);
    ElementList t134 = new ElementList(26, "t134", NOT);
    ElementList t141 = new ElementList(27, "t141");
    Repeat t142 = new Repeat(28, "t142");
    ElementList t143 = new ElementList(29, "t143");
    Repeat t144 = new Repeat(30, "t144");
    Optional t151 = new Optional(31, "t151");
    ElementList t152 = new ElementList(32, "t152");
    Optional t153 = new Optional(33, "t153");
    ElementList t154 = new ElementList(34, "t154");
    Optional t161 = new Optional(35, "t161");
    ElementList t162 = new ElementList(36, "t162");
    Optional t163 = new Optional(37, "t163");
    ElementList t164 = new ElementList(38, "t164");
    Optional t165 = new Optional(39, "t165");
    ElementList t211 = new ElementList(40, "t211");
    ElementList t212 = new ElementList(41, "t212");
    Optional t213 = new Optional(42, "t213");
    Optional t214 = new Optional(43, "t214");
    Repeat t311 = new Repeat(44, "t311", new net.sf.laja.parser.engine2.Repeats(3));
    Repeat t312 = new Repeat(45, "t312", new net.sf.laja.parser.engine2.Repeats(3,5));
    ElementList t313a = new ElementList(46, "t313a");
    Repeat t313 = new Repeat(47, "t313", new net.sf.laja.parser.engine2.Repeats(2));
    ElementList t411 = new ElementList(48, "t411");
    Repeat t511a = new Repeat(49, "t511a");
    ElementList t511 = new ElementList(50, "t511");
    ElementList t512 = new ElementList(51, "t512");
    ElementList testcase = new ElementList(52, "testcase");

    // cr = ("\r" ["\n"]) | "\n"
    ElementList cr_1 = new ElementList(53, "cr_1");
    cr_1.add(55, new Str(54, "\r"));
    Optional cr_1_1 = new Optional(56, "cr_1_1");
    cr_1_1.add(58, new Str(57, "\n"));
    cr_1.add(59, cr_1_1);
    cr.add(60, cr_1);
    cr.add(62, new Str(61, "\n"));

    // comment = ("/*" [!"*/"+] "*/") | ("//" [!(cr|END)+] cr|END)
    ElementList comment_1 = new ElementList(63, "comment_1");
    comment_1.add(65, new Str(64, "/*"));
    Optional comment_1_1 = new Optional(66, "comment_1_1");
    Repeat comment_1_1_1 = new Repeat(67, "comment_1_1_1");
    comment_1_1_1.add(69, new Str(68, "*/", NOT));
    comment_1_1.add(70, comment_1_1_1);
    comment_1.add(71, comment_1_1);
    comment_1.add(73, new Str(72, "*/"));
    comment.add(74, comment_1);
    ElementList comment_2 = new ElementList(75, "comment_2");
    comment_2.add(77, new Str(76, "//"));
    Optional comment_2_1 = new Optional(78, "comment_2_1");
    Repeat comment_2_1_1 = new Repeat(79, "comment_2_1_1");
    OrList comment_2_1_1_1 = new OrList(80, "comment_2_1_1_1");
    comment_2_1_1_1.add(81, cr);
    comment_2_1_1_1.add(83, new End(82, "comment_2_1_1_1"));
    comment_2_1_1.add(84, comment_2_1_1_1, NOT);
    comment_2_1.add(85, comment_2_1_1);
    comment_2.add(86, comment_2_1);
    OrList comment_2_2 = new OrList(87, "comment_2_2");
    comment_2_2.add(88, cr);
    comment_2_2.add(90, new End(89, "comment_2_2"));
    comment_2.add(91, comment_2_2);
    comment.add(92, comment_2);

    // ws = (cr | " " | "\t" | comment)+
    OrList ws_1 = new OrList(93, "ws_1");
    ws_1.add(94, cr);
    ws_1.add(96, new Str(95, " "));
    ws_1.add(98, new Str(97, "\t"));
    ws_1.add(99, comment);
    ws.add(100, ws_1);

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

    // a = "a"

    // b = "b"

    // c = "c"

    // d = "d"

    // ab = "ab"

    // cd = "cd"

    // ar = "a"+
    ar.add(103, new Str(102, "a"));

    // br = "b"+
    br.add(105, new Str(104, "b"));

    // dr = "d"+
    dr.add(107, new Str(106, "d"));

    // er = "e"+
    er.add(109, new Str(108, "e"));

    // t111 = ab
    t111.add(110, ab);

    // t112 = !ab
    t112.add(111, ab, NOT);

    // t113 = ab+
    t113.add(112, ab);

    // t114 = !ab:notab+ ab
    Repeat t114_1 = new Repeat(113, "t114_1");
    t114_1.add(114, ab, NOT);
    t114.add(115, t114_1);
    t114.add(116, ab);

    // t121 = (ab)
    t121.add(117, ab);

    // t122 = (!ab)
    t122.add(118, ab, NOT);

    // t123 = (ab+)
    t123.add(119, ab);

    // t124 = (!ab:notab+) ab
    Repeat t124_1 = new Repeat(120, "t124_1");
    t124_1.add(121, ab, NOT);
    t124.add(122, t124_1);
    t124.add(123, ab);

    // t131 = !(ab):x
    t131.add(124, ab);

    // t132 = !(!a):x
    t132.add(125, a, NOT);

    // t133 = !(ab+):x
    t133.add(126, ab);

    // t134 = !(!a+):x
    Repeat t134_1 = new Repeat(127, "t134_1");
    t134_1.add(128, a, NOT);
    t134.add(129, t134_1);

    // t141 = !(ab:notab):x+ ab
    Repeat t141_1 = new Repeat(130, "t141_1");
    ElementList t141_1_1 = new ElementList(131, "t141_1_1");
    t141_1_1.add(132, ab);
    t141_1.add(133, t141_1_1, NOT);
    t141.add(134, t141_1);
    t141.add(135, ab);

    // t142 = !(!a):x+
    ElementList t142_1 = new ElementList(136, "t142_1");
    t142_1.add(137, a, NOT);
    t142.add(138, t142_1, NOT);

    // t143 = !(ab:notab+):x+ ab
    Repeat t143_1 = new Repeat(139, "t143_1");
    Repeat t143_1_1 = new Repeat(140, "t143_1_1");
View Full Code Here

Examples of net.sf.laja.parser.engine2.element.ElementList

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

Examples of net.sf.laja.parser.engine2.element.ElementList

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

Examples of net.sf.laja.parser.engine2.element.ElementList

        Data.ConstructorConstructorLastPart constructorConstructorLastPart = data2.new ConstructorConstructorLastPart("constructorConstructorLastPart");

        // *** Declarations ***
        Str constructorComment = new Str(1, "// (constructor)");
        Str endComment = new Str(2, "// (end)");
        ElementList constructorCodeBlock = new ElementList(3, "constructorCodeBlock");
        ElementList constructor = new ElementList(4, "constructor");

        // *** Statements ***

        // constructorComment = "// (constructor)"

        // endComment = "// (end)"

        // constructorCodeBlock = !endComment+:codeBlock endComment
        Repeat constructorCodeBlock_1 = new Repeat(5, "constructorCodeBlock_1", constructorConstructorCodeBlockCodeBlock);
        constructorCodeBlock_1.add(6, endComment, NOT);
        constructorCodeBlock.add(7, constructorCodeBlock_1);
        constructorCodeBlock.add(8, endComment);

        // constructor = (!constructorComment+ constructorComment):firstPart (constructorCodeBlock *:lastPart)|(:endCodeBlock *):lastPart
        ElementList constructor_1 = new ElementList(9, "constructor_1", constructorConstructorFirstPart);
        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

Examples of net.sf.laja.parser.engine2.element.ElementList

        // *** Output classes ***

        // *** Declarations ***
        Str constructorComment = new Str(1, "// (constructor)");
        Str endComment = new Str(2, "// (end)");
        ElementList constructorCodeBlock = new ElementList(3, "constructorCodeBlock");
        ElementList constructor = new ElementList(4, "constructor");

        // *** Statements ***

        // constructorComment = "// (constructor)"

        // endComment = "// (end)"

        // constructorCodeBlock = !endComment+:codeBlock endComment
        Repeat constructorCodeBlock_1 = new Repeat(5, "constructorCodeBlock_1");
        constructorCodeBlock_1.add(6, endComment, NOT);
        constructorCodeBlock.add(7, constructorCodeBlock_1);
        constructorCodeBlock.add(8, endComment);

        // constructor = (!constructorComment+ constructorComment):firstPart (constructorCodeBlock *:lastPart)|(:endCodeBlock *):lastPart
        ElementList constructor_1 = new ElementList(9, "constructor_1");
        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

Examples of net.sf.laja.parser.engine2.element.ElementList

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

Examples of net.sf.laja.parser.engine2.element.ElementList

        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");
        ElementList reference = new ElementList(14, "reference");
        ElementList variable = new ElementList(15, "variable");
        OrList range1 = new OrList(16, "range1");
        ElementList range = new ElementList(17, "range");
        Str end = new Str(18, "END");
        Str complete = new Str(19, "*");
        ElementList repeats = new ElementList(20, "repeats");
        ElementList valx = new ElementList(21, "valx");
        ElementList marker = new ElementList(22, "marker");
        ElementList valprim = new ElementList(23, "valprim");
        ElementList valpar = new ElementList(24, "valpar");
        ElementList valor = new ElementList(25, "valor");
        ElementList valopt = new ElementList(26, "valopt");
        ElementList valand = new ElementList(27, "valand");
        Repeat valstmt = new Repeat(28, "valstmt");
        ElementList val = new ElementList(29, "val");
        ElementList def = new ElementList(30, "def");
        ElementList classvar = new ElementList(31, "classvar");
        ElementList constructor = new ElementList(32, "constructor");
        ElementList outputclass = new ElementList(33, "outputclass");
        ElementList omarg = new ElementList(34, "omarg");
        ElementList outputmethod = new ElementList(35, "outputmethod");
        ElementList outputvar = new ElementList(36, "outputvar");
        ElementList grammar = new ElementList(37, "grammar");

        // *** Statements ***

        // newline = "\r\n" | "\n"
        newline.add(39, new Str(38, "\r\n"));
        newline.add(41, new Str(40, "\n"));

        // comment = ("/*" [(comment | !"*/")+] "*/") | ("//" [!newline+] newline|END)
        ElementList comment_1 = new ElementList(42, "comment_1");
        comment_1.add(44, new Str(43, "/*"));
        Optional comment_1_1 = new Optional(45, "comment_1_1");
        Repeat comment_1_1_1 = new Repeat(46, "comment_1_1_1");
        OrList comment_1_1_1_1 = new OrList(47, "comment_1_1_1_1");
        comment_1_1_1_1.add(48, comment);
        comment_1_1_1_1.add(50, new Str(49, "*/", NOT));
        comment_1_1_1.add(51, comment_1_1_1_1);
        comment_1_1.add(52, comment_1_1_1);
        comment_1.add(53, comment_1_1);
        comment_1.add(55, new Str(54, "*/"));
        comment.add(56, comment_1);
        ElementList comment_2 = new ElementList(57, "comment_2");
        comment_2.add(59, new Str(58, "//"));
        Optional comment_2_1 = new Optional(60, "comment_2_1");
        Repeat comment_2_1_1 = new Repeat(61, "comment_2_1_1");
        comment_2_1_1.add(62, newline, NOT);
        comment_2_1.add(63, comment_2_1_1);
        comment_2.add(64, comment_2_1);
        OrList comment_2_2 = new OrList(65, "comment_2_2");
        comment_2_2.add(66, newline);
        comment_2_2.add(68, new End(67, "comment_2_2"));
        comment_2.add(69, comment_2_2);
        comment.add(70, comment_2);

        // ws = (newline | " " | "\t" | comment)+
        OrList ws_1 = new OrList(71, "ws_1");
        ws_1.add(72, newline);
        ws_1.add(74, new Str(73, " "));
        ws_1.add(76, new Str(75, "\t"));
        ws_1.add(77, comment);
        ws.add(78, ws_1);

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

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

        // integer = digit+
        integer.add(80, digit);

        // lower = "a".."z"

        // upper = "A".."Z"

        // xname = [lower|upper|digit]+
        Repeat xname_1 = new Repeat(81, "xname_1");
        OrList xname_1_1 = new OrList(82, "xname_1_1");
        xname_1_1.add(83, lower);
        xname_1_1.add(84, upper);
        xname_1_1.add(85, digit);
        xname_1.add(86, xname_1_1);
        xname.add(87, xname_1);

        // lname = lower xname
        lname.add(88, lower);
        lname.add(89, xname);

        // uname = upper xname
        uname.add(90, upper);
        uname.add(91, xname);

        // ff = "\""

        // str = ff (("\\\"" | !(ff|newline))+):strval ff
        str.add(92, ff);
        Repeat str_1 = new Repeat(93, "str_1", strStrStrval);
        OrList str_1_1 = new OrList(94, "str_1_1");
        str_1_1.add(96, new Str(95, "\\\""));
        OrList str_1_1_1 = new OrList(97, "str_1_1_1", NOT);
        str_1_1_1.add(98, ff);
        str_1_1_1.add(99, newline);
        str_1_1.add(100, str_1_1_1);
        str_1.add(101, str_1_1);
        str.add(102, str_1);
        str.add(103, ff);

        // reference = lname
        reference.add(104, lname, referenceReference);

        // variable = "$" lname:name
        variable.add(106, new Str(105, "$"));
        variable.add(107, lname, variableVariableName);

        // range1 = integer|str
        range1.add(108, integer, range1Range1Integer);
        range1.add(109, str, range1Range1Str);

        // range = range1 ".." range1
        range.add(110, range1, rangeRangeRange1);
        range.add(112, new Str(111, ".."));
        range.add(113, range1, rangeRangeRange1);

        // end = "END"

        // complete = "*"

        // repeats = "#" integer:min [".." (integer|"*"):max]
        repeats.add(115, new Str(114, "#"));
        repeats.add(116, integer, repeatsRepeatsMin);
        Optional repeats_1 = new Optional(117, "repeats_1");
        repeats_1.add(119, new Str(118, ".."));
        OrList repeats_1_1 = new OrList(120, "repeats_1_1", repeatsRepeatsMax);
        repeats_1_1.add(121, integer, repeatsRepeatsInteger);
        repeats_1_1.add(123, new Str(122, "*"));
        repeats_1.add(124, repeats_1_1);
        repeats.add(125, repeats_1);

        // valx = [":" lname:varname] ["+":repeat|repeats [":" lname:repeatName]]
        Optional valx_1 = new Optional(126, "valx_1");
        valx_1.add(128, new Str(127, ":"));
        valx_1.add(129, lname, valxValxVarname);
        valx.add(130, valx_1);
        Optional valx_2 = new Optional(131, "valx_2");
        OrList valx_2_1 = new OrList(132, "valx_2_1");
        valx_2_1.add(134, new Str(133, "+", valxValxRepeat));
        valx_2_1.add(135, repeats, valxValxRepeats);
        valx_2.add(136, valx_2_1);
        Optional valx_2_2 = new Optional(137, "valx_2_2");
        valx_2_2.add(139, new Str(138, ":"));
        valx_2_2.add(140, lname, valxValxRepeatName);
        valx_2.add(141, valx_2_2);
        valx.add(142, valx_2);

        // marker = ":" lname:name
        marker.add(144, new Str(143, ":"));
        marker.add(145, lname, markerMarkerName);

        // valprim = s ["!":not s] range|integer|str|reference|variable|complete|end valx
        valprim.add(146, s);
        Optional valprim_1 = new Optional(147, "valprim_1");
        valprim_1.add(149, new Str(148, "!", valprimValprimNot));
        valprim_1.add(150, s);
        valprim.add(151, valprim_1);
        OrList valprim_2 = new OrList(152, "valprim_2");
        valprim_2.add(153, range, valprimValprimRange);
        valprim_2.add(154, integer, valprimValprimInteger);
        valprim_2.add(155, str, valprimValprimStr);
        valprim_2.add(156, reference, valprimValprimReference);
        valprim_2.add(157, variable, valprimValprimVariable);
        valprim_2.add(158, complete, valprimValprimComplete);
        valprim_2.add(159, end, valprimValprimEnd);
        valprim.add(160, valprim_2);
        valprim.add(161, valx, valprimValprimValx);

        // valpar = s ["!":not s] ["CS":cs|"CI":ci s] "(" s val s ")" valx
        valpar.add(162, s);
        Optional valpar_1 = new Optional(163, "valpar_1");
        valpar_1.add(165, new Str(164, "!", valparValparNot));
        valpar_1.add(166, s);
        valpar.add(167, valpar_1);
        Optional valpar_2 = new Optional(168, "valpar_2");
        OrList valpar_2_1 = new OrList(169, "valpar_2_1");
        valpar_2_1.add(171, new Str(170, "CS", valparValparCs));
        valpar_2_1.add(173, new Str(172, "CI", valparValparCi));
        valpar_2.add(174, valpar_2_1);
        valpar_2.add(175, s);
        valpar.add(176, valpar_2);
        valpar.add(178, new Str(177, "("));
        valpar.add(179, s);
        valpar.add(180, val, valparValparVal);
        valpar.add(181, s);
        valpar.add(183, new Str(182, ")"));
        valpar.add(184, valx, valparValparValx);

        // valor = s valprim|valpar [s "|" s valprim|valpar]+
        valor.add(185, s);
        OrList valor_1 = new OrList(186, "valor_1");
        valor_1.add(187, valprim, valorValorValprim);
        valor_1.add(188, valpar, valorValorValpar);
        valor.add(189, valor_1);
        Optional valor_2 = new Optional(190, "valor_2");
        Repeat valor_2_1 = new Repeat(191, "valor_2_1");
        valor_2_1.add(192, s);
        valor_2_1.add(194, new Str(193, "|"));
        valor_2_1.add(195, s);
        OrList valor_2_1_1 = new OrList(196, "valor_2_1_1");
        valor_2_1_1.add(197, valprim, valorValorValprim);
        valor_2_1_1.add(198, valpar, valorValorValpar);
        valor_2_1.add(199, valor_2_1_1);
        valor_2.add(200, valor_2_1);
        valor.add(201, valor_2);

        // valopt = s "[" s val s "]" valx
        valopt.add(202, s);
        valopt.add(204, new Str(203, "["));
        valopt.add(205, s);
        valopt.add(206, val, valoptValoptVal);
        valopt.add(207, s);
        valopt.add(209, new Str(208, "]"));
        valopt.add(210, valx, valoptValoptValx);

        // valand = valor:mainAnd s "&" s valor|valopt [s "&" s valor|valopt]+
        valand.add(211, valor, valandValandMainAnd);
        valand.add(212, s);
        valand.add(214, new Str(213, "&"));
        valand.add(215, s);
        OrList valand_1 = new OrList(216, "valand_1");
        valand_1.add(217, valor, valandValandValor);
        valand_1.add(218, valopt, valandValandValopt);
        valand.add(219, valand_1);
        Optional valand_2 = new Optional(220, "valand_2");
        Repeat valand_2_1 = new Repeat(221, "valand_2_1");
        valand_2_1.add(222, s);
        valand_2_1.add(224, new Str(223, "&"));
        valand_2_1.add(225, s);
        OrList valand_2_1_1 = new OrList(226, "valand_2_1_1");
        valand_2_1_1.add(227, valor, valandValandValor);
        valand_2_1_1.add(228, valopt, valandValandValopt);
        valand_2_1.add(229, valand_2_1_1);
        valand_2.add(230, valand_2_1);
        valand.add(231, valand_2);

        // valstmt = (s valand|valor|valopt|marker)+
        valstmt.add(232, s);
        OrList valstmt_1 = new OrList(233, "valstmt_1");
        valstmt_1.add(234, valand, valstmtValstmtValand);
        valstmt_1.add(235, valor, valstmtValstmtValor);
        valstmt_1.add(236, valopt, valstmtValstmtValopt);
        valstmt_1.add(237, marker, valstmtValstmtMarker);
        valstmt.add(238, valstmt_1);

        // val = valstmt [s 92 s valstmt:followedby]
        val.add(239, valstmt, valValValstmt);
        Optional val_1 = new Optional(240, "val_1");
        val_1.add(241, s);
        val_1.add(243, new Chr(242, (char)92));
        val_1.add(244, s);
        val_1.add(245, valstmt, valValFollowedby);
        val.add(246, val_1);

        // def = lname:var s "=" s val s ";"
        def.add(247, lname, defDefVar);
        def.add(248, s);
        def.add(250, new Str(249, "="));
        def.add(251, s);
        def.add(252, val, defDefVal);
        def.add(253, s);
        def.add(255, new Str(254, ";"));

        // classvar = uname:class ws lname:var
        classvar.add(256, uname, classvarClassvarClass);
        classvar.add(257, ws);
        classvar.add(258, lname, classvarClassvarVar);

        // constructor = "(" s classvar s ["," s classvar s]+ ")"
        constructor.add(260, new Str(259, "("));
        constructor.add(261, s);
        constructor.add(262, classvar, constructorConstructorClassvar);
        constructor.add(263, s);
        Optional constructor_1 = new Optional(264, "constructor_1");
        Repeat constructor_1_1 = new Repeat(265, "constructor_1_1");
        constructor_1_1.add(267, new Str(266, ","));
        constructor_1_1.add(268, s);
        constructor_1_1.add(269, classvar, constructorConstructorClassvar);
        constructor_1_1.add(270, s);
        constructor_1.add(271, constructor_1_1);
        constructor.add(272, constructor_1);
        constructor.add(274, new Str(273, ")"));

        // outputclass = uname:class [constructor] ws lname:var s ";"
        outputclass.add(275, uname, outputclassOutputclassClass);
        Optional outputclass_1 = new Optional(276, "outputclass_1");
        outputclass_1.add(277, constructor, outputclassOutputclassConstructor);
        outputclass.add(278, outputclass_1);
        outputclass.add(279, ws);
        outputclass.add(280, lname, outputclassOutputclassVar);
        outputclass.add(281, s);
        outputclass.add(283, new Str(282, ";"));

        // omarg = s "," s "String":str | "Index":index ws lname:arg
        omarg.add(284, s);
        omarg.add(286, new Str(285, ","));
        omarg.add(287, s);
        OrList omarg_1 = new OrList(288, "omarg_1");
        omarg_1.add(290, new Str(289, "String", omargOmargStr));
        omarg_1.add(292, new Str(291, "Index", omargOmargIndex));
        omarg.add(293, omarg_1);
        omarg.add(294, ws);
        omarg.add(295, lname, omargOmargArg);

        // outputmethod =
        //   [uname:class [constructor] ws] ["$":setter ws] lname:ref "." lname:method s "(" s
        //   (("void":void ws) | ("String":str ws) | ("Index":index ws) | (uname:argclass ws)
        //   [lname:carg "."] (lname|"*"):arg)
        //   [omarg+] s ")" s ";"
        Optional outputmethod_1 = new Optional(296, "outputmethod_1");
        outputmethod_1.add(297, uname, outputmethodOutputmethodClass);
        Optional outputmethod_1_1 = new Optional(298, "outputmethod_1_1");
        outputmethod_1_1.add(299, constructor, outputmethodOutputmethodConstructor);
        outputmethod_1.add(300, outputmethod_1_1);
        outputmethod_1.add(301, ws);
        outputmethod.add(302, outputmethod_1);
        Optional outputmethod_2 = new Optional(303, "outputmethod_2");
        outputmethod_2.add(305, new Str(304, "$", outputmethodOutputmethodSetter));
        outputmethod_2.add(306, ws);
        outputmethod.add(307, outputmethod_2);
        outputmethod.add(308, lname, outputmethodOutputmethodRef);
        outputmethod.add(310, new Str(309, "."));
        outputmethod.add(311, lname, outputmethodOutputmethodMethod);
        outputmethod.add(312, s);
        outputmethod.add(314, new Str(313, "("));
        outputmethod.add(315, s);
        ElementList outputmethod_3 = new ElementList(316, "outputmethod_3");
        OrList outputmethod_3_1 = new OrList(317, "outputmethod_3_1");
        ElementList outputmethod_3_1_1 = new ElementList(318, "outputmethod_3_1_1");
        outputmethod_3_1_1.add(320, new Str(319, "void", outputmethodOutputmethodVoid));
        outputmethod_3_1_1.add(321, ws);
        outputmethod_3_1.add(322, outputmethod_3_1_1);
        ElementList outputmethod_3_1_2 = new ElementList(323, "outputmethod_3_1_2");
        outputmethod_3_1_2.add(325, new Str(324, "String", outputmethodOutputmethodStr));
        outputmethod_3_1_2.add(326, ws);
        outputmethod_3_1.add(327, outputmethod_3_1_2);
        ElementList outputmethod_3_1_3 = new ElementList(328, "outputmethod_3_1_3");
        outputmethod_3_1_3.add(330, new Str(329, "Index", outputmethodOutputmethodIndex));
        outputmethod_3_1_3.add(331, ws);
        outputmethod_3_1.add(332, outputmethod_3_1_3);
        ElementList outputmethod_3_1_4 = new ElementList(333, "outputmethod_3_1_4");
        outputmethod_3_1_4.add(334, uname, outputmethodOutputmethodArgclass);
        outputmethod_3_1_4.add(335, ws);
        outputmethod_3_1.add(336, outputmethod_3_1_4);
        outputmethod_3.add(337, outputmethod_3_1);
        Optional outputmethod_3_2 = new Optional(338, "outputmethod_3_2");
        outputmethod_3_2.add(339, lname, outputmethodOutputmethodCarg);
        outputmethod_3_2.add(341, new Str(340, "."));
View Full Code Here

Examples of net.sf.laja.parser.engine2.element.ElementList

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

        // *** Declarations ***
        OrList newline = new OrList(1, "newline");
        ElementList comment = new ElementList(2, "comment");
        Repeat ws = new Repeat(3, "ws");
        Optional s = new Optional(4, "s");
        Str ff = new Str(5, "\"");
        Repeat spaces = new Repeat(6, "spaces");
        Range digit = new Range(7, "digit", "0", "9");
        FollowedBy booleanData = new FollowedBy(8, "booleanData");
        Repeat unsignedInt = new Repeat(9, "unsignedInt");
        ElementList integerData = new ElementList(10, "integerData");
        ElementList floatData = new ElementList(11, "floatData");
        OrList letter = new OrList(12, "letter");
        ElementList varname = new ElementList(13, "varname");
        Optional skip = new Optional(14, "skip");
        FollowedBy nullData = new FollowedBy(15, "nullData");
        ElementList stringExp = new ElementList(16, "stringExp");
        ElementList classOrPackageName = new ElementList(17, "classOrPackageName");
        ElementList newStatement = new ElementList(18, "newStatement");
        OrList data = new OrList(19, "data");
        ElementList listData = new ElementList(20, "listData");
        ElementList mapMember = new ElementList(21, "mapMember");
        ElementList mapDataRef = new ElementList(22, "mapDataRef");
        ElementList mapData = new ElementList(23, "mapData");
        OrList indexItem = new OrList(24, "indexItem");
        Repeat listIndex = new Repeat(25, "listIndex");
        ElementList args = new ElementList(26, "args");
        ElementList namespaceRef = new ElementList(27, "namespaceRef");
        ElementList variableRef = new ElementList(28, "variableRef");
        ElementList methodRef = new ElementList(29, "methodRef");
        ElementList attributeRef = new ElementList(30, "attributeRef");
        ElementList attributeVariableRef = new ElementList(31, "attributeVariableRef");
        ElementList attributeMethodRef = new ElementList(32, "attributeMethodRef");
        ElementList reference = new ElementList(33, "reference");
        ElementList callReference = new ElementList(34, "callReference");
        ElementList stringref = new ElementList(35, "stringref");
        ElementList end = new ElementList(36, "end");
        ElementList write = new ElementList(37, "write");
        ElementList set = new ElementList(38, "set");
        ElementList local = new ElementList(39, "local");
        OrList operator = new OrList(40, "operator");
        ElementList comparition = new ElementList(41, "comparition");
        ElementList conditionElement = new ElementList(42, "conditionElement");
        OrList conditionBase = new OrList(43, "conditionBase");
        ElementList conditionAnd = new ElementList(44, "conditionAnd");
        ElementList condition = new ElementList(45, "condition");
        ElementList ifcmd = new ElementList(46, "ifcmd");
        ElementList elseif = new ElementList(47, "elseif");
        ElementList _else = new ElementList(48, "else");
        ElementList whilecmd = new ElementList(49, "whilecmd");
        ElementList call = new ElementList(50, "call");
        ElementList foreach = new ElementList(51, "foreach");
        ElementList importcmd = new ElementList(52, "importcmd");
        ElementList macro = new ElementList(53, "macro");
        ElementList returncmd = new ElementList(54, "returncmd");
        ElementList function = new ElementList(55, "function");
        ElementList namespace = new ElementList(56, "namespace");
        ElementList error = new ElementList(57, "error");
        ElementList command = new ElementList(58, "command");
        ElementList astext = new ElementList(59, "astext");
        Repeat text = new Repeat(60, "text");
        Optional block = new Optional(61, "block");
        ElementList template = new ElementList(62, "template");

        // *** Statements ***

        // newline = "\r\n" | "\n"
        newline.add(64, new Str(63, "\r\n"));
        newline.add(66, new Str(65, "\n"));

        // comment = [spaces] ("#*" [(comment | !"*#")+] "*#") | ("##" [!newline+] newline|END) skip
        Optional comment_1 = new Optional(67, "comment_1");
        comment_1.add(68, spaces);
        comment.add(69, comment_1);
        OrList comment_2 = new OrList(70, "comment_2");
        ElementList comment_2_1 = new ElementList(71, "comment_2_1");
        comment_2_1.add(73, new Str(72, "#*"));
        Optional comment_2_1_1 = new Optional(74, "comment_2_1_1");
        Repeat comment_2_1_1_1 = new Repeat(75, "comment_2_1_1_1");
        OrList comment_2_1_1_1_1 = new OrList(76, "comment_2_1_1_1_1");
        comment_2_1_1_1_1.add(77, comment);
        comment_2_1_1_1_1.add(79, new Str(78, "*#", NOT));
        comment_2_1_1_1.add(80, comment_2_1_1_1_1);
        comment_2_1_1.add(81, comment_2_1_1_1);
        comment_2_1.add(82, comment_2_1_1);
        comment_2_1.add(84, new Str(83, "*#"));
        comment_2.add(85, comment_2_1);
        ElementList comment_2_2 = new ElementList(86, "comment_2_2");
        comment_2_2.add(88, new Str(87, "##"));
        Optional comment_2_2_1 = new Optional(89, "comment_2_2_1");
        Repeat comment_2_2_1_1 = new Repeat(90, "comment_2_2_1_1");
        comment_2_2_1_1.add(91, newline, NOT);
        comment_2_2_1.add(92, comment_2_2_1_1);
        comment_2_2.add(93, comment_2_2_1);
        OrList comment_2_2_2 = new OrList(94, "comment_2_2_2");
        comment_2_2_2.add(95, newline);
        comment_2_2_2.add(97, new End(96, "comment_2_2_2"));
        comment_2_2.add(98, comment_2_2_2);
        comment_2.add(99, comment_2_2);
        comment.add(100, comment_2);
        comment.add(101, skip);

        // ws = (newline | " " | "\t" | comment)+
        OrList ws_1 = new OrList(102, "ws_1");
        ws_1.add(103, newline);
        ws_1.add(105, new Str(104, " "));
        ws_1.add(107, new Str(106, "\t"));
        ws_1.add(108, comment);
        ws.add(109, ws_1);

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

        // ff = "\""

        // spaces = (" " | "\t")+
        OrList spaces_1 = new OrList(111, "spaces_1");
        spaces_1.add(113, new Str(112, " "));
        spaces_1.add(115, new Str(114, "\t"));
        spaces.add(116, spaces_1);

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

        // booleanData = "true":true | "false":false \ !(letter|digit)
        OrList booleanData_1 = new OrList(117, "booleanData_1");
        booleanData_1.add(119, new Str(118, "true"));
        booleanData_1.add(121, new Str(120, "false"));
        booleanData.setElement(122, booleanData_1);
        OrList booleanData_2 = new OrList(123, "booleanData_2", NOT);
        booleanData_2.add(124, letter);
        booleanData_2.add(125, digit);
        booleanData.followedby(126, booleanData_2);

        // unsignedInt = digit+
        unsignedInt.add(127, digit);

        // integerData = ["-"] unsignedInt
        Optional integerData_1 = new Optional(128, "integerData_1");
        integerData_1.add(130, new Str(129, "-"));
        integerData.add(131, integerData_1);
        integerData.add(132, unsignedInt);

        // floatData = ["-"] unsignedInt "." unsignedInt
        Optional floatData_1 = new Optional(133, "floatData_1");
        floatData_1.add(135, new Str(134, "-"));
        floatData.add(136, floatData_1);
        floatData.add(137, unsignedInt);
        floatData.add(139, new Str(138, "."));
        floatData.add(140, unsignedInt);

        // letter = "a".."z" | "A".."Z" | "_"
        letter.add(142, new Range(141, "letter", "a", "z"));
        letter.add(144, new Range(143, "letter", "A", "Z"));
        letter.add(146, new Str(145, "_"));

        // varname = letter [letter|digit]+
        varname.add(147, letter);
        Optional varname_1 = new Optional(148, "varname_1");
        Repeat varname_1_1 = new Repeat(149, "varname_1_1");
        OrList varname_1_1_1 = new OrList(150, "varname_1_1_1");
        varname_1_1_1.add(151, letter);
        varname_1_1_1.add(152, digit);
        varname_1_1.add(153, varname_1_1_1);
        varname_1.add(154, varname_1_1);
        varname.add(155, varname_1);

        // skip = [[spaces] newline]
        Optional skip_1 = new Optional(156, "skip_1");
        skip_1.add(157, spaces);
        skip.add(158, skip_1);
        skip.add(159, newline);

        // nullData = "null" \ !(letter|digit)
        nullData.setElement(161, new Str(160, "null"));
        OrList nullData_1 = new OrList(162, "nullData_1", NOT);
        nullData_1.add(163, letter);
        nullData_1.add(164, digit);
        nullData.followedby(165, nullData_1);

        // stringExp = ff [stringref | (("\\\"" | !(ff|stringref))+):text]+ ff
        stringExp.add(166, ff);
        Optional stringExp_1 = new Optional(167, "stringExp_1");
        Repeat stringExp_1_1 = new Repeat(168, "stringExp_1_1");
        OrList stringExp_1_1_1 = new OrList(169, "stringExp_1_1_1");
        stringExp_1_1_1.add(170, stringref);
        Repeat stringExp_1_1_1_1 = new Repeat(171, "stringExp_1_1_1_1");
        OrList stringExp_1_1_1_1_1 = new OrList(172, "stringExp_1_1_1_1_1");
        stringExp_1_1_1_1_1.add(174, new Str(173, "\\\""));
        OrList stringExp_1_1_1_1_1_1 = new OrList(175, "stringExp_1_1_1_1_1_1", NOT);
        stringExp_1_1_1_1_1_1.add(176, ff);
        stringExp_1_1_1_1_1_1.add(177, stringref);
        stringExp_1_1_1_1_1.add(178, stringExp_1_1_1_1_1_1);
        stringExp_1_1_1_1.add(179, stringExp_1_1_1_1_1);
        stringExp_1_1_1.add(180, stringExp_1_1_1_1);
        stringExp_1_1.add(181, stringExp_1_1_1);
        stringExp_1.add(182, stringExp_1_1);
        stringExp.add(183, stringExp_1);
        stringExp.add(184, ff);

        // classOrPackageName = letter|"$" [letter|digit|"$"]+
        OrList classOrPackageName_1 = new OrList(185, "classOrPackageName_1");
        classOrPackageName_1.add(186, letter);
        classOrPackageName_1.add(188, new Str(187, "$"));
        classOrPackageName.add(189, classOrPackageName_1);
        Optional classOrPackageName_2 = new Optional(190, "classOrPackageName_2");
        Repeat classOrPackageName_2_1 = new Repeat(191, "classOrPackageName_2_1");
        OrList classOrPackageName_2_1_1 = new OrList(192, "classOrPackageName_2_1_1");
        classOrPackageName_2_1_1.add(193, letter);
        classOrPackageName_2_1_1.add(194, digit);
        classOrPackageName_2_1_1.add(196, new Str(195, "$"));
        classOrPackageName_2_1.add(197, classOrPackageName_2_1_1);
        classOrPackageName_2.add(198, classOrPackageName_2_1);
        classOrPackageName.add(199, classOrPackageName_2);

        // newStatement = "new" ws classOrPackageName ["." classOrPackageName]+ s args
        newStatement.add(201, new Str(200, "new"));
        newStatement.add(202, ws);
        newStatement.add(203, classOrPackageName);
        Optional newStatement_1 = new Optional(204, "newStatement_1");
        Repeat newStatement_1_1 = new Repeat(205, "newStatement_1_1");
        newStatement_1_1.add(207, new Str(206, "."));
        newStatement_1_1.add(208, classOrPackageName);
        newStatement_1.add(209, newStatement_1_1);
        newStatement.add(210, newStatement_1);
        newStatement.add(211, s);
        newStatement.add(212, args);

        // data = newStatement | stringExp | listData | mapDataRef | nullData | booleanData | reference | floatData | integerData
        data.add(213, newStatement);
        data.add(214, stringExp);
        data.add(215, listData);
        data.add(216, mapDataRef);
        data.add(217, nullData);
        data.add(218, booleanData);
        data.add(219, reference);
        data.add(220, floatData);
        data.add(221, integerData);

        // listData = "[" s [data [s "," s data]+ s] "]" [s "as array":array]
        listData.add(223, new Str(222, "["));
        listData.add(224, s);
        Optional listData_1 = new Optional(225, "listData_1");
        listData_1.add(226, data);
        Optional listData_1_1 = new Optional(227, "listData_1_1");
        Repeat listData_1_1_1 = new Repeat(228, "listData_1_1_1");
        listData_1_1_1.add(229, s);
        listData_1_1_1.add(231, new Str(230, ","));
        listData_1_1_1.add(232, s);
        listData_1_1_1.add(233, data);
        listData_1_1.add(234, listData_1_1_1);
        listData_1.add(235, listData_1_1);
        listData_1.add(236, s);
        listData.add(237, listData_1);
        listData.add(239, new Str(238, "]"));
        Optional listData_2 = new Optional(240, "listData_2");
        listData_2.add(241, s);
        listData_2.add(243, new Str(242, "as array"));
        listData.add(244, listData_2);

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

        // mapDataRef = "{" [mapData] "}"
        mapDataRef.add(252, new Str(251, "{"));
        Optional mapDataRef_1 = new Optional(253, "mapDataRef_1");
        mapDataRef_1.add(254, mapData);
        mapDataRef.add(255, mapDataRef_1);
        mapDataRef.add(257, new Str(256, "}"));

        // mapData = (s mapMember)+ s
        Repeat mapData_1 = new Repeat(258, "mapData_1");
        mapData_1.add(259, s);
        mapData_1.add(260, mapMember);
        mapData.add(261, mapData_1);
        mapData.add(262, s);

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

        // listIndex = ("[" indexItem "]")+
        listIndex.add(266, new Str(265, "["));
        listIndex.add(267, indexItem);
        listIndex.add(269, new Str(268, "]"));

        // args = "(" s mapData|([data [s "," s data]+]) s ")"
        args.add(271, new Str(270, "("));
        args.add(272, s);
        OrList args_1 = new OrList(273, "args_1");
        args_1.add(274, mapData);
        Optional args_1_1 = new Optional(275, "args_1_1");
        args_1_1.add(276, data);
        Optional args_1_1_1 = new Optional(277, "args_1_1_1");
        Repeat args_1_1_1_1 = new Repeat(278, "args_1_1_1_1");
        args_1_1_1_1.add(279, s);
        args_1_1_1_1.add(281, new Str(280, ","));
        args_1_1_1_1.add(282, s);
        args_1_1_1_1.add(283, data);
        args_1_1_1.add(284, args_1_1_1_1);
        args_1_1.add(285, args_1_1_1);
        args_1.add(286, args_1_1);
        args.add(287, args_1);
        args.add(288, s);
        args.add(290, new Str(289, ")"));

        // namespaceRef = "$" [varname]:namespace
        namespaceRef.add(292, new Str(291, "$"));
        Optional namespaceRef_1 = new Optional(293, "namespaceRef_1");
        namespaceRef_1.add(294, varname);
        namespaceRef.add(295, namespaceRef_1);

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

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

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

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

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

        // reference =
        //   :begin (([namespaceRef "."] attributeRef)|namespaceRef ["." attributeRef:nextAttributeRef]+) |
        //   (floatData|integerData|stringExp ("." attributeRef:nextAttributeRef)+)
        reference.add(316, new Marker(315, "begin"));
        OrList reference_1 = new OrList(317, "reference_1");
        ElementList reference_1_1 = new ElementList(318, "reference_1_1");
        OrList reference_1_1_1 = new OrList(319, "reference_1_1_1");
        ElementList reference_1_1_1_1 = new ElementList(320, "reference_1_1_1_1");
        Optional reference_1_1_1_1_1 = new Optional(321, "reference_1_1_1_1_1");
        reference_1_1_1_1_1.add(322, namespaceRef);
        reference_1_1_1_1_1.add(324, new Str(323, "."));
        reference_1_1_1_1.add(325, reference_1_1_1_1_1);
        reference_1_1_1_1.add(326, attributeRef);
        reference_1_1_1.add(327, reference_1_1_1_1);
        reference_1_1_1.add(328, namespaceRef);
        reference_1_1.add(329, reference_1_1_1);
        Optional reference_1_1_2 = new Optional(330, "reference_1_1_2");
        Repeat reference_1_1_2_1 = new Repeat(331, "reference_1_1_2_1");
        reference_1_1_2_1.add(333, new Str(332, "."));
        reference_1_1_2_1.add(334, attributeRef);
        reference_1_1_2.add(335, reference_1_1_2_1);
        reference_1_1.add(336, reference_1_1_2);
        reference_1.add(337, reference_1_1);
        ElementList reference_1_2 = new ElementList(338, "reference_1_2");
        OrList reference_1_2_1 = new OrList(339, "reference_1_2_1");
        reference_1_2_1.add(340, floatData);
        reference_1_2_1.add(341, integerData);
        reference_1_2_1.add(342, stringExp);
        reference_1_2.add(343, reference_1_2_1);
        Repeat reference_1_2_2 = new Repeat(344, "reference_1_2_2");
        reference_1_2_2.add(346, new Str(345, "."));
        reference_1_2_2.add(347, attributeRef);
        reference_1_2.add(348, reference_1_2_2);
        reference_1.add(349, reference_1_2);
        reference.add(350, reference_1);

        // callReference =
        //   :begin (([namespaceRef "."](attributeMethodRef)|(attributeVariableRef ("." attributeRef:nextAttributeRef)+))
        //   ["." attributeRef:nextAttributeRef]+)
        callReference.add(352, new Marker(351, "begin"));
        ElementList callReference_1 = new ElementList(353, "callReference_1");
        ElementList callReference_1_1 = new ElementList(354, "callReference_1_1");
        Optional callReference_1_1_1 = new Optional(355, "callReference_1_1_1");
        callReference_1_1_1.add(356, namespaceRef);
        callReference_1_1_1.add(358, new Str(357, "."));
        callReference_1_1.add(359, callReference_1_1_1);
        OrList callReference_1_1_2 = new OrList(360, "callReference_1_1_2");
        callReference_1_1_2.add(361, attributeMethodRef);
        ElementList callReference_1_1_2_1 = new ElementList(362, "callReference_1_1_2_1");
        callReference_1_1_2_1.add(363, attributeVariableRef);
        Repeat callReference_1_1_2_1_1 = new Repeat(364, "callReference_1_1_2_1_1");
        callReference_1_1_2_1_1.add(366, new Str(365, "."));
        callReference_1_1_2_1_1.add(367, attributeRef);
        callReference_1_1_2_1.add(368, callReference_1_1_2_1_1);
        callReference_1_1_2.add(369, callReference_1_1_2_1);
        callReference_1_1.add(370, callReference_1_1_2);
        callReference_1.add(371, callReference_1_1);
        Optional callReference_1_2 = new Optional(372, "callReference_1_2");
        Repeat callReference_1_2_1 = new Repeat(373, "callReference_1_2_1");
        callReference_1_2_1.add(375, new Str(374, "."));
        callReference_1_2_1.add(376, attributeRef);
        callReference_1_2.add(377, callReference_1_2_1);
        callReference_1.add(378, callReference_1_2);
        callReference.add(379, callReference_1);

        // stringref = :begin "{" "..":parentDir | ".":currentDir | reference "}"
        stringref.add(381, new Marker(380, "begin"));
        stringref.add(383, new Str(382, "{"));
        OrList stringref_1 = new OrList(384, "stringref_1");
        stringref_1.add(386, new Str(385, ".."));
        stringref_1.add(388, new Str(387, "."));
        stringref_1.add(389, reference);
        stringref.add(390, stringref_1);
        stringref.add(392, new Str(391, "}"));

        // end = [spaces] "#end" skip
        Optional end_1 = new Optional(393, "end_1");
        end_1.add(394, spaces);
        end.add(395, end_1);
        end.add(397, new Str(396, "#end"));
        end.add(398, skip);

        // write = :begin "#write" ws stringExp:filename skip block end
        write.add(400, new Marker(399, "begin"));
        write.add(402, new Str(401, "#write"));
        write.add(403, ws);
        write.add(404, stringExp);
        write.add(405, skip);
        write.add(406, block);
        write.add(407, end);

        // set = :begin "#set" s "(" s reference:target s "=" s comparition|data s ")" skip
        set.add(409, new Marker(408, "begin"));
        set.add(411, new Str(410, "#set"));
        set.add(412, s);
        set.add(414, new Str(413, "("));
        set.add(415, s);
        set.add(416, reference);
        set.add(417, s);
        set.add(419, new Str(418, "="));
        set.add(420, s);
        OrList set_1 = new OrList(421, "set_1");
        set_1.add(422, comparition);
        set_1.add(423, data);
        set.add(424, set_1);
        set.add(425, s);
        set.add(427, new Str(426, ")"));
        set.add(428, skip);

        // local = "#local" s "(" s reference:target s "=" s comparition|data s ")" skip
        local.add(430, new Str(429, "#local"));
        local.add(431, s);
        local.add(433, new Str(432, "("));
        local.add(434, s);
        local.add(435, reference);
        local.add(436, s);
        local.add(438, new Str(437, "="));
        local.add(439, s);
        OrList local_1 = new OrList(440, "local_1");
        local_1.add(441, comparition);
        local_1.add(442, data);
        local.add(443, local_1);
        local.add(444, s);
        local.add(446, new Str(445, ")"));
        local.add(447, skip);

        // operator = "==":equals | "!=":notEquals | "<=":lessOrEqual | "<":lessThan | ">=":greaterOrEqual | ">":greaterThan
        operator.add(449, new Str(448, "=="));
        operator.add(451, new Str(450, "!="));
        operator.add(453, new Str(452, "<="));
        operator.add(455, new Str(454, "<"));
        operator.add(457, new Str(456, ">="));
        operator.add(459, new Str(458, ">"));

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

        // conditionElement = ["!":not] s (comparition | (reference & (!booleanData *)) | booleanData:booleanCondition)
        Optional conditionElement_1 = new Optional(465, "conditionElement_1");
        conditionElement_1.add(467, new Str(466, "!"));
        conditionElement.add(468, conditionElement_1);
        conditionElement.add(469, s);
        OrList conditionElement_2 = new OrList(470, "conditionElement_2");
        conditionElement_2.add(471, comparition);
        ElementList conditionElement_2_1 = new ElementList(472, "conditionElement_2_1");
        AndList conditionElement_2_1_1 = new AndList(473, "conditionElement_2_1_1");
        conditionElement_2_1_1.mainAnd(474, reference);
        ElementList conditionElement_2_1_1_1 = new ElementList(475, "conditionElement_2_1_1_1");
        conditionElement_2_1_1_1.add(476, booleanData, NOT);
        conditionElement_2_1_1_1.add(478, new Complete(477, "conditionElement_2_1_1_1"));
        conditionElement_2_1_1.and(479, conditionElement_2_1_1_1);
        conditionElement_2_1.add(480, conditionElement_2_1_1);
        conditionElement_2.add(481, conditionElement_2_1);
        conditionElement_2.add(482, booleanData);
        conditionElement.add(483, conditionElement_2);

        // conditionBase = conditionElement | (s "(" s condition s ")")
        conditionBase.add(484, conditionElement);
        ElementList conditionBase_1 = new ElementList(485, "conditionBase_1");
        conditionBase_1.add(486, s);
        conditionBase_1.add(488, new Str(487, "("));
        conditionBase_1.add(489, s);
        conditionBase_1.add(490, condition);
        conditionBase_1.add(491, s);
        conditionBase_1.add(493, new Str(492, ")"));
        conditionBase.add(494, conditionBase_1);

        // conditionAnd = conditionBase [s "&&" s conditionBase]+
        conditionAnd.add(495, conditionBase);
        Optional conditionAnd_1 = new Optional(496, "conditionAnd_1");
        Repeat conditionAnd_1_1 = new Repeat(497, "conditionAnd_1_1");
        conditionAnd_1_1.add(498, s);
        conditionAnd_1_1.add(500, new Str(499, "&&"));
        conditionAnd_1_1.add(501, s);
        conditionAnd_1_1.add(502, conditionBase);
        conditionAnd_1.add(503, conditionAnd_1_1);
        conditionAnd.add(504, conditionAnd_1);

        // condition = conditionAnd [s "||" s conditionAnd]+
        condition.add(505, conditionAnd);
        Optional condition_1 = new Optional(506, "condition_1");
        Repeat condition_1_1 = new Repeat(507, "condition_1_1");
        condition_1_1.add(508, s);
        condition_1_1.add(510, new Str(509, "||"));
        condition_1_1.add(511, s);
        condition_1_1.add(512, conditionAnd);
        condition_1.add(513, condition_1_1);
        condition.add(514, condition_1);

        // ifcmd = "#if" s "(" s condition s ")" skip [block] [elseif]+ [else] end
        ifcmd.add(516, new Str(515, "#if"));
        ifcmd.add(517, s);
        ifcmd.add(519, new Str(518, "("));
        ifcmd.add(520, s);
        ifcmd.add(521, condition);
        ifcmd.add(522, s);
        ifcmd.add(524, new Str(523, ")"));
        ifcmd.add(525, skip);
        Optional ifcmd_1 = new Optional(526, "ifcmd_1");
        ifcmd_1.add(527, block);
        ifcmd.add(528, ifcmd_1);
        Optional ifcmd_2 = new Optional(529, "ifcmd_2");
        Repeat ifcmd_2_1 = new Repeat(530, "ifcmd_2_1");
        ifcmd_2_1.add(531, elseif);
        ifcmd_2.add(532, ifcmd_2_1);
        ifcmd.add(533, ifcmd_2);
        Optional ifcmd_3 = new Optional(534, "ifcmd_3");
        ifcmd_3.add(535, _else);
        ifcmd.add(536, ifcmd_3);
        ifcmd.add(537, end);

        // elseif = [spaces] "#else if" s "(" s condition s ")" skip [block]
        Optional elseif_1 = new Optional(538, "elseif_1");
        elseif_1.add(539, spaces);
        elseif.add(540, elseif_1);
        elseif.add(542, new Str(541, "#else if"));
        elseif.add(543, s);
        elseif.add(545, new Str(544, "("));
        elseif.add(546, s);
        elseif.add(547, condition);
        elseif.add(548, s);
        elseif.add(550, new Str(549, ")"));
        elseif.add(551, skip);
        Optional elseif_2 = new Optional(552, "elseif_2");
        elseif_2.add(553, block);
        elseif.add(554, elseif_2);

        // else = [spaces] "#else" skip [block]
        Optional else_1 = new Optional(555, "else_1");
        else_1.add(556, spaces);
        _else.add(557, else_1);
        _else.add(559, new Str(558, "#else"));
        _else.add(560, skip);
        Optional else_2 = new Optional(561, "else_2");
        else_2.add(562, block);
        _else.add(563, else_2);

        // whilecmd = "#while" s "(" s condition s ")" skip [block] end
        whilecmd.add(565, new Str(564, "#while"));
        whilecmd.add(566, s);
        whilecmd.add(568, new Str(567, "("));
        whilecmd.add(569, s);
        whilecmd.add(570, condition);
        whilecmd.add(571, s);
        whilecmd.add(573, new Str(572, ")"));
        whilecmd.add(574, skip);
        Optional whilecmd_1 = new Optional(575, "whilecmd_1");
        whilecmd_1.add(576, block);
        whilecmd.add(577, whilecmd_1);
        whilecmd.add(578, end);

        // call = :begin "#" callReference [ws "into" ws ("$" [varname]:targetNamespace)|varname:targetVariable] skip
        call.add(580, new Marker(579, "begin"));
        call.add(582, new Str(581, "#"));
        call.add(583, callReference);
        Optional call_1 = new Optional(584, "call_1");
        call_1.add(585, ws);
        call_1.add(587, new Str(586, "into"));
        call_1.add(588, ws);
        OrList call_1_1 = new OrList(589, "call_1_1");
        ElementList call_1_1_1 = new ElementList(590, "call_1_1_1");
        call_1_1_1.add(592, new Str(591, "$"));
        Optional call_1_1_1_1 = new Optional(593, "call_1_1_1_1");
        call_1_1_1_1.add(594, varname);
        call_1_1_1.add(595, call_1_1_1_1);
        call_1_1.add(596, call_1_1_1);
        call_1_1.add(597, varname);
        call_1.add(598, call_1_1);
        call.add(599, call_1);
        call.add(600, skip);

        // foreach =
        //   :begin "#foreach" s "(" varname:variable ws "in" ws listData|mapDataRef|reference s
        //   ["where" s condition s] ")" skip block end
        foreach.add(602, new Marker(601, "begin"));
        foreach.add(604, new Str(603, "#foreach"));
        foreach.add(605, s);
        foreach.add(607, new Str(606, "("));
        foreach.add(608, varname);
        foreach.add(609, ws);
        foreach.add(611, new Str(610, "in"));
        foreach.add(612, ws);
        OrList foreach_1 = new OrList(613, "foreach_1");
        foreach_1.add(614, listData);
        foreach_1.add(615, mapDataRef);
        foreach_1.add(616, reference);
        foreach.add(617, foreach_1);
        foreach.add(618, s);
        Optional foreach_2 = new Optional(619, "foreach_2");
        foreach_2.add(621, new Str(620, "where"));
        foreach_2.add(622, s);
        foreach_2.add(623, condition);
        foreach_2.add(624, s);
        foreach.add(625, foreach_2);
        foreach.add(627, new Str(626, ")"));
        foreach.add(628, skip);
        foreach.add(629, block);
        foreach.add(630, end);

        // importcmd = :begin "#import" ws stringExp:filename [ws "as text":asText] skip
        importcmd.add(632, new Marker(631, "begin"));
        importcmd.add(634, new Str(633, "#import"));
        importcmd.add(635, ws);
        importcmd.add(636, stringExp);
        Optional importcmd_1 = new Optional(637, "importcmd_1");
        importcmd_1.add(638, ws);
        importcmd_1.add(640, new Str(639, "as text"));
        importcmd.add(641, importcmd_1);
        importcmd.add(642, skip);

        // macro = :begin "#macro" ws varname:name s "(" s [varname:parameter [s "," s varname:parameter]+] s ")" skip [block] end
        macro.add(644, new Marker(643, "begin"));
        macro.add(646, new Str(645, "#macro"));
        macro.add(647, ws);
        macro.add(648, varname);
        macro.add(649, s);
        macro.add(651, new Str(650, "("));
        macro.add(652, s);
        Optional macro_1 = new Optional(653, "macro_1");
        macro_1.add(654, varname);
        Optional macro_1_1 = new Optional(655, "macro_1_1");
        Repeat macro_1_1_1 = new Repeat(656, "macro_1_1_1");
        macro_1_1_1.add(657, s);
        macro_1_1_1.add(659, new Str(658, ","));
        macro_1_1_1.add(660, s);
        macro_1_1_1.add(661, varname);
        macro_1_1.add(662, macro_1_1_1);
        macro_1.add(663, macro_1_1);
        macro.add(664, macro_1);
        macro.add(665, s);
        macro.add(667, new Str(666, ")"));
        macro.add(668, skip);
        Optional macro_2 = new Optional(669, "macro_2");
        macro_2.add(670, block);
        macro.add(671, macro_2);
        macro.add(672, end);

        // returncmd = [spaces] "#return" s ("(" s data s ")") | comparition|data skip
        Optional returncmd_1 = new Optional(673, "returncmd_1");
        returncmd_1.add(674, spaces);
        returncmd.add(675, returncmd_1);
        returncmd.add(677, new Str(676, "#return"));
        returncmd.add(678, s);
        OrList returncmd_2 = new OrList(679, "returncmd_2");
        ElementList returncmd_2_1 = new ElementList(680, "returncmd_2_1");
        returncmd_2_1.add(682, new Str(681, "("));
        returncmd_2_1.add(683, s);
        returncmd_2_1.add(684, data);
        returncmd_2_1.add(685, s);
        returncmd_2_1.add(687, new Str(686, ")"));
        returncmd_2.add(688, returncmd_2_1);
        returncmd_2.add(689, comparition);
        returncmd_2.add(690, data);
        returncmd.add(691, returncmd_2);
        returncmd.add(692, skip);

        // function = :begin "#function" ws varname:name s "(" s [varname:parameter [s "," s varname:parameter]+] s ")" skip [block] end
        function.add(694, new Marker(693, "begin"));
        function.add(696, new Str(695, "#function"));
        function.add(697, ws);
        function.add(698, varname);
        function.add(699, s);
        function.add(701, new Str(700, "("));
        function.add(702, s);
        Optional function_1 = new Optional(703, "function_1");
        function_1.add(704, varname);
        Optional function_1_1 = new Optional(705, "function_1_1");
        Repeat function_1_1_1 = new Repeat(706, "function_1_1_1");
        function_1_1_1.add(707, s);
        function_1_1_1.add(709, new Str(708, ","));
        function_1_1_1.add(710, s);
        function_1_1_1.add(711, varname);
        function_1_1.add(712, function_1_1_1);
        function_1.add(713, function_1_1);
        function.add(714, function_1);
        function.add(715, s);
        function.add(717, new Str(716, ")"));
        function.add(718, skip);
        Optional function_2 = new Optional(719, "function_2");
        function_2.add(720, block);
        function.add(721, function_2);
        function.add(722, end);

        // namespace = "#namespace" ws varname:name skip
        namespace.add(724, new Str(723, "#namespace"));
        namespace.add(725, ws);
        namespace.add(726, varname);
        namespace.add(727, skip);

        // error = :begin "#error" s "(" s stringExp:message s ")" skip
        error.add(729, new Marker(728, "begin"));
        error.add(731, new Str(730, "#error"));
        error.add(732, s);
        error.add(734, new Str(733, "("));
        error.add(735, s);
        error.add(736, stringExp);
        error.add(737, s);
        error.add(739, new Str(738, ")"));
        error.add(740, skip);

        // command = [spaces] local|set|write|ifcmd|whilecmd|foreach|importcmd|error|macro|function|call
        Optional command_1 = new Optional(741, "command_1");
        command_1.add(742, spaces);
        command.add(743, command_1);
        OrList command_2 = new OrList(744, "command_2");
        command_2.add(745, local);
        command_2.add(746, set);
        command_2.add(747, write);
        command_2.add(748, ifcmd);
        command_2.add(749, whilecmd);
        command_2.add(750, foreach);
        command_2.add(751, importcmd);
        command_2.add(752, error);
        command_2.add(753, macro);
        command_2.add(754, function);
        command_2.add(755, call);
        command.add(756, command_2);

        // astext = "#>" [!"<#"+]:text "<#"
        astext.add(758, new Str(757, "#>"));
        Optional astext_1 = new Optional(759, "astext_1");
        Repeat astext_1_1 = new Repeat(760, "astext_1_1");
        astext_1_1.add(762, new Str(761, "<#", NOT));
        astext_1.add(763, astext_1_1);
        astext.add(764, astext_1);
        astext.add(766, new Str(765, "<#"));

        // text = !(([spaces] "##"|"#*"|"#>"|("#" (letter | "$"))) | stringref)+
        OrList text_1 = new OrList(767, "text_1");
        ElementList text_1_1 = new ElementList(768, "text_1_1");
        Optional text_1_1_1 = new Optional(769, "text_1_1_1");
        text_1_1_1.add(770, spaces);
        text_1_1.add(771, text_1_1_1);
        OrList text_1_1_2 = new OrList(772, "text_1_1_2");
        text_1_1_2.add(774, new Str(773, "##"));
        text_1_1_2.add(776, new Str(775, "#*"));
        text_1_1_2.add(778, new Str(777, "#>"));
        ElementList text_1_1_2_1 = new ElementList(779, "text_1_1_2_1");
        text_1_1_2_1.add(781, new Str(780, "#"));
        OrList text_1_1_2_1_1 = new OrList(782, "text_1_1_2_1_1");
        text_1_1_2_1_1.add(783, letter);
        text_1_1_2_1_1.add(785, new Str(784, "$"));
        text_1_1_2_1.add(786, text_1_1_2_1_1);
        text_1_1_2.add(787, text_1_1_2_1);
        text_1_1.add(788, text_1_1_2);
        text_1.add(789, text_1_1);
        text_1.add(790, stringref);
        text.add(791, text_1, NOT);
View Full Code Here

Examples of net.sf.laja.parser.engine2.element.ElementList

        Range digit = new Range(5, "digit", "0", "9");
        Repeat integer = new Repeat(6, "integer");
        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");
        ElementList reference = new ElementList(14, "reference");
        ElementList variable = new ElementList(15, "variable");
        OrList range1 = new OrList(16, "range1");
        ElementList range = new ElementList(17, "range");
        Str end = new Str(18, "END");
        Str complete = new Str(19, "*");
        ElementList repeats = new ElementList(20, "repeats");
        ElementList valx = new ElementList(21, "valx");
        ElementList marker = new ElementList(22, "marker");
        ElementList valprim = new ElementList(23, "valprim");
        ElementList valpar = new ElementList(24, "valpar");
        ElementList valor = new ElementList(25, "valor");
        ElementList valopt = new ElementList(26, "valopt");
        ElementList valand = new ElementList(27, "valand");
        Repeat valstmt = new Repeat(28, "valstmt");
        ElementList val = new ElementList(29, "val");
        ElementList def = new ElementList(30, "def");
        ElementList classvar = new ElementList(31, "classvar");
        ElementList constructor = new ElementList(32, "constructor");
        ElementList outputclass = new ElementList(33, "outputclass");
        ElementList omarg = new ElementList(34, "omarg");
        ElementList outputmethod = new ElementList(35, "outputmethod");
        ElementList outputvar = new ElementList(36, "outputvar");
        ElementList grammar = new ElementList(37, "grammar");

        // *** Statements ***

        // newline = "\r\n" | "\n"
        newline.add(39, new Str(38, "\r\n"));
        newline.add(41, new Str(40, "\n"));

        // comment = ("/*" [(comment | !"*/")+] "*/") | ("//" [!newline+] newline|END)
        ElementList comment_1 = new ElementList(42, "comment_1");
        comment_1.add(44, new Str(43, "/*"));
        Optional comment_1_1 = new Optional(45, "comment_1_1");
        Repeat comment_1_1_1 = new Repeat(46, "comment_1_1_1");
        OrList comment_1_1_1_1 = new OrList(47, "comment_1_1_1_1");
        comment_1_1_1_1.add(48, comment);
        comment_1_1_1_1.add(50, new Str(49, "*/", NOT));
        comment_1_1_1.add(51, comment_1_1_1_1);
        comment_1_1.add(52, comment_1_1_1);
        comment_1.add(53, comment_1_1);
        comment_1.add(55, new Str(54, "*/"));
        comment.add(56, comment_1);
        ElementList comment_2 = new ElementList(57, "comment_2");
        comment_2.add(59, new Str(58, "//"));
        Optional comment_2_1 = new Optional(60, "comment_2_1");
        Repeat comment_2_1_1 = new Repeat(61, "comment_2_1_1");
        comment_2_1_1.add(62, newline, NOT);
        comment_2_1.add(63, comment_2_1_1);
        comment_2.add(64, comment_2_1);
        OrList comment_2_2 = new OrList(65, "comment_2_2");
        comment_2_2.add(66, newline);
        comment_2_2.add(68, new End(67, "comment_2_2"));
        comment_2.add(69, comment_2_2);
        comment.add(70, comment_2);

        // ws = (newline | " " | "\t" | comment)+
        OrList ws_1 = new OrList(71, "ws_1");
        ws_1.add(72, newline);
        ws_1.add(74, new Str(73, " "));
        ws_1.add(76, new Str(75, "\t"));
        ws_1.add(77, comment);
        ws.add(78, ws_1);

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

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

        // integer = digit+
        integer.add(80, digit);

        // lower = "a".."z"

        // upper = "A".."Z"

        // xname = [lower|upper|digit]+
        Repeat xname_1 = new Repeat(81, "xname_1");
        OrList xname_1_1 = new OrList(82, "xname_1_1");
        xname_1_1.add(83, lower);
        xname_1_1.add(84, upper);
        xname_1_1.add(85, digit);
        xname_1.add(86, xname_1_1);
        xname.add(87, xname_1);

        // lname = lower xname
        lname.add(88, lower);
        lname.add(89, xname);

        // uname = upper xname
        uname.add(90, upper);
        uname.add(91, xname);

        // ff = "\""

        // str = ff (("\\\"" | !(ff|newline))+):strval ff
        str.add(92, ff);
        Repeat str_1 = new Repeat(93, "str_1");
        OrList str_1_1 = new OrList(94, "str_1_1");
        str_1_1.add(96, new Str(95, "\\\""));
        OrList str_1_1_1 = new OrList(97, "str_1_1_1", NOT);
        str_1_1_1.add(98, ff);
        str_1_1_1.add(99, newline);
        str_1_1.add(100, str_1_1_1);
        str_1.add(101, str_1_1);
        str.add(102, str_1);
        str.add(103, ff);

        // reference = lname
        reference.add(104, lname);

        // variable = "$" lname:name
        variable.add(106, new Str(105, "$"));
        variable.add(107, lname);

        // range1 = integer|str
        range1.add(108, integer);
        range1.add(109, str);

        // range = range1 ".." range1
        range.add(110, range1);
        range.add(112, new Str(111, ".."));
        range.add(113, range1);

        // end = "END"

        // complete = "*"

        // repeats = "#" integer:min [".." (integer|"*"):max]
        repeats.add(115, new Str(114, "#"));
        repeats.add(116, integer);
        Optional repeats_1 = new Optional(117, "repeats_1");
        repeats_1.add(119, new Str(118, ".."));
        OrList repeats_1_1 = new OrList(120, "repeats_1_1");
        repeats_1_1.add(121, integer);
        repeats_1_1.add(123, new Str(122, "*"));
        repeats_1.add(124, repeats_1_1);
        repeats.add(125, repeats_1);

        // valx = [":" lname:varname] ["+":repeat|repeats [":" lname:repeatName]]
        Optional valx_1 = new Optional(126, "valx_1");
        valx_1.add(128, new Str(127, ":"));
        valx_1.add(129, lname);
        valx.add(130, valx_1);
        Optional valx_2 = new Optional(131, "valx_2");
        OrList valx_2_1 = new OrList(132, "valx_2_1");
        valx_2_1.add(134, new Str(133, "+"));
        valx_2_1.add(135, repeats);
        valx_2.add(136, valx_2_1);
        Optional valx_2_2 = new Optional(137, "valx_2_2");
        valx_2_2.add(139, new Str(138, ":"));
        valx_2_2.add(140, lname);
        valx_2.add(141, valx_2_2);
        valx.add(142, valx_2);

        // marker = ":" lname:name
        marker.add(144, new Str(143, ":"));
        marker.add(145, lname);

        // valprim = s ["!":not s] range|integer|str|reference|variable|complete|end valx
        valprim.add(146, s);
        Optional valprim_1 = new Optional(147, "valprim_1");
        valprim_1.add(149, new Str(148, "!"));
        valprim_1.add(150, s);
        valprim.add(151, valprim_1);
        OrList valprim_2 = new OrList(152, "valprim_2");
        valprim_2.add(153, range);
        valprim_2.add(154, integer);
        valprim_2.add(155, str);
        valprim_2.add(156, reference);
        valprim_2.add(157, variable);
        valprim_2.add(158, complete);
        valprim_2.add(159, end);
        valprim.add(160, valprim_2);
        valprim.add(161, valx);

        // valpar = s ["!":not s] ["CS":cs|"CI":ci s] "(" s val s ")" valx
        valpar.add(162, s);
        Optional valpar_1 = new Optional(163, "valpar_1");
        valpar_1.add(165, new Str(164, "!"));
        valpar_1.add(166, s);
        valpar.add(167, valpar_1);
        Optional valpar_2 = new Optional(168, "valpar_2");
        OrList valpar_2_1 = new OrList(169, "valpar_2_1");
        valpar_2_1.add(171, new Str(170, "CS"));
        valpar_2_1.add(173, new Str(172, "CI"));
        valpar_2.add(174, valpar_2_1);
        valpar_2.add(175, s);
        valpar.add(176, valpar_2);
        valpar.add(178, new Str(177, "("));
        valpar.add(179, s);
        valpar.add(180, val);
        valpar.add(181, s);
        valpar.add(183, new Str(182, ")"));
        valpar.add(184, valx);

        // valor = s valprim|valpar [s "|" s valprim|valpar]+
        valor.add(185, s);
        OrList valor_1 = new OrList(186, "valor_1");
        valor_1.add(187, valprim);
        valor_1.add(188, valpar);
        valor.add(189, valor_1);
        Optional valor_2 = new Optional(190, "valor_2");
        Repeat valor_2_1 = new Repeat(191, "valor_2_1");
        valor_2_1.add(192, s);
        valor_2_1.add(194, new Str(193, "|"));
        valor_2_1.add(195, s);
        OrList valor_2_1_1 = new OrList(196, "valor_2_1_1");
        valor_2_1_1.add(197, valprim);
        valor_2_1_1.add(198, valpar);
        valor_2_1.add(199, valor_2_1_1);
        valor_2.add(200, valor_2_1);
        valor.add(201, valor_2);

        // valopt = s "[" s val s "]" valx
        valopt.add(202, s);
        valopt.add(204, new Str(203, "["));
        valopt.add(205, s);
        valopt.add(206, val);
        valopt.add(207, s);
        valopt.add(209, new Str(208, "]"));
        valopt.add(210, valx);

        // valand = valor:mainAnd s "&" s valor|valopt [s "&" s valor|valopt]+
        valand.add(211, valor);
        valand.add(212, s);
        valand.add(214, new Str(213, "&"));
        valand.add(215, s);
        OrList valand_1 = new OrList(216, "valand_1");
        valand_1.add(217, valor);
        valand_1.add(218, valopt);
        valand.add(219, valand_1);
        Optional valand_2 = new Optional(220, "valand_2");
        Repeat valand_2_1 = new Repeat(221, "valand_2_1");
        valand_2_1.add(222, s);
        valand_2_1.add(224, new Str(223, "&"));
        valand_2_1.add(225, s);
        OrList valand_2_1_1 = new OrList(226, "valand_2_1_1");
        valand_2_1_1.add(227, valor);
        valand_2_1_1.add(228, valopt);
        valand_2_1.add(229, valand_2_1_1);
        valand_2.add(230, valand_2_1);
        valand.add(231, valand_2);

        // valstmt = (s valand|valor|valopt|marker)+
        valstmt.add(232, s);
        OrList valstmt_1 = new OrList(233, "valstmt_1");
        valstmt_1.add(234, valand);
        valstmt_1.add(235, valor);
        valstmt_1.add(236, valopt);
        valstmt_1.add(237, marker);
        valstmt.add(238, valstmt_1);

        // val = valstmt [s 92 s valstmt:followedby]
        val.add(239, valstmt);
        Optional val_1 = new Optional(240, "val_1");
        val_1.add(241, s);
        val_1.add(243, new Chr(242, (char)92));
        val_1.add(244, s);
        val_1.add(245, valstmt);
        val.add(246, val_1);

        // def = lname:var s "=" s val s ";"
        def.add(247, lname);
        def.add(248, s);
        def.add(250, new Str(249, "="));
        def.add(251, s);
        def.add(252, val);
        def.add(253, s);
        def.add(255, new Str(254, ";"));

        // classvar = uname:class ws lname:var
        classvar.add(256, uname);
        classvar.add(257, ws);
        classvar.add(258, lname);

        // constructor = "(" s classvar s ["," s classvar s]+ ")"
        constructor.add(260, new Str(259, "("));
        constructor.add(261, s);
        constructor.add(262, classvar);
        constructor.add(263, s);
        Optional constructor_1 = new Optional(264, "constructor_1");
        Repeat constructor_1_1 = new Repeat(265, "constructor_1_1");
        constructor_1_1.add(267, new Str(266, ","));
        constructor_1_1.add(268, s);
        constructor_1_1.add(269, classvar);
        constructor_1_1.add(270, s);
        constructor_1.add(271, constructor_1_1);
        constructor.add(272, constructor_1);
        constructor.add(274, new Str(273, ")"));

        // outputclass = uname:class [constructor] ws lname:var s ";"
        outputclass.add(275, uname);
        Optional outputclass_1 = new Optional(276, "outputclass_1");
        outputclass_1.add(277, constructor);
        outputclass.add(278, outputclass_1);
        outputclass.add(279, ws);
        outputclass.add(280, lname);
        outputclass.add(281, s);
        outputclass.add(283, new Str(282, ";"));

        // omarg = s "," s "String":str | "Index":index ws lname:arg
        omarg.add(284, s);
        omarg.add(286, new Str(285, ","));
        omarg.add(287, s);
        OrList omarg_1 = new OrList(288, "omarg_1");
        omarg_1.add(290, new Str(289, "String"));
        omarg_1.add(292, new Str(291, "Index"));
        omarg.add(293, omarg_1);
        omarg.add(294, ws);
        omarg.add(295, lname);

        // outputmethod =
        //   [uname:class [constructor] ws] ["$":setter ws] lname:ref "." lname:method s "(" s
        //   (("void":void ws) | ("String":str ws) | ("Index":index ws) | (uname:argclass ws)
        //   [lname:carg "."] (lname|"*"):arg)
        //   [omarg+] s ")" s ";"
        Optional outputmethod_1 = new Optional(296, "outputmethod_1");
        outputmethod_1.add(297, uname);
        Optional outputmethod_1_1 = new Optional(298, "outputmethod_1_1");
        outputmethod_1_1.add(299, constructor);
        outputmethod_1.add(300, outputmethod_1_1);
        outputmethod_1.add(301, ws);
        outputmethod.add(302, outputmethod_1);
        Optional outputmethod_2 = new Optional(303, "outputmethod_2");
        outputmethod_2.add(305, new Str(304, "$"));
        outputmethod_2.add(306, ws);
        outputmethod.add(307, outputmethod_2);
        outputmethod.add(308, lname);
        outputmethod.add(310, new Str(309, "."));
        outputmethod.add(311, lname);
        outputmethod.add(312, s);
        outputmethod.add(314, new Str(313, "("));
        outputmethod.add(315, s);
        ElementList outputmethod_3 = new ElementList(316, "outputmethod_3");
        OrList outputmethod_3_1 = new OrList(317, "outputmethod_3_1");
        ElementList outputmethod_3_1_1 = new ElementList(318, "outputmethod_3_1_1");
        outputmethod_3_1_1.add(320, new Str(319, "void"));
        outputmethod_3_1_1.add(321, ws);
        outputmethod_3_1.add(322, outputmethod_3_1_1);
        ElementList outputmethod_3_1_2 = new ElementList(323, "outputmethod_3_1_2");
        outputmethod_3_1_2.add(325, new Str(324, "String"));
        outputmethod_3_1_2.add(326, ws);
        outputmethod_3_1.add(327, outputmethod_3_1_2);
        ElementList outputmethod_3_1_3 = new ElementList(328, "outputmethod_3_1_3");
        outputmethod_3_1_3.add(330, new Str(329, "Index"));
        outputmethod_3_1_3.add(331, ws);
        outputmethod_3_1.add(332, outputmethod_3_1_3);
        ElementList outputmethod_3_1_4 = new ElementList(333, "outputmethod_3_1_4");
        outputmethod_3_1_4.add(334, uname);
        outputmethod_3_1_4.add(335, ws);
        outputmethod_3_1.add(336, outputmethod_3_1_4);
        outputmethod_3.add(337, outputmethod_3_1);
        Optional outputmethod_3_2 = new Optional(338, "outputmethod_3_2");
        outputmethod_3_2.add(339, lname);
        outputmethod_3_2.add(341, new Str(340, "."));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.