bd82 / java-parser

A javascript based java parser based on chevrotain
0 stars 0 forks source link

Evaluate Grammar Rewrite to conform with the grammar structure in the spec. #8

Closed bd82 closed 5 years ago

bd82 commented 5 years ago

There seems to be deviations from the structure in the official specs.

It does not mean we are dealing with different grammars, the same grammar can be written in many forms...

But there is a definite advantage to aligning as close as possible to the official spec naming and structure, mainly in the ease of maintenance and upgrading to future Java versions.

Some deviations are expected as the spec are left recursive and may not use parameterized rules notations. But it seems there are too many deviations... Perhaps the original implementation used something other source as the reference instead of the official spec.

bd82 commented 5 years ago

Looks like much of the deviations are valid because the grammar in the spec is not LL(K)