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