title: ANTLR4 grammar no viable alternative at input
body: <p>I am working on a project and I have to create a parser for the following grammar:</p>
  
  <pre><code>grammar T;
  </code></pre>
  
  <p>I am trying to read this piece of code: </p>
  
  <pre><code>theory oo
  begin
  
  builtins: asymmetric-encryption
  functions: f/1  // f/1 used for function in protocol
  
  /* Channel rules */ 
  
  rule ChanOut_S:
      [Out_S($A,$B,xn,x)]
      --[ChanOut_S($A,$B,xn,x)]-&gt;
      [!Sec($A,$B,xn,x)]
  </code></pre>
  
  <p>I used to generate the parser tree using grun as follows:</p>
  
  <p>grun T theory oo.spthy -gui</p>
  
  <p>But every time I try to generate the parser tree I have the following error:</p>
  
  <pre><code>line 9:5 no viable alternative at input 'ruleC'
  </code></pre>
  
  <p>It seems the grammar has some problem but I am not able to figure it out.
  Do you have any clue? </p>