diff options
Diffstat (limited to 'filters/kword/latex/import/parser/main.cpp')
-rw-r--r-- | filters/kword/latex/import/parser/main.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/filters/kword/latex/import/parser/main.cpp b/filters/kword/latex/import/parser/main.cpp new file mode 100644 index 000000000..bce8e7714 --- /dev/null +++ b/filters/kword/latex/import/parser/main.cpp @@ -0,0 +1,29 @@ +#include<FlexLexer.h> + +#include <string.h> +#include <stdlib.h> +#include <iostream.h> +#include <fstream.h> + +#include "stack.h" + +int main(int argc, char* argv[] ) +{ + const char * file_name = strdup(argv[1]); + ifstream input; + input.open(file_name, ios::in); + yyFlexLexer* parser = new yyFlexLexer(&input); + + /* allocate initial stack */ + stack = (Stack *) malloc(stack_size * sizeof(Stack)); + + if ( stack == NULL) + { + cerr << "texparser: not enough memory for stacks\n"; + return 3; + } + + while(parser->yylex() != 0); + + return 0; +} |