I wonder if C# and Java grammars are LALR(x)? If yes, what\'s the value of x?
Edit:
After accepting the true answer, I think it is better t
The Java grammar (version 1.0) is known to be LALR(1); this site provides a grammar and begins with the notice that
The grammar has been mechanically checked to insure that it is LALR(1).
I am not sure whether C# is LALR(1), but there is a C# parser written in bison available here, which suggests that it's probably LALR(1) (assuming that you allow for precedence declarations).
For what it's worth, typically LALR(1) is the only LALR parser used. If you need to use something like LALR(2) for a grammar, it is typically a better idea to use a LALR(1) parser with explicit precedence disambiguation, or a more powerful parser like a GLR parser.
Hope this helps!