The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
117 views
$E \rightarrow E + T \hspace{5px} | \hspace{5px} T$
$T \rightarrow TF \hspace{5px} | \hspace{5px} F $
$F \rightarrow F^{*} \hspace{5px} | \hspace{5px}  (E) \hspace{5px} | \hspace{5px}  a \hspace{5px} | \hspace{5px}  b \hspace{5px} | \hspace{5px} \epsilon $

Construct the LALR sets of items and the parse table for the above grammar.
asked in Compiler Design by Boss (34.6k points) | 117 views
0
can someone help with just first state of parser?
0
first state will be -
E' -> .E,       $$                                          (consider this as 1 symbol)
E -> .E+T,    $/+
E -> .T,         $/+
T -> .TF,       $/+/a/ b / ( / * / ϵ
F -> .F*,       $/+/a/ b / ( / * / ϵ
F -> .(E),      $/+/a/ b / ( / * / ϵ
F ->. a,         $/+/a/ b / ( / * / ϵ
F -> .b,         $/+/a/ b / ( / * / ϵ
F -> .,           $/+/a/ b / ( / * / ϵ
0

Shubhgupta $F^*$ is kleen star to we need another new Non-termnal to represent that

0
yes for every symbol we need to define productions. Can you give reference of this question?
0

Please log in or register to answer this question.

Related questions

0 votes
0 answers
4
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,814 questions
54,521 answers
188,389 comments
75,427 users