TDL [Parser]: Initial commit

This commit is contained in:
Philippe Tillet
2018-12-15 22:29:36 -05:00
parent a7a3d57f3c
commit dc755612b9
9 changed files with 749 additions and 908 deletions

14
main.cpp Normal file
View File

@@ -0,0 +1,14 @@
#include <cstring>
#include <cstdio>
typedef struct yy_buffer_state * YY_BUFFER_STATE;
extern int yyparse();
extern YY_BUFFER_STATE yy_scan_string(const char * str);
extern void yy_delete_buffer(YY_BUFFER_STATE buffer);
int main() {
char string[] = "void test(int);";
YY_BUFFER_STATE buffer = yy_scan_string(string);
yy_delete_buffer(buffer);
return 0;
}