增加identifier

This commit is contained in:
LingZhaoHui 2020-07-19 22:05:28 +08:00
parent 790e99be68
commit 3cd975a024
3 changed files with 3 additions and 3 deletions

1
.gitignore vendored
View File

@ -74,3 +74,4 @@ Mkfile.old
dkms.conf
*.o
core

BIN
c_expert/chapter3/identifier Executable file

Binary file not shown.

View File

@ -18,7 +18,7 @@ struct token stack[MAXTOKENS];
struct token this;
#define pop stack[top--]
#define push(s) stack[++top];
#define push(s) stack[++top] = s;
enum type_tag classify_string(void)
{
@ -49,7 +49,6 @@ enum type_tag classify_string(void)
void gettoken(void)
{
char *p = this.string;
printf("this.string=%s\n", this.string);
/* 略过空白字符 */
while ((*p = getchar()) == ' ');
if (isalnum(*p))
@ -98,7 +97,7 @@ void deal_with_arrays(void)
gettoken();
}
gettoken();
printf("of ");
printf(" of ");
}
}