https://github.com/konard/pegasusexample
Using Pegasus PEG parser generator on .NET Core
https://github.com/konard/pegasusexample
csharp dotnet-core example mit-license msbuild peg pegasus
Last synced: 6 months ago
JSON representation
Using Pegasus PEG parser generator on .NET Core
- Host: GitHub
- URL: https://github.com/konard/pegasusexample
- Owner: Konard
- License: mit
- Created: 2019-03-28T18:37:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T19:31:55.000Z (over 4 years ago)
- Last Synced: 2025-02-13T18:53:13.865Z (8 months ago)
- Topics: csharp, dotnet-core, example, mit-license, msbuild, peg, pegasus
- Language: C#
- Homepage:
- Size: 21.5 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.codefactor.io/repository/github/konard/pegasusexample)
# Pegasus Example
Master branch contains proof of concept example of using [Pegasus](https://github.com/otac0n/Pegasus) PEG generator configured as a [MSBuild](https://github.com/Microsoft/msbuild) Task.
If you require all in code dynamic compilation, here an example at [dynamic-compile branch](https://github.com/Konard/PegasusExample/tree/dynamic-compile)
## Setup
Requires .NET Core 2.2 SDK and Runtime.https://dotnet.microsoft.com/download
## Run
```
dotnet run
```## CompilePegGrammar Task
If you need to have more control over parsers' compilation than you might need to use CompilePegGrammar:
Replace:
```XML
```With:
```XML
```CompilePegGrammar generates files in your working directory, so don't forget to add .gitignore rule for that.
```
# Generated code
*.g.cs
```The full example of using CompilePegGrammar can be found here: https://github.com/Konard/PegasusExample/tree/9b0d0abf0fb7cfc8ec14f01eded55a8cd62c08b8
## Development process videos
https://www.youtube.com/playlist?list=PLeYxH0Vd8lotSflSnuA0TlaFUWQ7-E2af