criccomini / proto-schema-parser

A Pure Python Protobuf Parser
MIT License
38 stars 20 forks source link

Parse ANTLR CST into a Protobuf AST #1

Closed criccomini closed 1 year ago

criccomini commented 1 year ago

This is a full-fledged Protobuf 2/3 parser that generates an AST. The AST is represented as Python data classes, one for each node in the AST.

An AST should be much easier to work with.

This post has some good details on CST/AST in ANTLR:

https://stackoverflow.com/questions/29971097/how-to-create-ast-with-antlr4