Browse Source

增加identifier

master
ZEEKLING 6 months ago
parent
commit
3cd975a024
3 changed files with 3 additions and 3 deletions
  1. +1
    -0
      .gitignore
  2. BIN
      c_expert/chapter3/identifier
  3. +2
    -3
      c_expert/chapter3/identifier.c

+ 1
- 0
.gitignore View File

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

BIN
c_expert/chapter3/identifier View File


+ 2
- 3
c_expert/chapter3/identifier.c 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 ");
}
}


Loading…
Cancel
Save