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

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


        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"));

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


        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"));

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

        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

        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

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

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

    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

    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

        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

        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

TOP

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

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.