Noeud « Next »: , Noeud « Previous »: T1 Code to Write, Noeud « Up »: T1



4.3.5 T1 FAQ

Bison reports type clashes
Bison may report type clashes for some actions. For instance, if you have given a type to "string", but none to exp, then it will choke on:
          exp: "string";
     

because it actually means

          exp: "string" { $$ = $1; };
     

which is not type coherent. So write this instead:

          exp: "string" {};
     

Where is ast::Exp?
Its real definition will be provided with T2, so meanwhile you have to provide a fake. We recommend for a forward declaration of ast::Exp in libparse.hh.
misc/test-ref fails to compile properly
My bad, sorry about that: it will be activated in a later stage. Meanwhile, comment its content.