A JSON parser
Your first contact with lexers and grammars. Tokenize, build the tree and fail with useful errors.
TypeScript · Python · Go · Java
Tokenizer, parser, evaluador y closures. Descubre cómo un lenguaje ejecuta tu código, paso a paso.
Build it in your language
The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.
Lisp se eligió por una razón: su sintaxis es tan mínima que el parser se quita de en medio en una tarde y puedes dedicar el resto del reto a lo interesante, que es la evaluación.
Construirás un intérprete completo: entornos, funciones, closures, recursión y macros. Al terminar entenderás qué hace tu lenguaje favorito entre que pulsas «ejecutar» y aparece el resultado.
11 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.
Tokenizador, lector de expresiones-S y representación de átomos y listas.
Entornos, variables, aritmética, condicionales y formas especiales.
Lambdas, ámbito léxico, recursión y llamadas de cola optimizadas.
Quote, macros, errores con traza y una pequeña librería.
Your first contact with lexers and grammars. Tokenize, build the tree and fail with useful errors.
TypeScript · Python · Go · Java
From source code to runnable bytecode. Lexing, AST, semantic analysis, code generation and a VM that runs it.
Rust · C++ · TypeScript
From the expression to the automaton. Backtracking, groups and character classes without your language's regex.
TypeScript · Python · Rust