GithubHelp home page GithubHelp logo

lucyelle / yoakke Goto Github PK

View Code? Open in Web Editor NEW

This project forked from languagedev/yoakke

0.0 0.0 0.0 2.16 MB

A collection of libraries for implementing compilers in .NET.

License: Apache License 2.0

C# 99.94% TypeScript 0.06%

yoakke's Introduction

The Yoakke Compiler Infrastructure

Language- and Compiler development tools in .NET.

All Contributors

What is Yoakke?

Yoakke is a collection of libraries aimed at compiler- and language developers to help them in their development. Most common tasks - like lexing and parsing - are completely automated, but extensibility is kept in mind at every step. All components let you roll your custom solution, but are capable enough to fit most cases by default.

Status warning

Yoakke is still early in development. You can play around with the libraries, but there may be bugs or missing features. Please open an issue if you find a bug, or miss an important feature. All contributions are welcome!

A note for Visual Studio users

If you are experiencing build issues when using Visual Studio around Source Generators, please try enabling the option described here.

What components are there?

  • Lexing: Lexers can be defined completely declaratively, as regular expression annotations - inspired by Logos - over token types. Do not worry, the regular expressions are compiled into Deterministic Finite Automatas, so the resulting code is a lot more efficient, than your average RegEx engine.
  • Parsing: Parsers are defined using a BNF-like notation as annotations over methods that produce the syntax node for the appropriate rule - inspired by rply. The generated parser is a recursive descent one, but supports automatic transformation of direct left-recursion and precedence tables.
  • Syntax trees: ASTs usually are a pain to implement because of all the crud that goes on with them in C#. With an annotation you can generate equality and hash implementations for AST nodes, or define visitors for them.
  • Symbols: While lexical symbols are not too complex to implement, most compilers will need the same abstractions for it. Hence, this is also provided in a small library.
  • Error reporting: Nice error messages on console are a pain. You have to align arrows, properly color text segments, number lines and so on. Fortunately, there is a component that provides you a nice fluent API - inspired by the beautiful codespan library - to generate a message, render it however you want to. You can even create a custom syntax-highlighter for source lines!
  • Language Server: The Language Server Protocol defines a generic way for language tools to communicate with text editors. A library already implements the protocol, you just need to provide your own handler for events!

Library roadmap

This is a list of the libraries that are planned for implementation, along with their status:

Library Status Nuget Nuget Notes
Lexer πŸ†— Nuget version (Yoakke.Lexer)
Nuget version (Yoakke.Lexer.Generator)
Parser πŸ†— Nuget version (Yoakke.Parser)
Nuget version (Yoakke.Parser.Generator)
Error message reporting πŸ†— Nuget version (Yoakke.Reporting)
AST generator, visitor πŸ†— Nuget version (Yoakke.Ast)
Nuget version (Yoakke.Ast.Generator)
Lexical symbols πŸ†— Nuget version (Yoakke.Symbols)
Language server protocol 🚧 Nuget version (Yoakke.Lsp.Model)
Nuget version (Yoakke.Lsp.Server)
C syntax
(pre-processor, lexer, parser)
🚧 Nuget version (Yoakke.C.Syntax)
Type-system πŸ“
Virtual Machine πŸ“
X86 Assembly 🚧 Nuget version (Yoakke.X86 )
Debugger πŸ“
Dependency system
(incremental compilation)
πŸ“
Debug adapter protocol πŸ“
  • Done: βœ…
  • Consider mostly done: πŸ†—
  • Work in progress: 🚧
  • Planned: πŸ“

Documentation

Documentation is very much work-in-progress, but you can always find the latest version in the Documentation folder. Feel free to open up Pull-Requests, if you see mistakes!

Developer documentation

Make sure to read our contributing document! Some developer documents about describing the projects is - hopefully - coming soon aswell.

Examples

Work in progress...

Sample projects

Work in progress...

Using Yoakke Badge

If you use Yoakke and would be willing to show it, here is a badge you can copy-paste into your readme:
Using Yoakke

<a href="https://github.com/LanguageDev/Yoakke" alt="Using Yoakke"><img src="https://raw.githubusercontent.com/LanguageDev/Yoakke/master/.github/resources/UsingYoakke.svg" title="Using Yoakke" alt="Using Yoakke"/></a>

Contributors ✨

Thanks goes to these wonderful people (emoji key):


LPeter1997

πŸ“† πŸ€” πŸ’» πŸ“– 🚧 πŸš‡ πŸ‘€ ⚠️

WhiteBlackGoose

πŸš‡ πŸ“–

Zachary Patten

🎨 πŸš‡

Neko

πŸ€” πŸ’» ⚠️ πŸ““ πŸ› πŸ’¬

Sang

πŸ’»

lucyelle

πŸ“–

PΓ©ter FΓ³nad

πŸ“– πŸš‡

This project follows the all-contributors specification. Contributions of any kind welcome!

yoakke's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.