Package net.sf.laja.parser.engine2.element

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


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


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

    // t313 = t313a#2
    t313.add(198, t313a, testcaseT313T313a);

    // t411 = :x a :y
    t411.add(200, new Marker(199, "x", testcaseT411X));
    t411.add(201, a, testcaseT411A);
    t411.add(203, new Marker(202, "y", testcaseT411Y));

    // t511a = a+
    t511a.add(204, a);

    // t511 = t511a "." $x
View Full Code Here

    // t313 = t313a#2
    t313.add(198, t313a);

    // t411 = :x a :y
    t411.add(200, new Marker(199, "x"));
    t411.add(201, a);
    t411.add(203, new Marker(202, "y"));

    // t511a = a+
    t511a.add(204, a);

    // t511 = t511a "." $x
View Full Code Here

        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

        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

    // *** Declarations and Statements ***
    OrList cr = new OrList(1, "cr");
    OrList comment = new OrList(2, "comment");
    Repeat ws = new Repeat(3, "ws");
    Optional s = new Optional(4, "s");
    Str a = new Str(5, "a");
    Str b = new Str(6, "b");
    Str c = new Str(7, "c");
    Str d = new Str(8, "d");
    Str ab = new Str(9, "ab");
    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");
    t143_1_1.add(141, ab, testcaseT143Notab);
    t143_1.add(142, t143_1_1, NOT, testcaseT143X);
    t143.add(143, t143_1);
    t143.add(144, ab, testcaseT143Ab);

    // t144 = !(!a+):x+
    Repeat t144_1 = new Repeat(145, "t144_1");
    t144_1.add(146, a, NOT, testcaseT144A);
    t144.add(147, t144_1, NOT, testcaseT144X);

    // t151 = [ab]
    t151.add(148, ab, testcaseT151Ab);

    // t152 = [!ab:notab] ab
    Optional t152_1 = new Optional(149, "t152_1");
    t152_1.add(150, ab, NOT, testcaseT152Notab);
    t152.add(151, t152_1);
    t152.add(152, ab);

    // t153 = [ab+]
    Repeat t153_1 = new Repeat(153, "t153_1");
    t153_1.add(154, ab, testcaseT153Ab);
    t153.add(155, t153_1);

    // t154 = [!ab:notab+] ab
    Optional t154_1 = new Optional(156, "t154_1");
    Repeat t154_1_1 = new Repeat(157, "t154_1_1");
    t154_1_1.add(158, ab, NOT, testcaseT154Notab);
    t154_1.add(159, t154_1_1);
    t154.add(160, t154_1);
    t154.add(161, ab);

    // t161 = [ab]+
    Repeat t161_1 = new Repeat(162, "t161_1");
    t161_1.add(163, ab, testcaseT161Ab);
    t161.add(164, t161_1);

    // t162 = [!ab:notab]+ ab
    Optional t162_1 = new Optional(165, "t162_1");
    Repeat t162_1_1 = new Repeat(166, "t162_1_1");
    t162_1_1.add(167, ab, NOT, testcaseT162Notab);
    t162_1.add(168, t162_1_1);
    t162.add(169, t162_1);
    t162.add(170, ab);

    // t163 = [ab+]+
    Repeat t163_1 = new Repeat(171, "t163_1");
    Repeat t163_1_1 = new Repeat(172, "t163_1_1");
    t163_1_1.add(173, ab, testcaseT163Ab);
    t163_1.add(174, t163_1_1);
    t163.add(175, t163_1);

    // t164 = [!ab:notab+]+ ab
    Optional t164_1 = new Optional(176, "t164_1");
    Repeat t164_1_1 = new Repeat(177, "t164_1_1");
    Repeat t164_1_1_1 = new Repeat(178, "t164_1_1_1");
    t164_1_1_1.add(179, ab, NOT, testcaseT164Notab);
    t164_1_1.add(180, t164_1_1_1);
    t164_1.add(181, t164_1_1);
    t164.add(182, t164_1);
    t164.add(183, ab);

    // t165 = [ab]:x
    t165.add(184, ab);
View Full Code Here

    // *** Declarations and Statements ***
    OrList cr = new OrList(1, "cr");
    OrList comment = new OrList(2, "comment");
    Repeat ws = new Repeat(3, "ws");
    Optional s = new Optional(4, "s");
    Str a = new Str(5, "a");
    Str b = new Str(6, "b");
    Str c = new Str(7, "c");
    Str d = new Str(8, "d");
    Str ab = new Str(9, "ab");
    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");
    t143_1_1.add(141, ab);
    t143_1.add(142, t143_1_1, NOT);
    t143.add(143, t143_1);
    t143.add(144, ab);

    // t144 = !(!a+):x+
    Repeat t144_1 = new Repeat(145, "t144_1");
    t144_1.add(146, a, NOT);
    t144.add(147, t144_1, NOT);

    // t151 = [ab]
    t151.add(148, ab);

    // t152 = [!ab:notab] ab
    Optional t152_1 = new Optional(149, "t152_1");
    t152_1.add(150, ab, NOT);
    t152.add(151, t152_1);
    t152.add(152, ab);

    // t153 = [ab+]
    Repeat t153_1 = new Repeat(153, "t153_1");
    t153_1.add(154, ab);
    t153.add(155, t153_1);

    // t154 = [!ab:notab+] ab
    Optional t154_1 = new Optional(156, "t154_1");
    Repeat t154_1_1 = new Repeat(157, "t154_1_1");
    t154_1_1.add(158, ab, NOT);
    t154_1.add(159, t154_1_1);
    t154.add(160, t154_1);
    t154.add(161, ab);

    // t161 = [ab]+
    Repeat t161_1 = new Repeat(162, "t161_1");
    t161_1.add(163, ab);
    t161.add(164, t161_1);

    // t162 = [!ab:notab]+ ab
    Optional t162_1 = new Optional(165, "t162_1");
    Repeat t162_1_1 = new Repeat(166, "t162_1_1");
    t162_1_1.add(167, ab, NOT);
    t162_1.add(168, t162_1_1);
    t162.add(169, t162_1);
    t162.add(170, ab);

    // t163 = [ab+]+
    Repeat t163_1 = new Repeat(171, "t163_1");
    Repeat t163_1_1 = new Repeat(172, "t163_1_1");
    t163_1_1.add(173, ab);
    t163_1.add(174, t163_1_1);
    t163.add(175, t163_1);

    // t164 = [!ab:notab+]+ ab
    Optional t164_1 = new Optional(176, "t164_1");
    Repeat t164_1_1 = new Repeat(177, "t164_1_1");
    Repeat t164_1_1_1 = new Repeat(178, "t164_1_1_1");
    t164_1_1_1.add(179, ab, NOT);
    t164_1_1.add(180, t164_1_1_1);
    t164_1.add(181, t164_1_1);
    t164.add(182, t164_1);
    t164.add(183, ab);

    // t165 = [ab]:x
    t165.add(184, ab);
View Full Code Here

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

        // *** Statements ***

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

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

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

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

        // ff = "\""

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

View Full Code Here

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

        // *** Statements ***

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

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

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

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

        // ff = "\""

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

View Full Code Here

TOP

Related Classes of net.sf.laja.parser.engine2.element.FollowedBy

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