The difference between comment and document about the parser

Guoxiong Li lgxbslgx at
Fri Jan 22 08:49:41 UTC 2021

Hi all,

The comment at class jdk.compiler/
states it as below.

/** The parser maps a token sequence into an abstract syntax
 *  tree. It operates by recursive descent, with code derived
 *  systematically from an LL(1) grammar. For efficiency reasons, an
 *  operator precedence scheme is used for parsing binary operation
 *  expressions.

And the document of the project `Compiler Grammar`[1] states it as below.

> The parser that is currently in the javac compiler is a hand-written LALR

We can see that one is  LL(1) and another is LALR. I think the comment may
be right.
No matter which one is the right description, the difference is not
acceptable and need to be unified.

What is your opinion? Any idea is appreciated.


Best Regards.

-- xiong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the compiler-dev mailing list