Closed splasky closed 5 years ago
Related: #37
@splasky, you can follow the changes proposed by #37 and think of the further AST refactoring.
@jserv ,In my experience the compiler will generate tokens for parser. And use the tokens to generate ast tree. The work can be found at https://github.com/splasky/amacc/commit/3db51cb5bd062a546204c8fa668273b328471e72. Is my current practice correct?
Why do we need separate lexer program? If we can ensure the simplicity, we can put them into single file.
The current version is for testing, I will refactor before merge it into amacc.c. Is the tokenized phase(lexer function) I wrote is correct(or needed)? Or I have to keep using the next phase?
The current version is for testing, I will refactor before merge it into amacc.c. Is the tokenized phase(lexer function) I wrote is correct(or needed)? Or I have to keep using the next phase?
Anything facilitating what c5-AST
branch did can be considered as functionally correct at first glance.
Defer to #37
May I separate the lexer and parser? It will be more easy to generate ast tree if I can separate the lexer and parser.