I got one grammar:re2: re1 $re1: expr == expr | expr != expr | expr < expr | expr <= expr | expr >= expr | expr > expr | exprexpr: expr + term | expr - term | termterm: term * factor | term / factor | factorfactor: (expr) | num | idnum: (0|1|2|3|4|5|6|7|8|9)num | id: (a|b|....|z|A|B|....|Z|)id | Here are the FOLLOW sets:FOLLOW(r2) = {}FOLLOW(r1) = {$}FOLLOW(expr) = {=,!,<,>,+,-,)}FOLLOW(term) = FOLLOW(factor) = FOLLOW (id) = FOLLOW (num) = {=,!,<,>,+,-,),*,/}Now this grammar clearly got reduce-reduce conflict fromnum:  and id:  because FOLLOW(num)  FOLLOW(id) != empty setNow let's say I fix the grammar by  doing the following (I assume it is mistake in the grammar because ( == ) makes no sense):num: (0|1|2|3|4|5|6|7|8|9)num | (0|1|2|3|4|5|6|7|8|9)id: (a|b|....|z|A|B|....|Z|)id | (a|b|....|z|A|B|....|Z|) Now my question is, is this grammar SLR i.e can it be parsed by SLR parser? I know by building the parser I can find out but on exam I can not make the whole parser and then determine (I would lose lot of time).
Ambiguous grammar? Could the grammar be parsed by SLR parser?
formal languages;formal grammars;compilers;parsing