This is a parser for Applesoft BASIC intended for use with language servers. It is built using the Tree-sitter system. Bindings are available for several languages. The following pre-built packages are available:
- Parsing Applesoft with C++
- Parsing Applesoft with Rust
- Parsing Applesoft with WASM
- Parsing Applesoft with Node
For details on parser usage and design see the wiki.
The build products are generated using `script/build.py, see docstring within for dependencies.
This is a cascaded build. The starting files are token_list.txt, grammar-src.js, and scanner-src.c. These are used by token_processor.py to produce grammar.js and src/scanner.c (a simplified TextMate grammar is also generated here). These are used by tree-sitter generate to produce src/parser.c and, in turn, the bindings for various languages. These are used by tree-sitter build to produce the WASM parser.
The build.py script produces a case insensitive parser that accepts extended CALL syntax, but can be easily modified to produce a more strict parser.
- Applesoft BASIC Programmer's Reference Manual - Volume 1
- Applesoft BASIC Programmer's Reference Manual - Volume 2