bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bison java skeleton


From: Joel E. Denny
Subject: Re: bison java skeleton
Date: Tue, 25 Jan 2011 19:57:47 -0500 (EST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

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

[Prev in Thread] Current Thread [Next in Thread]