stdclexer.java
来自「plugin for eclipse」· Java 代码 · 共 2,450 行 · 第 1/5 页
JAVA
2,450 行
if ( inputState.guessing==0 ) {
lineObject.setEnteringFile(true);
}
}
else if (((LA(1) >= '\u0000' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop1691:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0000' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop1691;
}
} while (true);
}
{
if ((LA(1)=='2') && ((LA(2) >= '\u0000' && LA(2) <= '\u00ff')) && (true)) {
match("2");
if ( inputState.guessing==0 ) {
lineObject.setReturningToFile(true);
}
}
else if (((LA(1) >= '\u0000' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop1694:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0000' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop1694;
}
} while (true);
}
{
if ((LA(1)=='3') && ((LA(2) >= '\u0000' && LA(2) <= '\u00ff')) && (true)) {
match("3");
if ( inputState.guessing==0 ) {
lineObject.setSystemHeader(true);
}
}
else if (((LA(1) >= '\u0000' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop1697:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0000' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop1697;
}
} while (true);
}
{
if ((LA(1)=='4') && ((LA(2) >= '\u0000' && LA(2) <= '\u00ff')) && (true)) {
match("4");
if ( inputState.guessing==0 ) {
lineObject.setTreatAsC(true);
}
}
else if (((LA(1) >= '\u0000' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop1701:
do {
if ((_tokenSet_8.member(LA(1)))) {
{
match(_tokenSet_8);
}
}
else {
break _loop1701;
}
} while (true);
}
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
}
else if ((LA(1)=='\r') && (true)) {
match("\r");
}
else if ((LA(1)=='\n')) {
match("\n");
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
preprocessorInfoChannel.addLineForTokenNumber(new LineObject(lineObject), new Integer(tokenNumber));
countingTokens = oldCountingTokens;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mSpace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Space;
int _saveIndex;
{
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNumber(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Number;
int _saveIndex;
boolean synPredMatched1747 = false;
if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_9.member(LA(2))) && (true))) {
int _m1747 = mark();
synPredMatched1747 = true;
inputState.guessing++;
try {
{
{
int _cnt1745=0;
_loop1745:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt1745>=1 ) { break _loop1745; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt1745++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
break;
}
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
}
catch (RecognitionException pe) {
synPredMatched1747 = false;
}
rewind(_m1747);
inputState.guessing--;
}
if ( synPredMatched1747 ) {
{
int _cnt1749=0;
_loop1749:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt1749>=1 ) { break _loop1749; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt1749++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
{
_loop1752:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop1752;
}
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
break;
}
case 'E': case 'e':
{
mExponent(false);
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
_ttype = DoubleDoubleConst;
}
{
switch ( LA(1)) {
case 'F': case 'f':
{
mFloatSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = FloatDoubleConst;
}
break;
}
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongDoubleConst;
}
break;
}
default:
{
}
}
}
}
else {
boolean synPredMatched1756 = false;
if (((LA(1)=='.') && (LA(2)=='.'))) {
int _m1756 = mark();
synPredMatched1756 = true;
inputState.guessing++;
try {
{
match("...");
}
}
catch (RecognitionException pe) {
synPredMatched1756 = false;
}
rewind(_m1756);
inputState.guessing--;
}
if ( synPredMatched1756 ) {
match("...");
if ( inputState.guessing==0 ) {
_ttype = VARARGS;
}
}
else if ((LA(1)=='0') && (LA(2)=='X'||LA(2)=='x')) {
match('0');
{
switch ( LA(1)) {
case 'x':
{
match('x');
break;
}
case 'X':
{
match('X');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt1770=0;
_loop1770:
do {
switch ( LA(1)) {
case 'a': case 'b': case 'c': case 'd':
case 'e': case 'f':
{
matchRange('a','f');
break;
}
case 'A': case 'B': case 'C': case 'D':
case 'E': case 'F':
{
matchRange('A','F');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
mDigit(false);
break;
}
default:
{
if ( _cnt1770>=1 ) { break _loop1770; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt1770++;
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = IntHexConst;
}
{
switch ( LA(1)) {
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongHexConst;
}
break;
}
case 'U': case 'u':
{
mUnsignedSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = UnsignedHexConst;
}
break;
}
default:
{
}
}
}
}
else if ((LA(1)=='.') && (true)) {
match('.');
if ( inputState.guessing==0 ) {
_ttype = DOT;
}
{
if (((LA(1) >= '0' && LA(1) <= '9'))) {
{
int _cnt1759=0;
_loop1759:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt1759>=1 ) { break _loop1759; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt1759++;
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
if ( inputState.guessing==0 ) {
_ttype = DoubleDoubleConst;
}
{
switch ( LA(1)) {
case 'F': case 'f':
{
mFloatSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = FloatDoubleConst;
}
break;
}
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongDoubleConst;
}
break;
}
default:
{
}
}
}
}
else {
}
}
}
else if ((LA(1)=='0') && (true) && (true)) {
match('0');
{
_loop1763:
do {
if (((LA(1) >= '0' && LA(1) <= '7'))) {
matchRange('0','7');
}
else {
break _loop1763;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = IntOctalConst;
}
{
switch ( LA(1)) {
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongOctalConst;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?