Hi John,

Thanks for the report! It seems we weren't lexing '#error' yet (that's probably what is on line 59 in "/usr/include/complex.h", right? Otherwise send me the line 59).

The newest version should detect #error properly (and also checks for ends of directives, and *.hpp/*.cpp).

Talking about antlr4, it seems the AST is analyzed using the visitor pattern (that approach is also used in libclang) but NetBeans <= 8.2 expects the whole AST in memory, so it seems we have a long refactoring road ahead (all this after successfully migrating the CXXParser.g to antlr4, which reads >3300 lines long).

In parallel I'm giving libclang [1] a run. It seems quite powerful (it provides completion, precompiled headers, reparsing, diagnostics, AST) but it may require an extra +30Mb download on Windows (linux users may apt-get install libclang, though). More on this in a few days.

Thanks again,
Antonio

[1]
https://clang.llvm.org/doxygen/group__CINDEX.html

El 10/5/21 a las 21:39, John Kostaras escribió:
+1 cnd.nextapt

java -Dlexer.print=false -jar
target/cnd.apt.antlr4-1.0-SNAPSHOT-jar-with-dependencies.jar /usr/include
....
-- /usr/include/complex.h --
Syntax error on 59:12 token recognition error at: '"clang diagnostic
ignored \"'

Will also take a look. Thanks Antonio. Great initiative.

P.S. I guess .hpp/.cpp files are next?

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to