naturalness / javac-parser

Exposes OpenJDK's Java parser and scanner to Python
https://pypi.org/project/javac-parser/
GNU Affero General Public License v3.0
6 stars 4 forks source link

Can syntax depth be supported? #5

Open Yurii-huang opened 2 years ago

Yurii-huang commented 2 years ago

Sorry, calling lex one-dimensional table seems to have no effect. It seems a bit silly for reference and definition. But I see checkstyle-8.43-all.jar about syntax parsing. I don't understand the meaning of this git.

Or is there any original intention? For example, it enables simple syntax diagnosis

eddieantonio commented 1 year ago

I do not quite understand what the issue is, exactly. Could you please rephrase?

This package was intended for obtaining:

  1. parse errors from the javac compiler (diagnostics)
  2. the one-dimensional token stream from the lexical analysis stage (scanner) of the javac parser

Note that javac does not use two-dimensional information about the source code while parsing -- just when producing error messages. I think it's silly that parsers do not take advantage of the two-dimensional nature of code!