1

I am looking for a way to get information from source code files written in python and java. But my aim is an abstract or extendable solution.

I would like to get things like:

  • order of functions
  • parameters from function
  • intends
  • counting loops
  • imports
  • abstract syntax tree

My first idea was to use linter like pylint and checkstyle and call them from python and parse that result.

Then I found antlr which has a python and java grammar and can create lexer and parser for each language. Version 4 seems to support python.

Does anyone come up with a tool or other idea to get my information ?

Or tell me if antlr would be a good way to get an abstract way for solving this problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.