Language development toolchain - racket/racket GitHub Wiki
Contents
- IDE(DrRacket) - Modern with specific support macros and language development.
- The C Foreign Function Interface - to interface with stuff that isn't Racket
- Syntax Parse macros - Macro system with error messages
- Libraries - for language development
- Meta-DSL's - DSL's to support language development
- Lexers and Parsers - for supporting a variety of syntaxes
New:
- https://school.racket-lang.org/2019/plan/index.html
- https://soegaard.github.io/mythical-macros/
- http://rmculpepper.github.io/malr/index.html
IDE (DrRacket)
DrRacket includes support for multiple languages and supports extension to add more.
- Macro Stepper(Macro Debugger) to inspect Macro Expansion.
Extending DrRacket:
Other plugins for macro development
Todo List
DrRacket plugin 'intended for use with cooperating languages, especially statically typed languages and proof assistants'.- ...
The C Foreign Function Interface
The ffi/unsafe library enables the direct use of C-based APIs within Racket programs—without writing any new C code. (e.g. The C FFI is how #lang video
calls the ffmpeg
.) (see also Embedding Racket in larger programs.)
- Tutorial: Using Racket’s FFI
- Foreign Interface for PLT Scheme by Eli Barzilay & Dmitry Orlovsky (pdf)
- FFI examples
Syntax Parse macros
- "syntax/parse helps you build robust embedded DSLs in minutes"
- syntax-parse-example Example macros, written using syntax/parse.
- Macros and Languages in Racket by Ryan Culpepper [email protected]
- https://www2.ccs.neu.edu/racket/pubs/dissertation-culpepper.pdf
Libraries
libraries to aid languages construction
- Rebellion "Rebellion is a set of infrastructure libraries for Racketeers to build new languages, new frameworks, and new tools with."
Meta-DSL's
languages that can be used to create languages
- The
turnstile
language "[...]aims to help Racket programmers create typed languages. It does so with extensions of Racket’s macro-definition forms that facilitate implementation of type rules alongside normal macro code." #lang rosette
to make a solver-aided domain-specific languages. See Growing Solver-Aided Languages with ROSETTE by Emina Torlak & Rastislav Bodik
Lexers and Parsers
- brag: a better Racket AST generator
- lex- and yacc-style lexer and parser generators supporting generating both LALR(1) Parsers and Context-Free Parsers with functionality to convert
C-language
yacc
orbison
grammars - recursive descent parser 'The [Racket] Reader'
- PEG parser generator
- parsack, a Racket implementation of parsec, a parser combinator library
- megaparsack, another Racket implementation of parsec. Parsers generated by megaparsack take arbitrary tokens as input and can return syntax objects; parsack parsers' input is limited to text or bytes.
See also;
Language Design Resources on language design
Example Languages Example languages built on or with the Racket toolchain