title: How to pass a struct to a function in a yacc file?
body: <p>I have this in my yacc file.</p>
  
  <pre><code>var_declaration : type_specifier ID ';' {$2-&gt;args = ""; $2-&gt;value = 0; $2-&gt;arraysize = 0; $2-&gt;type = "variable";}
  </code></pre>
  
  <p>Everything above works.</p>
  
  <p>I want to add this to it.</p>
  
  <pre><code>fn($2);
  </code></pre>
  
  <p>From inside the function, I want to do stuff like this.</p>
  
  <pre><code> fn(struct symtab sp)
      {
      sp-&gt;value = 0;
      }
  </code></pre>
  
  <p>But when I try to compile the program I get this error:</p>
  
  <blockquote>
    <p>error: invalid type argument of ‘->’
    (have ‘struct symtab')</p>
  </blockquote>