TextX is a DSL (Domain-Specific Languages) parser simular to ANTLR4. In the TextX tutorial, it demonstrates how to create a meta-model from the grammar file.
For example, given this grammar:
Entity:
'entity' name=ID '{'
properties+=Property
'}'
;
Property:
name=ID ':' type=ID
;
It generates a graphical representation of the meta-model:
How can I generate the meta-model of ANTLR v4 grammar files? The meta-model should be a graph structure - does not have to be graphical. And a bonus to someone who can do it in Python.