v1.0.0
A tiny JS/TS compiler written in vanilla TS.
Repository
Current version released
3 years ago
TinyCompTS
A tiny Javascript/Typescript compiler written in vanilla Typescript as a hobby project.
Usage
Configure your attribute grammar
- Define your lexical rules in ./config/attributeGrammar/lexicalRuleset.ts
- Define your syntax rules in ./config/attributeGrammar/syntaxRuleset.ts
- Define your semantic rules in ./config/attributeGrammar/semanticRuleset.ts
Configure ./main.ts
- Create a new Compiler object (import from “ts/compiler/Compiler.ts”, requires Lexer.ts, Parser.ts, CodeGenerator.ts)
- Use compiler.compile(“input string) to compile
Run
Install the JS/TS runtime Deno
Execute
deno run ./main.ts