{"id":16088409,"url":"https://github.com/konard/pegasusexample","last_synced_at":"2025-04-07T16:49:32.688Z","repository":{"id":145146474,"uuid":"178262341","full_name":"Konard/PegasusExample","owner":"Konard","description":"Using Pegasus PEG parser generator on .NET Core","archived":false,"fork":false,"pushed_at":"2021-04-29T19:31:55.000Z","size":22,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T18:53:13.865Z","etag":null,"topics":["csharp","dotnet-core","example","mit-license","msbuild","peg","pegasus"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Konard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-28T18:37:41.000Z","updated_at":"2025-01-17T00:49:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed56b4da-2b58-4354-a746-0fc66c31ef22","html_url":"https://github.com/Konard/PegasusExample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konard%2FPegasusExample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konard%2FPegasusExample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konard%2FPegasusExample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konard%2FPegasusExample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Konard","download_url":"https://codeload.github.com/Konard/PegasusExample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694478,"owners_count":20980729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet-core","example","mit-license","msbuild","peg","pegasus"],"created_at":"2024-10-09T13:36:20.867Z","updated_at":"2025-04-07T16:49:32.668Z","avatar_url":"https://github.com/Konard.png","language":"C#","readme":"[![CodeFactor](https://www.codefactor.io/repository/github/konard/pegasusexample/badge)](https://www.codefactor.io/repository/github/konard/pegasusexample)\n\n# Pegasus Example\n\nMaster 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.\n\nIf you require all in code dynamic compilation, here an example at [dynamic-compile branch](https://github.com/Konard/PegasusExample/tree/dynamic-compile)\n\n## Setup\nRequires .NET Core 2.2 SDK and Runtime.\n\nhttps://dotnet.microsoft.com/download\n\n## Run\n```\ndotnet run\n```\n\n## CompilePegGrammar Task\n\nIf you need to have more control over parsers' compilation than you might need to use CompilePegGrammar:\n\nReplace:\n```XML\n  \u003cItemGroup\u003e\n    \u003cPegGrammar Include=\"Test.peg\" /\u003e\n  \u003c/ItemGroup\u003e\n```\n\nWith:\n```XML\n  \u003cTarget Name=\"CompilePegGrammar\" BeforeTargets=\"BeforeBuild\"  \u003e\n    \u003cCompilePegGrammar InputFiles=\"./Test.peg\" OutputFiles=\"./Test.peg.g.cs\" \u003e\u003c/CompilePegGrammar\u003e\n    \u003cItemGroup\u003e\n      \u003cCompile Remove=\"Test.peg.g.cs\" /\u003e\n      \u003cCompile Include=\"Test.peg.g.cs\" /\u003e\n    \u003c/ItemGroup\u003e\n  \u003c/Target\u003e\n```\n\nCompilePegGrammar generates files in your working directory, so don't forget to add .gitignore rule for that.\n```\n# Generated code\n*.g.cs\n```\n\nThe full example of using CompilePegGrammar can be found here: https://github.com/Konard/PegasusExample/tree/9b0d0abf0fb7cfc8ec14f01eded55a8cd62c08b8\n\n## Development process videos\nhttps://www.youtube.com/playlist?list=PLeYxH0Vd8lotSflSnuA0TlaFUWQ7-E2af\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonard%2Fpegasusexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonard%2Fpegasusexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonard%2Fpegasusexample/lists"}