Supposedly, following grammar is not LL(1). However I cannot find a reason for that. I think it is perfectly LL(1) because it has no left recursion and there is no common prefix issue. Can someone clarify?
LL(1) means that a parser can be constructed that uses a single token look-ahead, and in stmt
, both assignment
and subr_call
start with ID
so a parser cannot distinguish between the two cases just by looking at the first token (ID
).