Skip to content

About

[WIP] Grammars for FlatPPL

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

FlatPPL Grammars

Editor grammar definitions for FlatPPL — the Flat Portable Probabilistic Language, a minimal, inference-agnostic language for specifying probabilistic models.

They also provide injection grammars so editors highlight FlatPPL embedded in host languages: flatppl(r"""…""") in Python, flatppl"""…""" in Julia, and ```flatppl fenced blocks in Markdown.

Grammars

Target File Used by
TextMate flatppl.tmLanguage.json VS Code, GitHub, …
tree-sitter grammar.js + src/scanner.c Neovim, Helix, …
Kate / skylighting flatppl.xml Pandoc highlighting
Pygments flatppl_lexer.py Sphinx, Jupyter, pygmentize
CodeMirror textmate-highlight.ts Web editors (e.g. flatppl-js playground)
highlight.js flatppl.js Web docs, static-site toolchains

Keyword lists for all grammars are single-sourced from keyword-lists.json.

Development

pixi run check         # run all checks (CI runs the same)
pixi run gen-grammars  # regenerate grammars from keyword-lists.json

See CONTRIBUTING.md to add builtins, operators, brackets, or new editor targets.

Notes

  • cspell/flatppl-words.txt — canonical spell-check dictionary of FlatPPL builtins / keywords.
  • pixi.lock is gitignored deliberately (ecosystem-wide policy: a lighter VCS footprint over a strict environment lock). Please don't add it.

Funding

This work was supported by Germany's Federal Ministry of Research, Technology and Space (BMFTR) within the ErUM-Data programme under grant FKZ 05D25PC1 (DEMOS consortium).

License

MIT

About

[WIP] Grammars for FlatPPL

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages