简体   繁体   中英

Use ANTLR based parser in PMD (to implement a Apex language module)

We're working on a language module (fork) for the Salesforce.com language Apex. It's a proprietary language where no open grammar is available. What is available is an ANTLR based parser library under the Eclipse Public License that I would like to use.

How would we do this technically? Is there any example or tutorial on how to use a custom parser? I found only JJTree/JavaCC based code and guess some kind of adapter is needed. I can't imagine that nobody has used ANTLR with PMD before.

A little bit late, but still for completeness.

ANTLR support on PMD is in the official roadmap , but still on a very early planning stage.

On the other hand, Apex is now fully supported on PMD thanks to the works of the original poster and other talented developers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM