Static code analysis for new language. Where to start?

Posted by tinny on Stack Overflow See other posts from Stack Overflow or by tinny
Published on 2010-05-19T22:33:22Z Indexed on 2010/05/19 22:40 UTC
Read the original article Hit count: 246

I just been given a new assignment which looks like its going to be an interesting challenge.

The customer is wanting a code style checking tool to be developed for their internal (soon to be open sourced) programming language which runs on the JVM. The language syntax is very Java like.

The customer basically wants me to produce something like checkstyle.

So my question is this, how would you approach this problem? Given a clean slate what recommendations would you make to the customer?

I think I have 3 options

  1. Write something from scratch. Id prefer not to do this as it seems like this sort of code analysis tool problem has been solved so many times that there must be a more "framework" or "platform" orientated approach.

  2. Fork an existing code style checking tool and modify the parsing to fit with this new language etc etc

  3. Extend or plug into an existing static code analysis tool. (maybe write a plugin for Yasca?)

Maybe you would like to share your experiences in this area?

Thanks for reading

© Stack Overflow or respective owner

Related posts about static-analysis

Related posts about source-code