Skip to content
John Gietzen edited this page Mar 25, 2019 · 14 revisions

Installing

The easiest way to get a copy of Pegasus is to install the Pegasus NuGet package in Visual Studio.

PM> Install-Package Pegasus

Setting Up Your Project

Once you have the package installed, files in your project marked as 'PegGrammar' in the properties window will be compiled to their respective parser classes during each build.

To mark a file as a 'PegGrammar' simply select the file in the solution explorer, hit F4 (to bring up the properties window), and choose 'PegGrammar' from the 'Build Action' drop-down. If the build action is not available, you may need to reload your project. (Note: For .NET Standard projects, you will need to manually set the build action in the .csproj file)

A Visual Studio Extension is available that includes an item template for new grammars.

Clone this wiki locally