help-bison
[Top][All Lists]
Advanced

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

Re: Java & Bison.


From: Hans Aberg
Subject: Re: Java & Bison.
Date: Sat, 3 Aug 2002 14:50:39 +0200

At 13:46 +0200 2002/08/02, Thomas Troeger wrote:

>I'm in need of a CC that produces Java code, and I don't want to use
>JavaCC since it creates LL(k) parsers ( ;-/ ). I've searched the net
>for such programs, and found CUP,jay and antlr. I didn't like those
>much (I'm used too much to bison), but I could find a patch for
>bison-1.27 that adds this functionality (unfortunately, without any
>documentation).
>
>My question, is bison going to have support for other languages (like
>java), or is that only some inofficial patch from someone who wanted
>it to produce java? Where to get an actual version of bison? The
>offical site offers bison-1.35, but from what google returned, there
>must be at least a 1.49a Version already (which maybe support Java
>construction out ot box); I couldn't find any place for a download,
>tho.
>
>Please enlighten me :-)

Sure. I am not GNU, but here is what I think (and the GNU regulars will
have to correct later, if the answer is somehow flawed)

The latest Bison Beta should somewhere at be at
    ftp://alpha.gnu.org/gnu/bison/
This version passes the output via the M4 macro program, and by that it is
also supporting C++ via a -S c++.bison (or bison.c++) option.ยจ

You could take that version 1.49x down, and try rewriting the C++ skeleton
file for Java. It might not be so difficult. -- I made my own C++ skeleton
files even before the above Bison version had appeared, and it just took a
few days. The advantage with M4 is that one should not need to tweak the
Bison sources, as IO had to do, but merely modifying the skeleton file.

If you succeed, please report it back to Bug Bison <address@hidden>:
Bison is indeed now moving towards multilingual support, and the GNU people
are probably happy to get folks making a part of that project.

  Hans Aberg





reply via email to

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