Skip to content

A .Net Antlr4 grammar testing tool set meant to supplement the need for the Antlr Java TestRig when testing C# deployed Antlr4 parsers.

License

Notifications You must be signed in to change notification settings

wiredwiz/Grun.Net

Repository files navigation

Grun.Net

.Net Framework CI License GitHub release

Maintenance GitHub issues open GitHub issues-closed Average time to resolve an issue

PRs Welcome GitHub pull-requests

Twitter URL

A set of tools written in C# for testing Antlr4 generated C# grammar assemblies. These tools are meant to supplement the need to continually test with the Antlr java TestRig assembly. If you want support for the Antlr4.Runtime assembly, install version 1.3.23320.0. If you want support for the Antlr4.Runtime.Standard assembly, then install 2.0.23321.1 instead. You may install both versions together if needed, the 2.x runtime standard versions will install alongside the original without issues. In the future I will work on a version that supports both dynamically, but the current design of the app makes this impossible.

It is important to note that Grun.Net expects .Net Standard targeted assemblies for inspection and testing. If you are building C# ANTLR parsers using .Net (core), then I suggest simply creating a second project that targets standard and sharing your .g4 grammar files between the two projects. That way you can easily compile and test the grammar using the tool while also building the .Net assemblies that you ultimately wish to deploy. I personally use Visual Studio for my development and don't really have any experience doing all the dev in VSCode, so I don't have much input there (perhaps someone more familiar can help there). I know that in studio it is trivial to create your grammar files at a solution level, then create links to them in each project so you only ever need to edit one set of source files.

Please create issues for any bug fixes or feature requests. I want to make this tool better and help improve C# ANTLR development.

Grun.Net is primarily composed of two testing tools: Grun.exe and GrunWin.exe. Grun.exe is a command line testing tool similar to the existing Antlr TestRig. GrunWin.exe is a graphical testing tool with a host of testing features.

Further information on the features and usage of each tool may be found in the wiki.

Below is a demonstration video showing how to use these tools. Demonstration Video

Editor Sample

About

A .Net Antlr4 grammar testing tool set meant to supplement the need for the Antlr Java TestRig when testing C# deployed Antlr4 parsers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages