feat: add instructions for TS parser generation

This commit is contained in:
Yarmo Mackenbach 2024-08-13 16:44:34 +02:00
parent d924d61d56
commit 1e4561880b
No known key found for this signature in database
GPG key ID: 2B71CD64664999B6
2 changed files with 11 additions and 2 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
.antlr .antlr
takentaal

View file

@ -4,6 +4,14 @@
```bash ```bash
nix develop nix develop
antlr4-parse takentaal.g4 takentaal example -tree
# Inspect lexer
antlr4-parse takentaal.g4 takentaal example -tokens antlr4-parse takentaal.g4 takentaal example -tokens
# Inspect parser
antlr4-parse takentaal.g4 takentaal example -tree
antlr4-parse takentaal.g4 takentaal example -gui
# Generate TypeScript parser
antlr4 -Dlanguage=TypeScript -o takentaal takentaal.g4
`` ``