from Hacker News

Show HN: Yacc/Lex editor/tester online

by mingodad on 9/7/23, 5:28 PM with 1 comments

I'm building an online yacc/lex (LALR(1)) grammar editor/tester to help develop/debug/document grammars, the main repository is here https://github.com/mingodad/parsertl-playground and the online playground with several non trivial examples is here https://mingodad.github.io/parsertl-playground/playground/ .

Select a grammar/example from "Examples" select box and then click "Parse" to see a parser tree for the source in "Input source" editor.

It's based on https://github.com/BenHanson/gram_grep and https://github.com/BenHanson/lexertl14 .

Any feedback is welcome !

The grammars available so far (with varying state of correctness):

- Ada parser

- Akwa parser (not working)

- Aliceml parser (partially working)

- Ansi C11 parser (partially working)

- Ansi C18 parser (partially working)

- Ansi C parser

- Antlr4.5 parser

- Bison parser (partially working)

- Blawn parser

- Braille parser (not working)

- C3c parser

- Calculator parser

- Carbon parser (need review of '*')

- Chapel parser

- CocoR parser (partially working)

- Cpp5-v2 parser (not working)

- Cql parser

- Cxx parser (not working)

- Doxygen code scanner torture

- Ecere parser (not working)

- GramGrep parser

- HTML parser

- idl2cpp parser

- Ispc parser

- Java11 parser

- JavascriptCore parser

- Jq parser (partially working)

- Json5 parser

- Json lexer

- Json parser

- LALR parser

- Lark parser

- Lezer parser (partially working)

- LFortran parser (partially working)

- Linden Script parser

- Lox parser

- LPegrex parser (partially working)

- LPython parser (not working)

- Lua2ljs parser

- Lua-5.3 parser

- Lua parser

- LuaPP parser (partially working)

- Minic parser

- Minizinc parser (not working)

- MSTA parser

- Mulang parser (not working)

- Openscad parser (partially working)

- Peg parser (partially working)

- Pikchr parser

- Playground3 parser

- Playground parser

- PnetC parser

- PnetCSHarp parser

- PnetDPas parser

- PnetJava parser

- PnetVBasic parser

- Postgresql parser (be patient)

- Preprocessor parser (not working)

- Rust parser

- Scheme parser

- Souffle parser

- Tameparse parser (not working)

- Textdiagram parser

- Textmapper parser

- Webassembly interpreter parser

- XML parser

- Z80 assembler parser