tree-sitter grammar for GAP system test files.
See also tree-sitter-gap for the base language grammar (used for injections).
The above is a parse tree generated using the tree-sitter-gaptst grammar for the following code snippet:
# A simple alternating group test
gap> G := Group([
> (1, 2, 3),
Group([ (1,2,3), (2,3,4) ])
> (1, 2)(3, 4)
> ]);
gap> IsNormal(SymmetricGroup(4), G);
true
See the tree-sitter-gap wiki
page for information on installing the grammar for syntax highlighting in neovim and other editors.
To run syntax tree and highlighting tests run
make test_quick
note that highlighting tests will only be run once all syntax tree tests pass.
To run tests against the GAP library and GAP package corpus do
make corpus && make test_all
the first command will checkout a copy of
GAP and download a package archive, then
recursively copy GAP files into the appropriate examples/ subdirectory. The
second command will then parse each of these files using the tree-sitter
grammar. The output of make test_all is a list of GAP files that the
grammar fails to parse, along with some statistics on failing and succeeding
parses.
Try specifying the grammar name as lowercase gaptst, instead of uppercase GAPTST.
Make sure you are using tree-sitter 0.22.2 or above. A breaking change in
highlight group priority was introduces with version 0.22.2, which means that
older versions of the tree-sitter tool will incorrectly highlight the
existing test files.