@anteriorai/srg-grammar
v0.5.1
Published
Tree-sitter grammar for SRG (Symbolic Reasoning Graph) language
Readme
@anteriorai/srg-grammar
Tree-sitter grammar for the SRG (Symbolic Reasoning Graph) language.
The published package ships a pre-built tree-sitter-srg.wasm and language-configuration.json ready for direct use — you don't need the tree-sitter CLI to consume it.
Public preview. This package is an early public release of Anterior's symbolic reasoning tooling. It is being published to support transparency, research discussion, and early experimentation while the broader open-source repository is prepared for release.
Future releases may be made available under updated licensing terms. Until then, use of this package is governed by the license included with this release.
This release should not be treated as a supported product, a stable API, or a complete reference implementation. It is provided "as is," without warranties of any kind. Users are responsible for evaluating correctness, security, compliance, and suitability for their own use case.
Installation
npm install @anteriorai/srg-grammarUsage
// Editor metadata (tokens, comments, brackets, etc.)
import languageConfigJson from '@anteriorai/srg-grammar/language-configuration.json';
console.log(languageConfigJson);Development
Generate the parser
npm run buildRun tests
npm testParse a file
npm run parse your_file.srgGrammar
The SRG grammar supports:
- Predicates:
predicate id: "question" - Outcomes:
outcome id: "description" - Aggregators:
all(),any(),none(),atleast(n, ...), etc. - Named definitions:
define name: expression - Paths:
root => aggregator1 => aggregator2 => ... => outcome - Comments:
# comment
See the grammar.js file for the complete specification.
