Seeking bison/yacc grammar for Java language

Evil B <hq@national.org.nz>
29 Apr 2004 12:03:37 -0400

          From comp.compilers

Related articles
Seeking bison/yacc grammar for Java language hq@national.org.nz (Evil B) (2004-04-29)
Re: Seeking bison/yacc grammar for Java language snicol@apk.net (Scott Nicol) (2004-05-02)
Re: Seeking bison/yacc grammar for Java language gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-05-02)
Re: Seeking bison/yacc grammar for Java language xxxx@xxxx.xx (Jose Antonio) (2004-05-08)
| List of all articles for this month |

From: Evil B <hq@national.org.nz>
Newsgroups: comp.compilers
Date: 29 Apr 2004 12:03:37 -0400
Organization: Compilers Central
Keywords: Java, parse, question
Posted-Date: 29 Apr 2004 12:03:37 EDT

Hi,


Does anyone have a working yacc/bison grammar for the full java language?


I've been tinkering away at one for a few days, but have hit a roadblock:


When adding 'Type . class' to 'PrimaryNoNewArray' [1], I end up with 10
shift/reduce and 2 reduce/reduce conflicts, and most java sources fail
to parse.


But when I remove this, I only have 4 shift/reduce conflicts, and nearly
all sources parse successfully (except those with 'Type . class'
expressions.


I don't want to battle any longer, in case someone has already solved
the issues and is willing to share their work.


Cheers
EB


[1]
http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html,
section 15.8


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.