{"id":23905526,"url":"https://github.com/gapotchenko/turbo-cocor","last_synced_at":"2025-06-19T08:04:24.965Z","repository":{"id":63902269,"uuid":"565866684","full_name":"gapotchenko/Turbo-CocoR","owner":"gapotchenko","description":"Turbo Coco/R is a compile-time compiler generator which takes an attributed grammar of a source language and generates a scanner and a parser for this language.","archived":false,"fork":false,"pushed_at":"2023-05-12T23:22:48.000Z","size":464,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T21:04:59.276Z","etag":null,"topics":["coco-r","compiler-generator","csharp","grammar","parse","parser-generator","parsing","scanner-generator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gapotchenko.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}},"created_at":"2022-11-14T13:50:20.000Z","updated_at":"2024-03-11T03:18:01.000Z","dependencies_parsed_at":"2023-01-14T13:00:36.231Z","dependency_job_id":null,"html_url":"https://github.com/gapotchenko/Turbo-CocoR","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gapotchenko%2FTurbo-CocoR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gapotchenko%2FTurbo-CocoR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gapotchenko%2FTurbo-CocoR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gapotchenko%2FTurbo-CocoR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gapotchenko","download_url":"https://codeload.github.com/gapotchenko/Turbo-CocoR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248334191,"owners_count":21086343,"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":["coco-r","compiler-generator","csharp","grammar","parse","parser-generator","parsing","scanner-generator"],"created_at":"2025-01-05T01:14:48.708Z","updated_at":"2025-04-11T03:21:32.161Z","avatar_url":"https://github.com/gapotchenko.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turbo Coco/R\n\nTurbo Coco/R is a compile-time compiler generator which takes an attributed grammar of a source language and generates a scanner and a parser for this language. It is based on the de-facto Coco/R standard and extends it to be more useful in commercial settings.\n\n## Basics\n\nTurbo Coco/R is very similar to once popular `lex` and `yacc` tools and their open-source `flex` and `bison` counterparts.\nThe main distinction of Turbo Coco/R is that it provides the support for multiple programming languages and generates both a scanner and a parser from a provided grammar file.\n\nThe produced scanners and parsers are tiny, do not have external dependendencies and thus can be embedded into any project at the source level.\n\nThe scanner works as a deterministic finite automaton.\nThe parser uses recursive descent.\nA multi-symbol lookahead or semantic checks can resolve LL(1) conflicts. Thus the class of accepted grammars is LL(k) for an arbitrary k.\n\nTurbo Coco/R rigorously follows the baseline [Coco/R standard](https://ssw.jku.at/Research/Projects/Coco/) while providing a plethora of improvements, extensions, and integrations.\n\n## Getting Started\n\n1. Install Turbo Coco/R tool using .NET package manager:\n\n   ``` sh\n   \u003e dotnet tool install --global Gapotchenko.Turbo.CocoR\n   ```\n\n2. Create your first attributed grammar file:\n\n   ``` sh\n   \u003e turbo-coco new grammar MyLang.atg\n   ```\n\n3. Create the customizable frame files* for a scanner and parser:\n\n   ``` sh\n   \u003e turbo-coco new frame scanner parser\n   ```\n\n   \\* A frame file defines the basic code structure of a source file generated from the grammar.\n\nNow you can generate the actual scanner and parser source files for your grammar:\n\n``` sh\n\u003e turbo-coco MyLang.atg\n```\n\nOnce generated, the files are ready to be compiled as parts of your project.\n\nFor further guidance, see the [examples](https://github.com/gapotchenko/Turbo-CocoR/tree/main/Examples).\n\n## Build Integration\n\nIn addition to the traditional command line approach, Turbo Coco/R offers automatic [build integration](https://github.com/gapotchenko/Turbo-CocoR/tree/main/Source/Integration/MSBuild) to streamline the development process.\n\n## Requirements\n\n- Turbo Coco/R tool requires .NET 7.0+ to run\n\nPlease note that:\n\n- The produced source files are not subject to the requirements and can work under any .NET target framework\n\n## Licensing\n\nTurbo Coco/R is licensed under GNU General Public License v2.0.\n\nIf not otherwise stated, any source code generated by Turbo Coco/R\n(other than Turbo Coco/R itself) does not fall under the GNU General\nPublic License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgapotchenko%2Fturbo-cocor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgapotchenko%2Fturbo-cocor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgapotchenko%2Fturbo-cocor/lists"}