This is a tool that will convert a BNF (conforming to the GOCC syntax) for a language to a SublimeText Syntax Highlighting Plugin. It uses gocc, a parser generator written in Go.
If we assume that we generated a binary file called sublimegen
. Running it for the language
Calc
whose configuration files can be found in languagefiles/calc_languagefiles
is ass follows:
./sublimegen -fileTypes "calc" -name "Calc" -scopeName "source.calc" -source languagefiles/calc_languagefiles/calc.bnf -scopes languagefiles/calc_languagefiles/scopes.json -orderregex 1
- golang-pkg-pcre
- libpcre++-dev
- gouuid
- greenery
- Python 2.7.6
- gocc
The python scripts (scripts/generate-*.py
) are used for testing. The tool does not depend on them.
The scripts depend on xeger (it can also be found in rstr).