Re: Java and recursive decent parsing..

John Fremlin <>
14 Apr 2001 17:34:41 -0400

          From comp.compilers

Related articles
Java and recursive decent parsing.. (Raymond Limpus) (2001-04-12)
Re: Java and recursive decent parsing.. (John Fremlin) (2001-04-14)
| List of all articles for this month |

From: John Fremlin <>
Newsgroups: comp.compilers
Date: 14 Apr 2001 17:34:41 -0400
Organization: Compilers Central
References: 01-04-077
Keywords: Java, LL(1)
Posted-Date: 14 Apr 2001 17:34:41 EDT

"Raymond Limpus" <> writes:

> Is it possible to parse Java source using a recursive decent parser?
> I know the grammar isn't LL(1) but there are only a couple of parts
> that aren't (stemming form C/C++ background) and surely you could
> create some 'hacks' in the code to deal with these. The grammars I
> have seen have been LALR(1) but by looking at it it does seem you
> could parse it using recursive decent with a couple of special
> cases. Is this the case?

Yes. The ANTLR LL(k) parser generator ( comes
with an example Java grammar. The KJC compiler uses an ANTLR grammar
to parse Java.

Obviously JavaCC (which is LL(k)) comes with an example java grammar!



Post a followup to this message

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