The Gateway to Computer Science Excellence
0 votes
96 views
Can lookahead symbol be epsilon in LR(1) parsing?

and

pls give the LR(1) diagram for the following grammar?

A->AB | a
B->*AC | Cb | ∈
C->+ABc | ∈
in Compiler Design by Active (5.1k points)
edited by | 96 views
0
$\epsilon$ means that will be reduced state, R-R conflict will be there. Then I donot think it will be any lookahead in $LR\left ( 1 \right )$

but a  FIRST symbol in $LL\left ( 1 \right )$
0

 there is SR conflict..$

1 Answer

0 votes
Eplison can not be a look ahead symbole in LR(1).

Because whenever epsilon occoured it points next symbole.
by (403 points)
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
50,648 questions
56,457 answers
195,312 comments
100,145 users