📄 sample.lex.java
字号:
/* 35 */ YY_NO_ANCHOR,
/* 36 */ YY_NOT_ACCEPT,
/* 37 */ YY_NO_ANCHOR,
/* 38 */ YY_NO_ANCHOR,
/* 39 */ YY_NO_ANCHOR,
/* 40 */ YY_NO_ANCHOR,
/* 41 */ YY_NOT_ACCEPT,
/* 42 */ YY_NO_ANCHOR,
/* 43 */ YY_NO_ANCHOR,
/* 44 */ YY_NO_ANCHOR,
/* 45 */ YY_NOT_ACCEPT,
/* 46 */ YY_NO_ANCHOR
};
private int yy_cmap[] = unpackFromString(1,130,
"28:8,20:2,21,28:2,22,28:18,20,28,23,28:3,18,28,4,5,13,11,1,12,10,14,25:10,2" +
",3,16,15,17,28:2,26:26,6,24,7,28,27,28,26:26,8,19,9,28:2,0:2")[0];
private int yy_rmap[] = unpackFromString(1,47,
"0,1:2,2,1:11,3,1,4,5,1:2,6,7,1,8,9,1:6,10,1:3,11,12,13,7,14,15,16,17,18,19," +
"20")[0];
private int yy_nxt[][] = unpackFromString(21,29,
"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21:2,-1,22,23,24,25,23:2" +
",-1:44,26,-1:26,27,-1:30,28,-1,29,-1:26,30,-1:33,21:2,-1:8,22:20,-1,22,31,3" +
"7,22:4,-1:25,24,-1:28,25:3,-1,1,40:12,38,43,40:6,33,40:7,-1:20,36:2,-1:2,22" +
",-1:5,22:19,42,36,22,39,37,22:4,-1,40:12,44,34,40:6,-1,40:7,-1,40:12,41,45," +
"40:6,-1,40:7,-1,40:12,44,-1,40:6,-1,40:7,-1,22:19,42,36,22,31,37,22:4,-1,40" +
":12,35,46,40:6,-1,40:7,-1,40:12,44,45,40:6,-1,40:7,-1,40:12,-1,46,40:6,-1,4" +
"0:7,-1,40:12,41,46,40:6,-1,40:7");
public Yytoken yylex ()
throws java.io.IOException {
int yy_lookahead;
int yy_anchor = YY_NO_ANCHOR;
int yy_state = yy_state_dtrans[yy_lexical_state];
int yy_next_state = YY_NO_STATE;
int yy_last_accept_state = YY_NO_STATE;
boolean yy_initial = true;
int yy_this_accept;
yy_mark_start();
yy_this_accept = yy_acpt[yy_state];
if (YY_NOT_ACCEPT != yy_this_accept) {
yy_last_accept_state = yy_state;
yy_mark_end();
}
while (true) {
if (yy_initial && yy_at_bol) yy_lookahead = YY_BOL;
else yy_lookahead = yy_advance();
yy_next_state = YY_F;
yy_next_state = yy_nxt[yy_rmap[yy_state]][yy_cmap[yy_lookahead]];
if (YY_EOF == yy_lookahead && true == yy_initial) {
return null;
}
if (YY_F != yy_next_state) {
yy_state = yy_next_state;
yy_initial = false;
yy_this_accept = yy_acpt[yy_state];
if (YY_NOT_ACCEPT != yy_this_accept) {
yy_last_accept_state = yy_state;
yy_mark_end();
}
}
else {
if (YY_NO_STATE == yy_last_accept_state) {
throw (new Error("Lexical Error: Unmatched Input."));
}
else {
yy_anchor = yy_acpt[yy_last_accept_state];
if (0 != (YY_END & yy_anchor)) {
yy_move_end();
}
yy_to_mark();
switch (yy_last_accept_state) {
case 1:
case -2:
break;
case 2:
{ return (new Yytoken(0,yytext(),yyline,yychar,yychar+1)); }
case -3:
break;
case 3:
{ return (new Yytoken(1,yytext(),yyline,yychar,yychar+1)); }
case -4:
break;
case 4:
{ return (new Yytoken(2,yytext(),yyline,yychar,yychar+1)); }
case -5:
break;
case 5:
{ return (new Yytoken(3,yytext(),yyline,yychar,yychar+1)); }
case -6:
break;
case 6:
{ return (new Yytoken(4,yytext(),yyline,yychar,yychar+1)); }
case -7:
break;
case 7:
{ return (new Yytoken(5,yytext(),yyline,yychar,yychar+1)); }
case -8:
break;
case 8:
{ return (new Yytoken(6,yytext(),yyline,yychar,yychar+1)); }
case -9:
break;
case 9:
{ return (new Yytoken(7,yytext(),yyline,yychar,yychar+1)); }
case -10:
break;
case 10:
{ return (new Yytoken(8,yytext(),yyline,yychar,yychar+1)); }
case -11:
break;
case 11:
{ return (new Yytoken(9,yytext(),yyline,yychar,yychar+1)); }
case -12:
break;
case 12:
{ return (new Yytoken(10,yytext(),yyline,yychar,yychar+1)); }
case -13:
break;
case 13:
{ return (new Yytoken(11,yytext(),yyline,yychar,yychar+1)); }
case -14:
break;
case 14:
{ return (new Yytoken(12,yytext(),yyline,yychar,yychar+1)); }
case -15:
break;
case 15:
{ return (new Yytoken(13,yytext(),yyline,yychar,yychar+1)); }
case -16:
break;
case 16:
{ return (new Yytoken(14,yytext(),yyline,yychar,yychar+1)); }
case -17:
break;
case 17:
{ return (new Yytoken(16,yytext(),yyline,yychar,yychar+1)); }
case -18:
break;
case 18:
{ return (new Yytoken(18,yytext(),yyline,yychar,yychar+1)); }
case -19:
break;
case 19:
{ return (new Yytoken(20,yytext(),yyline,yychar,yychar+1)); }
case -20:
break;
case 20:
{ return (new Yytoken(21,yytext(),yyline,yychar,yychar+1)); }
case -21:
break;
case 21:
{ }
case -22:
break;
case 22:
{ String str = yytext().substring(1,yytext().length()); Utility.error(Utility.E_UNCLOSEDSTR); Utility.Jassert(str.length() == yytext().length() - 1); return (new Yytoken(41,str,yyline,yychar,yychar + str.length()));}
case -23:
break;
case 23:
{ System.out.println("Illegal character: <" + yytext() + ">"); Utility.error(Utility.E_UNMATCHED);}
case -24:
break;
case 24:
{ return (new Yytoken(42,yytext(),yyline,yychar,yychar + yytext().length()));}
case -25:
break;
case 25:
{ return (new Yytoken(43,yytext(),yyline,yychar,yychar + yytext().length()));}
case -26:
break;
case 26:
{ return (new Yytoken(22,yytext(),yyline,yychar,yychar+2)); }
case -27:
break;
case 27:
{ yybegin(COMMENT); comment_count = comment_count + 1; }
case -28:
break;
case 28:
{ return (new Yytoken(17,yytext(),yyline,yychar,yychar+2)); }
case -29:
break;
case 29:
{ return (new Yytoken(15,yytext(),yyline,yychar,yychar+2)); }
case -30:
break;
case 30:
{ return (new Yytoken(19,yytext(),yyline,yychar,yychar+2)); }
case -31:
break;
case 31:
{ String str = yytext().substring(1,yytext().length() - 1); Utility.Jassert(str.length() == yytext().length() - 2); return (new Yytoken(40,str,yyline,yychar,yychar + str.length()));}
case -32:
break;
case 32:
{ }
case -33:
break;
case 33:
{ }
case -34:
break;
case 34:
{ comment_count = comment_count - 1; Utility.Jassert(comment_count >= 0); if (comment_count == 0) { yybegin(YYINITIAL); }}
case -35:
break;
case 35:
{ comment_count = comment_count + 1; }
case -36:
break;
case 37:
{ String str = yytext().substring(1,yytext().length()); Utility.error(Utility.E_UNCLOSEDSTR); Utility.Jassert(str.length() == yytext().length() - 1); return (new Yytoken(41,str,yyline,yychar,yychar + str.length()));}
case -37:
break;
case 38:
{ System.out.println("Illegal character: <" + yytext() + ">"); Utility.error(Utility.E_UNMATCHED);}
case -38:
break;
case 39:
{ String str = yytext().substring(1,yytext().length() - 1); Utility.Jassert(str.length() == yytext().length() - 2); return (new Yytoken(40,str,yyline,yychar,yychar + str.length()));}
case -39:
break;
case 40:
{ }
case -40:
break;
case 42:
{ String str = yytext().substring(1,yytext().length()); Utility.error(Utility.E_UNCLOSEDSTR); Utility.Jassert(str.length() == yytext().length() - 1); return (new Yytoken(41,str,yyline,yychar,yychar + str.length()));}
case -41:
break;
case 43:
{ System.out.println("Illegal character: <" + yytext() + ">"); Utility.error(Utility.E_UNMATCHED);}
case -42:
break;
case 44:
{ }
case -43:
break;
case 46:
{ }
case -44:
break;
default:
yy_error(YY_E_INTERNAL,false);
case -1:
}
yy_initial = true;
yy_state = yy_state_dtrans[yy_lexical_state];
yy_next_state = YY_NO_STATE;
yy_last_accept_state = YY_NO_STATE;
yy_mark_start();
yy_this_accept = yy_acpt[yy_state];
if (YY_NOT_ACCEPT != yy_this_accept) {
yy_last_accept_state = yy_state;
yy_mark_end();
}
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -