Modified https://github.com/antlr/grammars-v4/tree/master/lua:
As for other ANTLRv4 grammars:
antlr4 LuaLexer.g4 LuaParser.g4
See the grammar in the form of railroad diagrams here.
The following is a callgraph for inspect.lua:
.
On Linux with clang, graphviz and antlr4 installed:
cd examples/cpp/dot
make
Then
wget -q https://raw.githubusercontent.com/kikito/inspect.lua/master/inspect.lua -O -|./callgraph |dot -T png -o inspect.png
The following is an attempt at a dependency graph for Luarocks, as installed on my system:
On Linux with clang, graphviz and antlr4 installed:
cd examples/cpp/deps
make
Then
./deps /usr/bin/luarocks | neato -T png -o deps.png