Files
triton/examples/matrix.cpp
2018-12-17 10:43:49 -05:00

28 lines
572 B
C++

#include <cstring>
#include <cstdio>
#include "ast.h"
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);
using tdl::ast::translation_unit;
extern translation_unit *ast_root;
const char src[] =
"\
void test(int32 id){\
fp32 c[16, 16] = {0};\
int32 i = 0;\
i += 1;\
}\
";
int main() {
YY_BUFFER_STATE buffer = yy_scan_string(src);
yyparse();
yy_delete_buffer(buffer);
translation_unit *program = ast_root;
return 0;
}