/ README.md
README.md
 1  # @bablr/bablr-vm
 2  
 3  [![come chat on Discord](https://img.shields.io/discord/1151914613089251388)](https://discord.gg/NfMNyYN6cX)
 4  
 5  Welcome to the home of the BABLR VM! The VM is at the core of the BABLR language definition ecosystem: its purpose is to provide a powerful, well-specified, universally-available execution environment for parsers.
 6  
 7  By doing this BABLR makes it possible to create tools which integrate more deeply: it can create consensus around basic definitions that must be shared between well-integrated tools.
 8  
 9  ## Usage
10  
11  Unless you are a power user, you should be using either [the BABLR API](https://github.com/bablr-lang/bablr) or [the BABLR CLI](https://github.com/bablr-lang/bablr-cli). If you are a power user (or otherwise have unique reuquirements) looking at how those packages are implemented will be a good place to start.
12  
13  ## Features
14  
15  Parsers defined on the BABLR VM
16  
17  - Execute in a streaming, LR fashion
18    - Hold output as necessary for expression building
19  - Do just-in-time tokenization
20  - Support backtracking to resolve ambiguity
21  - Support arbitrary-size textual lookahead
22  - Offer high-level tools for defining trivia and precedence
23  - Produce results as a CSTML stream or an agAST tree
24  - Are backwards compatible with new VMs
25  - Are freely extensible
26  - Allow incremental reparsing (for responsivene editing)
27  - Can be easily debugged
28  - Get a comment attachment engine for free
29  - Support parsing templates (programs with holes in them)
30  
31  Parsers defined on the BABLR VM do not have error recovery, and this is on purpose. In general error recovery is not science, it's guesswork necessary to keep the semantic model of the program from continually blinking into and out of existence as the user types syntax, passing through invalid syntactic states.
32  
33  BABLR instead aims to make the most obvious solution the most pleasant: help users edit syntax without passing through invalid states