CS 4110 Compiler Design – Project Phase 2 Syntax analysis Total Points: 20 Implement a compiler for a language defined in project Phase 1 – lexical analysis. The programming language you need to use is C or C++ (and the language defined by the corresponding tools). This file describes the second phase of the project, i.e. syntax analysis. Second Phase -- Syntax Analysis Using yacc For the second phase, you need to define the FP-language in yacc definitions and feed it to yacc to generate a parser. Your definitions should follow the BNF given earlier, but exclude the token definitions which have already been processed by lex and instead use the token names you defined for the first project. You also need to generate a parse tree for the input FP program. For parse tree generation, you need to write code in the definition file for tree node generation. Also, you need to use a stack to keep track of the tree nodes so that you can link them properly into the correct parse tree. You can either use yacc stack or your own stack for this purpose. Each node in your parse tree should include the actual symbol of the node, including all those defined in the BNF for the FP language
Hello,
I have 8+ years of programming experience in C language along with an extensive coverage of compiler design and it's internal working. I have completed several academic level projects related to the different phases of compiler construction up to the final phase i.e. assembly code generation.
I am sure that I can implement the parse for the given grammar using yacc/bison.
Best regards.