Phases of a compiler?
问题 At which phase of the compilation are keywords of a programming language recognized? I am sort of confused between The lexical analysis. The parsing of the program. I once wrote a lexer in C using regular expressions but it recognised the main() in int main(void) also as a keyword. On these lines I think that we have to build a parse tree to recognize keywords. 回答1: I had to build a simple compiler this year as a project for which i used Java . The recognition of keywords was made on lexical