2 ms·
Another tangentially related tool that I recently learned about is "BNFC": Given a Labelled BNF grammar the tool produces: - an abstract syntax imple
by dunham 4y ago
Another tangentially related tool that I recently learned about is "BNFC":
Given a Labelled BNF grammar the tool produces:
- an abstract syntax implementation in the target language,
- a case skeleton for the abstract syntax in the target language,
- a pretty-printer in the target language,
- an Alex, JLex, or Flex lexer generator file ,
- a Happy, CUP, or Bison parser generator file, and
- a LaTeX file containing a readable specification of the language.
Targeting C, Haskell, Agda, C, C++, Java, or OCaml.
Might be fun to expand on this to generate tree-sitter, highlight.js, or a vscode extension.
http://bnfc.digitalgrammars.com/ http://bnfc.digitalgrammars.com/