Hi Angelo.

On Tue, 25 Jan 2011, Angelo Borsotti wrote:

> I attach a calc.y, and the generated calc.java using the command:
> 
>       
>      $ bison calc.y
>      $ bison -V
>      bison (GNU Bison) 2.4.1

calc.y contains:

  %{
    #define YYSTYPE double
    #include <math.h>
    int yylex (void);
    void yyerror (char const *);
  %}

so it's no surprise that the code between "%{" and "%}" appears in 
calc.java.  However, the Bison manual says:

  Other `%code' blocks are not supported in Java parsers.  In particular, 
  `%{ ... %}' blocks should not be used and may give an error in future 
  versions of Bison.

Reply via email to