Archived
1
0

added semicolon token

This commit is contained in:
Marrub 2015-06-07 08:02:33 -04:00
parent a2337c63db
commit 0a5ab301d1
2 changed files with 20 additions and 19 deletions

View File

@ -52,15 +52,15 @@ static const char *errors[] = {
char *LT_TkNames[] = { char *LT_TkNames[] = {
// [marrub] So, this was an interesting bug. This was completely misordered from the enum. // [marrub] So, this was an interesting bug. This was completely misordered from the enum.
// As can be guessed, this caused many issues. Seriously, all of them. // As can be guessed, this caused many issues. Seriously, all of them.
"TOK_Colon", "TOK_Comma", "TOK_Div", "TOK_Mod", "TOK_Mul", "TOK_Query", "TOK_Colon", "TOK_Comma", "TOK_Div", "TOK_Mod", "TOK_Mul", "TOK_Query",
"TOK_BraceO", "TOK_BraceC", "TOK_BrackO", "TOK_BrackC", "TOK_ParenO", "TOK_ParenC", "TOK_BraceO", "TOK_BraceC","TOK_BrackO", "TOK_BrackC", "TOK_ParenO", "TOK_ParenC",
"TOK_LnEnd", "TOK_Add2", "TOK_Add", "TOK_And2", "TOK_And", "TOK_CmpGE", "TOK_LnEnd", "TOK_Add2", "TOK_Add", "TOK_And2", "TOK_And", "TOK_CmpGE",
"TOK_ShR", "TOK_CmpGT", "TOK_CmpLE", "TOK_ShL", "TOK_CmpNE", "TOK_CmpLT", "TOK_ShR", "TOK_CmpGT", "TOK_CmpLE", "TOK_ShL", "TOK_CmpNE", "TOK_CmpLT",
"TOK_CmpEQ", "TOK_Equal", "TOK_Not", "TOK_OrI2", "TOK_OrI", "TOK_OrX2", "TOK_CmpEQ", "TOK_Equal", "TOK_Not", "TOK_OrI2", "TOK_OrI", "TOK_OrX2",
"TOK_OrX", "TOK_Sub2", "TOK_Sub", "TOK_String", "TOK_Charac", "TOK_Number", "TOK_OrX", "TOK_Sub2", "TOK_Sub", "TOK_String", "TOK_Charac", "TOK_Number",
"TOK_Identi", "TOK_EOF", "TOK_ChrSeq", "TOK_Comment","TOK_Period", "TOK_Arrow", "TOK_Identi", "TOK_EOF", "TOK_ChrSeq", "TOK_Comment","TOK_Period", "TOK_Arrow",
"TOK_Sigil", "TOK_Hash", "TOK_BlkCmtO","TOK_BlkCmtC","TOK_Exp", "TOK_NstCmtO", "TOK_Sigil", "TOK_Hash", "TOK_BlkCmtO","TOK_BlkCmtC","TOK_Exp", "TOK_NstCmtO",
"TOK_NstCmtC" "TOK_NstCmtC", "TOK_Semicl"
}; };
/* /*
@ -599,6 +599,7 @@ LT_Token LT_GetToken()
case '#': tk.token = LT_TkNames[TOK_Hash]; return tk; case '#': tk.token = LT_TkNames[TOK_Hash]; return tk;
case '.': tk.token = LT_TkNames[TOK_Period]; return tk; case '.': tk.token = LT_TkNames[TOK_Period]; return tk;
case ':': tk.token = LT_TkNames[TOK_Colon]; return tk; case ':': tk.token = LT_TkNames[TOK_Colon]; return tk;
case ';': tk.token = LT_TkNames[TOK_Semicl]; return tk;
case ',': tk.token = LT_TkNames[TOK_Comma]; return tk; case ',': tk.token = LT_TkNames[TOK_Comma]; return tk;
case '%': tk.token = LT_TkNames[TOK_Mod]; return tk; case '%': tk.token = LT_TkNames[TOK_Mod]; return tk;
case '?': tk.token = LT_TkNames[TOK_Query]; return tk; case '?': tk.token = LT_TkNames[TOK_Query]; return tk;

View File

@ -52,16 +52,16 @@ THE SOFTWARE.
enum enum
{ {
TOK_Colon, TOK_Comma, TOK_Div, TOK_Mod, TOK_Mul, TOK_Colon, TOK_Comma, TOK_Div, TOK_Mod, TOK_Mul,
TOK_Query, TOK_BraceO, TOK_BraceC, TOK_BrackO, TOK_BrackC, TOK_Query, TOK_BraceO, TOK_BraceC, TOK_BrackO, TOK_BrackC,
TOK_ParenO, TOK_ParenC, TOK_LnEnd, TOK_Add2, TOK_Add, TOK_ParenO, TOK_ParenC, TOK_LnEnd, TOK_Add2, TOK_Add,
TOK_And2, TOK_And, TOK_CmpGE, TOK_ShR, TOK_CmpGT, TOK_And2, TOK_And, TOK_CmpGE, TOK_ShR, TOK_CmpGT,
TOK_CmpLE, TOK_ShL, TOK_CmpNE, TOK_CmpLT, TOK_CmpEQ, TOK_CmpLE, TOK_ShL, TOK_CmpNE, TOK_CmpLT, TOK_CmpEQ,
TOK_Equal, TOK_Not, TOK_OrI2, TOK_OrI, TOK_OrX2, TOK_Equal, TOK_Not, TOK_OrI2, TOK_OrI, TOK_OrX2,
TOK_OrX, TOK_Sub2, TOK_Sub, TOK_String, TOK_Charac, TOK_OrX, TOK_Sub2, TOK_Sub, TOK_String, TOK_Charac,
TOK_Number, TOK_Identi, TOK_EOF, TOK_ChrSeq, TOK_Comment, TOK_Number, TOK_Identi, TOK_EOF, TOK_ChrSeq, TOK_Comment,
TOK_Period, TOK_Arrow, TOK_Sigil, TOK_Hash, TOK_BlkCmtO, TOK_Period, TOK_Arrow, TOK_Sigil, TOK_Hash, TOK_BlkCmtO,
TOK_BlkCmtC,TOK_Exp, TOK_NstCmtO,TOK_NstCmtC TOK_BlkCmtC,TOK_Exp, TOK_NstCmtO,TOK_NstCmtC, TOK_Semicl
}; };
enum enum