tree-sitter-abl
v0.1.1
Published
ABL grammar for tree-sitter
Maintainers
Readme
tree-sitter-abl
OpenEdge Advanced Business Language (ABL) grammar for tree-sitter.
Forked from @usagi-coffee/tree-sitter-abl
To see syntax tree output see files in test/corpus.
Usage
Keep in mind there are many ABL statements that are not yet implemented but that doesn't necessarily mean they're not parsable, it just means the syntax tree won't have details about the statements!
For the grammar usage in your project look at tree-sitter documentation on how to use the grammar parsers because you can use tree-sitter parsers using node/rust/wasm bindings.
Node
npm install tree-sitter-ablWASM
Prebuilt WASM binary can be found in NPM package or build yourself with npm run build:wasm.
Follow web-tree-sitter binding documentation.
// Getting wasm binary from the npm package
const fs = require('node:fs');
const mod = fs.readFileSync('node_modules/tree-sitter-abl/tree-sitter-abl.wasm');Shared library (.so)
You can build a shared library .so to use it in tools like ast-grep
gcc -shared -fPIC -fno-exceptions -g -I 'src' -o abl.so -O2 src/scanner.c -xc src/parser.c -lstdc++Running the tests
npm run testTesting your file
npm run parse your_file.p