Parser generators on the Web
The web is full of many wonderful things, but when it comes to online parser generators, there aren’t that many.
In my implementation of Trash on the Web, I collected a list of some online parser generators. There aren’t many, and most have a restricted set of features. For example, REx is probably the best in conversion and parser generation, but it doesn’t have basic grammar analysis. Many of the sites do not offer EBNF input, and none of the sites tell the user what the input syntax is.
REx
- Link
- Computes conversions to REx EBNF for ABNF, Antlr3, Antlr4, Bison, GOLD, Instaparse, JavaCC, Jison, PEG.js, XText
- Computes parsers for REx grammar input, which is a variant of W3C EBNF. LL(k), backtracking.
- 18 grammars in REx EBNF for various languages.
Grammophone
- Link
- Previous version at University of Calgary link
- No online help pages.
- Computes:
- Sanity checks.
- LL(1), LR(0), SLR(1), LALR(1), LR(1) automaton and table
- Syntax:
- LHS symbol can be upper or lower case alphabetic.
- LHS/RHS separator is ‘->’.
- Rule separator is ‘.’.
- Rules can span multiple lines.
- Does not accept BNF or EBNF.
Princeton Online LL(1) demo
- Link
- Based on SJMachines SourceForge online LL(1) parser generator.
- Accepts basic CFG input. Does not accept grammar syntax >=BNF (‘|’ is considered a terminal).
- Accepts basic CFG input. Does not accept BNF, EBNF. ‘|’ is considered a terminal.
- Syntax:
- LHS symbol can be upper or lower case alphabetic.
- LHS/RHS separator is ‘::=’.
- Newline is rule separator.
- Entire rule must be on one line (no splitting of the rule across lines).
- Computes FIRST, FOLLOW, Nullable property, LL(1) table.
SJMachines SourceForge online LL(1)
- Link
- Accepts basic CFG input. Does not accept BNF, EBNF. ‘|’ is considered a terminal.
- Syntax:
- LHS symbol can be upper or lower case alphabetic.
- LHS/RHS separator is ‘->’.
- Newline is rule separator.
- Entire rule must be on one line (no splitting of the rule across lines).
- Computes FIRST, FOLLOW, Nullable property, LL(1) table.
Online PEG.js
- Link
- Computes PEG parser for JavaScript only.
- Inputs PEG.js.
Planetcalc online LL(1)
- Link
- Accepts custom EBNF: comma-separated symbols; semi-colon terminated rules; grouping; double-quote terminals.</li><li>Computes parser table (JSON), cycles, detects left recursion but does not generate a parser.
Kocman’s LL(k) parser generator
- Link
- Simplified YACC input grammar, and k.
- Outputs LL(k) tables, with export to CSV.
HackingOff LL(1) parser generator
- Link
- Accepts BNF sytax. It does not take EBNF as it claims, since it does not accept Kleene closure (either post-fix plus, or curly brackets).
- Computes FIRST, FOLLOW, LL(1) tables.
Trash on the web
- Link
- Currently I’m developing Trash on the Web. But, I plan to have conversion, table and parser generation, analysis, automaton output and display, LR(k), ALL(*), FIRST, FOLLOW, and transformations.