Wednesday, March 23, 2011

Tables generator ready

Now my work consist on build part of the code automatically from the Flex and Bison code generated in C.

In order to build this it is necessary to read the lexer.c and parser.c file and generate the LexTable.mo ParseTable.mo that contains the arrays used for the automata machine, and the LexCode.mo and ParseCode.mo used for the actions after a token is found for lexer and a shift reduce rule to build the AST for the parser. The files Token.mo needs to be rebuild also from the parser.c code.

For making this machine customized for any language, it is necessary to link the generated files together with the main files Lexer.mo and Parser.mo, so those files will be generated also with a sufix which will identify the machine.

For my thesis, the exercise 10 and exercise 4 are the examples I am using for testing the machine, so the machines will contain all these files with the sufix 10 and 4 respectively.

Some code cleaning is still necessary to do, but this does not affect the current work, it will be complemented later after the Error Handled is improved in the parser.

No comments:

Post a Comment