Skip to content

Protobuf Schema Parser for C# is an implementation of Protobuf Schema parsing.

License

Notifications You must be signed in to change notification settings

Hammerliu/ProtoParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protobuf Schema Parser for C#

Protobuf Schema Parser for C# is an implementation of Protobuf Schema parser, ported from proto-schema-parser.

Installation

Copy the code into your project and install Antlr4.Runtime.Standard from NuGet.

Usage

Call the static method Parse under ProtoParser.

using Parser = ProtoParser.ProtoParser;

var protoText = """
    syntax = "proto3";

    package com.book;

    message Book
    {
        int64 isbn = 1;
        string title = 2;
        string author = 3;
    }
    """;

var file = Parser.Parse(protoText);

The variable 'file' will contain various nodes in the AST. All nodes implement the 'IElement' interface, which is used to get the node type.

License

This project is under the MIT license.

About

Protobuf Schema Parser for C# is an implementation of Protobuf Schema parsing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published