diff --git a/readme.md b/readme.md index 6d0016d..9dd7a39 100644 --- a/readme.md +++ b/readme.md @@ -4,13 +4,16 @@ A tiny Javascript/Typescript compiler written in vanilla Typescript as a hobby p ## Usage -### Configure ./main.ts +### Configure your attribute grammar 1. Define your lexical rules in ./config/attributeGrammar/lexicalRuleset.ts 2. Define your syntax rules in ./config/attributeGrammar/syntaxRuleset.ts 3. Define your semantic rules in ./config/attributeGrammar/semanticRuleset.ts -4. Create a new Compiler object (import from "ts/compiler/Compiler.ts", requires Lexer.ts, Parser.ts, CodeGenerator.ts) -5. Use compiler.compile("input string) to compile + +### Configure ./main.ts + +1. Create a new Compiler object (import from "ts/compiler/Compiler.ts", requires Lexer.ts, Parser.ts, CodeGenerator.ts) +2. Use compiler.compile("input string) to compile ### Run