代码:
#include "stdafx.h" #include <stdio.h> #include <string.h> #include <stdlib.h> typedef enum{ TT_NUMBER, TT_ADD, TT_SUB, TT_MUL, TT_DIV, TT_EOL }TokenType; typedef struct{ TokenType type; char text[255]; }Token; static int pos=0; static char* line; void getToken(Token *token){ char arr[255]; int index=0; arr[index]='