Grammar is LL(1) or not?

S -> AS | b

A -> SA | a

I get FIRST of S = {a,b} for S->AS and FIRST of S = {b} for S->b

Hence FIRST(AS) ∩ FIRST (b) is not a disjoint This is not LL(1)

But I checked this site http://smlweb.cpsc.ucalgary.ca/start.html and this shows the grammar is LL(1). Here I am confused!

Is it LL(1) or not?

1 Answer

That website uses a different notation than what you assumed. This would be the correct input:

S -> A S | b.
A -> S A | a.


You entered AS (and SA) which it does not recognize as A followed by S, but as a single nonterminal named AS.

With that input it correctly says that the language is not $$\text{LL}(1)$$.