title: ANTLR4 C# grammar and left recursion
body: <p>I'm trying to parse C# code with ANTLR4 (from Java). So far, I was unable to find appropriate grammar, so I decided to write my own. I used this appendix <a href="http://sdn.microsoft.com/en-us/library/aa664812%28v=vs.71%29.aspx" rel="nofollow">here</a> but I ran into a problem. The problem is that I have a lot of left-recursive rules. I tried to fix them by using ANTLRWorks (antlrworks-1.5) but I just keep getting exceptions. I was able to fix some of them manually, but not those like this one:</p>
  
  <pre><code>multiplicative_expression:
  | unary_expression
  | multiplicative_expression '*' unary_expression
  | multiplicative_expression '/' unary_expression
  | multiplicative_expression '%' unary_expression;
  </code></pre>
  
  <p>So is there anyone that could direct me to a proper grammar for ANTLR4 or to help me deal with left-recursion problem. Thank you.</p>