Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(protobuf): add antlr grammar and parser for protobuf files #31
This commit introduces support for parsing Protocol Buffers (protobuf) files by adding an ANTLR grammar and associated parser. The antlr grammar (Protobuf3.g4) is based on the protobuf3 specification and includes a comprehensive set of rules for all protobuf syntax elements. The antlr-generated parser (Protobuf3Lexer and Protobuf3Parser) is used by the ProtobufAnalyser class to analyze protobuf files and extract package and message information. Additionally, the commit includes a test protobuf file (common.proto) and a test case (ProtobufAnalyserTest.kt) to validate the parser. The antlr-generated lexer and parser are configured in build.gradle.kts, and the protobuf grammar file is located in src/main/antlr. The antlr grammar and parser provide a solid foundation for further protobuf analysis and processing within the Chapi project.
- Loading branch information