Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/virresh/pyclassmethodnamefetcher

Use ANTLRv4's python runtime with the official ANTLR's grammar for Python, to fetch class methods in any python source code
https://github.com/virresh/pyclassmethodnamefetcher

antlr4 antlr4-python3 visitor-pattern

Last synced: 18 days ago
JSON representation

Use ANTLRv4's python runtime with the official ANTLR's grammar for Python, to fetch class methods in any python source code

Awesome Lists containing this project

README

        

# Get Class Methods in a Python Source code
Use ANTLR-based parse tree to obtain a json dictionary of class
names and corresponding class functions from a python 3 source code.

Corresponding writeup at : https://virresh.wordpress.com/2018/06/27/dive-deeper-into-antlr-write-a-python-meta-program/

In case you do not already have it, install the `antlr4-python3-runtime` using:
```
pip install antlr4-python3-runtime
```