// // ParseCreate.cpp // SQL parser // // Created by 王璇 on 17/2/1. // Copyright © 2017年 Xuan Wang. All rights reserved. // #include #include #include #include #include "lexanal.h" #include //pay attention to the parameter list int ParseCreate(char* tname,char *tb_info, int *size, char* p){ int index=0;//to identify the position of new info int i=0; int attri_num=0; char token[100]; // Output for lexanal( ) int token_code=0; p=lex_anal( p, token, &token_code );//watch out for space if(token_code!=TABLE){ printf("Error: keyword TABLE excepted"); return 0; } //get next token--table name p=lex_anal( p, token, &token_code ); if(token_code!=IDENTIFIER){ printf("Error: table name expected"); return 0; } else{ //store table name for(i=0;i