#Help my TA still hasnt answered me!

1 messages · Page 1 of 1 (latest)

candid notch
#

I have this task :

"This task refers to LL(1) parser construction, including the construction of Nullable, First, Follow sets and eliminating left recursion and identical prefixes. See class lecture "Syntax Analysis" slides ~22-39, or Section 2.8 to 2.12 of "Introduction to Compiler Design" book.

Consider the following grammar for well formed postfix expressions:

E -> E E + E -> E E * E -> num

Eliminate Left-Recursion in the grammar (see Slides ~37-38 in class lecture "Syntax Analysis" or Section 2.12.1 in book)"
and this is my answer:

\[ \begin{array}{lcl} E & \rightarrow & \text{num } E' \\ E' & \rightarrow & E + E' \mid E * E' \mid \varepsilon \end{array} \]

could someone proof read it really fast 😭

formal stag
#

E' → num E' + E' loops again and again tho