You are on page 1of 4

Figure 1 CODE GENERATOR(end)

=
Syntax analysis (Parsing) is the second phase of the compiler
design process that comes after lexical analysis. ... It checks if
the given input is in the correct syntax of the programming
language in which the input has been written (confirming to
the grammar of the programming language)
Left factoring is a grammar transformation that is useful for
producing grammar suitable for predictive or top-down
parsing.
Write a program to implement Shift-reduce parsing for the
grammar given below and check if the string “ w =(( ]( ) " can
be parsed successfully.
A-> AB|AD| E
B-> (C)
C-> C(C) |E
D-> (E]
E-> EC|E (C)|E

You might also like