📄 source.txt.bak
字号:
switch(inputChar)
{
case '-':
state = 20;
break;
case '=':
state = 21;
break;
case '>':
state = 63;
break;
default:
state = 19;
}
}
if(state == 19)//-
{
aByte.attribute = OPERATION;
aByte.value = "-";
return aByte;
}
if(state == 20)//--
{
aByte.attribute = OPERATION;
aByte.value = "--";
goNextChar(pBuffer, pScr);
return aByte;
}
if(state == 21)//-=
{
aByte.attribute = OPERATION;
aByte.value = "-=";
goNextChar(pBuffer, pScr);
return aByte;
}
if(state == 63)//->
{
aByte.attribute = OPERATION;
aByte.value = "->";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 22)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '=':
state = 24;
break;
case '/':
state = 70;
break;
case '*':
state = 71;
break;
default:
state = 23;
break;
}
}
if(state == 23)
{
aByte.attribute = OPERATION;
aByte.value = "/";
goNextChar(pBuffer, pScr);
return aByte;
}
if(state == 70)//单行注释
{
inputChar = getNextChar(pBuffer, pScr);
while(inputChar != '\n')
{
inputChar = getNextChar(pBuffer, pScr);
}
goNextChar(pBuffer, pScr);
aByte.attribute = EMPTY;
aByte.value = "EMPTY";
return aByte;
}
if(state == 71)//多行注释
{
while(1)
{
inputChar = getNextChar(pBuffer, pScr);
if(inputChar == '*')
{
inputChar = getNextChar(pBuffer, pScr);
if(inputChar == '/')
{
break;
}
}
}
goNextChar(pBuffer, pScr);
aByte.attribute = EMPTY;
aByte.value = "EMPTY";
return aByte;
}
if(state == 24)
{
aByte.attribute = OPERATION;
aByte.value = "/=";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 27)
{
aByte.attribute = OPERATION;
aByte.value = ",";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 30)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '=':
state = 32;
break;
default:
state = 31;
}
}
if(state == 31)
{
aByte.attribute = OPERATION;
aByte.value = "%";
return aByte;
}
if(state == 32)
{
aByte.attribute = OPERATION;
aByte.value = "%=";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 33)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '>':
state = 35;
break;
case '=':
state = 36;
break;
default:
state = 34;
}
}
if(state == 34)
{
aByte.attribute = OPERATION;
aByte.value = ">";
return aByte;
}
if(state == 35)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '=':
state = 38;
break;
default:
state = 37;
}
}
if(state == 36)
{
aByte.attribute = OPERATION;
aByte.value = ">=";
goNextChar(pBuffer, pScr);
return aByte;
}
if(state == 37)
{
aByte.attribute = OPERATION;
aByte.value = ">>";
return aByte;
}
if(state == 38)
{
aByte.attribute = OPERATION;
aByte.value = ">>=";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 39)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '<':
state = 41;
break;
case '=':
state = 42;
break;
default:
state = 40;
}
}
if(state == 40)//<
{
aByte.attribute = OPERATION;
aByte.value = "<";
return aByte;
}
if(state == 41)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '=':
state = 44;
break;
default:
state = 43;
}
}
if(state == 42)//<=
{
aByte.attribute = OPERATION;
aByte.value = "<=";
goNextChar(pBuffer, pScr);
return aByte;
}
if(state == 43)//<<
{
aByte.attribute = OPERATION;
aByte.value = "<<";
return aByte;
}
if(state == 44)//<<=
{
aByte.attribute = OPERATION;
aByte.value = "<<=";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 45)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '&':
state = 47;
break;
case '=':
state = 48;
break;
default:
state = 46;
}
}
if(state == 46)//&
{
aByte.attribute = OPERATION;
aByte.value = "&";
return aByte;
}
if(state == 47)//&&
{
aByte.attribute = OPERATION;
aByte.value = "&&";
goNextChar(pBuffer, pScr);
return aByte;
}
if(state == 48)//&=
{
aByte.attribute = OPERATION;
aByte.value = "&=";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 49)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '|':
state = 51;
break;
case '=':
state = 52;
break;
default:
state = 50;
}
}
if(state == 50)//|
{
aByte.attribute = OPERATION;
aByte.value = "|";
return aByte;
}
if(state == 51)//||
{
aByte.attribute = OPERATION;
aByte.value = "||";
goNextChar(pBuffer, pScr);
return aByte;
}
if(state == 52)//|=
{
aByte.attribute = OPERATION;
aByte.value = "|=";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 53)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '=':
state = 55;
break;
default:
state = 54;
}
}
if(state == 54)//^
{
aByte.attribute = OPERATION;
aByte.value = "^";
return aByte;
}
if(state == 55)//^=
{
aByte.attribute = OPERATION;
aByte.value = "^=";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 56)//.
{
aByte.attribute = OPERATION;
aByte.value = ".";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 57)//?
{
aByte.attribute = OPERATION;
aByte.value = "?";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 58)
{
aByte.attribute = OPERATION;
aByte.value = ":";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 59)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '=':
state = 61;
break;
default:
state = 60;
}
}
if(state == 60)//!
{
aByte.attribute = OPERATION;
aByte.value = "!";
return aByte;
}
if(state == 61)//!=
{
aByte.attribute = OPERATION;
aByte.value = "!=";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 62)//~
{
aByte.attribute = OPERATION;
aByte.value = "~";
goNextChar(pBuffer, pScr);
return aByte;
}
////////////////////////////////////////////////////////////
if(state == 64)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '\\':
state = 67;
break;
default:
tempChar = inputChar;
state = 66;
}
}
if(state == 66)
{
inputChar = getNextChar(pBuffer, pScr);
switch(inputChar)
{
case '\'':
state = 68;
break;
default:
state = 101;
}
}
if(state == 68)
{
aByte.attribute = CONST_CHAR;
aByte.value = (char *)malloc(2);
aByte.value[0] = tempChar;
aByte.value[1] = '\0';
goNextChar(pBuffer, pScr);
*pIsNeedFree = true;
return aByte;
}
if(state == 67)
{
inputChar = getNextChar(pBuffer, pScr);
if(inputChar == 't' || inputChar == 'n' || inputChar == '\\' || inputChar == '\"' || inputChar == '\'')
{
tempChar = inputChar;
state = 69;
}
else
{
state = 101;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -