lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Before I try to do this, I was wondering if somebody could tell me whether it is even possible...

I'd like to graphically render an lpeg grammar, by traversing the grammar nodes and creating a dot-syntax (GraphViz) representation of the nodes and relationships. I don't necessarily have access to how the grammar was made (assume it was passed to me externally), so I just wanted to know if it is possible to query the grammar structure directly by stepping through key-value pairs, or whether some parts of it are opaque?