The main features of either Lex and Yacc

Describe how a parse tree can be translated into a sequence of assembly language
March 22, 2023
Explain and find the left, right and follow sets for all non-terminals in the grammar
March 22, 2023

The main features of either Lex and Yacc

2000 Paper 5 Question 6
Compiler Construction
Give a brief description of the main features of either Lex and Yacc or the
corresponding Java tools JLex and Cup. [5 + 5 marks]
Illustrate their use by outlining how you would construct a parser for expressions
composed of identifiers, integers, unary minus and binary operators +, −, ∗ and /.
Your parser is expected to create a parse tree in a format of your choice representing
the expression that is presented to it. If it helps, you may assume that expressions
will be terminated by writing a semicolon after them. [10 marks]