Conditon for LL(1) and hence LR(1)
Check for following condition:
- grammar is not left recursive
- grammar is not left factored using first or follow method
Also if a grammar is LL(1) then it is in LR(1) . So you don't have to check for LR(1) separately
Condtion for LR(0) -using LR(0) automaton
in LR(0) generally the conflict arise due to a reducing production. If we have any production such A-->b. (ie with dot at rightmost position) we place the r in all column of row corresponing to the state. This r occuping the whole row cause the SR or RR conflict.
check the corresponding LR(0) automaton. If for any state , production A-->b. (dot at rightmost position) exists in that state , it should not contain any other production.
Conditon for SLR(1)
No shortcut. check via parsing table. Any conflict while filling table , means not SLR(1).
Conditon for LALR(1)
No shortcut .. check via parsing table for LR(1) parser. if conflict arise while merging , then not LALR(1).
order of checking
LL(1) ---> LALR(1)--> SLR(1)--> LR(0). ( in decreasing parsing power)
Note: this answer is not from any text. Please correct me if i m wrong.