{"id":2914,"date":"2021-09-05T10:44:51","date_gmt":"2021-09-05T14:44:51","guid":{"rendered":"http:\/\/codinggorilla.com\/?p=2914"},"modified":"2021-10-13T09:18:45","modified_gmt":"2021-10-13T13:18:45","slug":"parser-generators-on-the-web","status":"publish","type":"post","link":"http:\/\/165.227.223.229\/index.php\/2021\/09\/05\/parser-generators-on-the-web\/","title":{"rendered":"Parser generators on the Web"},"content":{"rendered":"\n<p>In my implementation of <em>Trash on the Web<\/em>, I collected a list of some online parser generators. There aren&#8217;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&#8217;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.<\/p>\n\n\n\n<!--more--><\/p>\n\n\n\n<h2>REx<\/h2>\n\n\n\n<ul><li><a href=\"https:\/\/www.bottlecaps.de\/rex\/\" class=\"ek-link\">Link<\/a><\/li><li>Computes conversions to REx EBNF for ABNF, Antlr3, Antlr4, Bison, GOLD, Instaparse, JavaCC, Jison, PEG.js, XText<\/li><li>Computes parsers for REx grammar input, which is a variant of W3C EBNF. LL(k), backtracking.<\/li><li>18 grammars in REx EBNF for various languages.<\/li><\/ul>\n\n\n\n<h2>Grammophone<\/h2>\n\n\n\n<ul><li><a href=\"https:\/\/mdaines.github.io\/grammophone\/\" class=\"ek-link\">Link<\/a><\/li><li>Previous version at University of Calgary <a href=\"https:\/\/smlweb.cpsc.ucalgary.ca\/\" class=\"ek-link\">Link<\/a><\/li><li>No online help pages.<\/li><li>Computes:<ul><li>Sanity checks.<\/li><li>LL(1), LR(0), SLR(1), LALR(1), LR(1) automaton and table<\/li><\/ul><\/li><li>Syntax:<ul><li>LHS symbol can be upper or lower case alphabetic.<\/li><li>LHS\/RHS separator is &#8216;-&gt;&#8217;.<\/li><li>Rule separator is &#8216;.&#8217;.<\/li><li>Rules can span multiple lines.<\/li><li>Does not accept BNF or EBNF.<\/li><\/ul><\/li><\/ul>\n\n\n\n<h2>Princeton Online LL(1) demo<\/h2>\n\n\n\n<ul><li><a href=\"https:\/\/www.cs.princeton.edu\/courses\/archive\/spring20\/cos320\/LL1\/\" class=\"ek-link\">Link<\/a><\/li><li>Based on SJMachines SourceForge online LL(1) parser generator.<\/li><li>Accepts basic CFG input. Does not accept grammar syntax &gt;=BNF (&#8216;|&#8217; is considered a terminal).<\/li><li>Accepts basic CFG input. Does not accept BNF, EBNF. &#8216;|&#8217; is considered a terminal.<\/li><li>Syntax:<ul><li>LHS symbol can be upper or lower case alphabetic.<\/li><li>LHS\/RHS separator is &#8216;::=&#8217;.<\/li><li>Newline is rule separator.<\/li><li>Entire rule must be on one line (no splitting of the rule across lines).<\/li><\/ul><\/li><li>Computes FIRST, FOLLOW, Nullable property, LL(1) table.Computes FIRST, FOLLOW, Nullable property, LL(1) table.<\/li><\/ul>\n\n\n\n<h2>SJMachines SourceForge online LL(1)<\/h2>\n\n\n\n<ul><li><a href=\"http:\/\/jsmachines.sourceforge.net\/machines\/ll1.html\" class=\"ek-link\">Link<\/a><\/li><li>Accepts basic CFG input. Does not accept BNF, EBNF. &#8216;|&#8217; is considered a terminal.<\/li><li>Syntax:<ul><li>LHS symbol can be upper or lower case alphabetic.<\/li><li>LHS\/RHS separator is &#8216;-&gt;&#8217;.<\/li><li>Newline is rule separator.<\/li><li>Entire rule must be on one line (no splitting of the rule across lines).<\/li><\/ul><\/li><li>Computes FIRST, FOLLOW, Nullable property, LL(1) table.<\/li><\/ul>\n\n\n\n<h2>Online PEG.js<\/h2>\n\n\n\n<ul><li><a href=\"https:\/\/pegjs.org\/online\" class=\"ek-link\">Link<\/a><\/li><li>Computes PEG parser for JavaScript only.<\/li><li>Inputs PEG.js.<\/li><\/ul>\n\n\n\n<h2>Planetcalc online LL(1)<\/h2>\n\n\n\n<ul><li><a href=\"https:\/\/planetcalc.com\/5600\/\" class=\"ek-link\">Link<\/a><\/li><li>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.<\/li><\/ul>\n\n\n\n<h2>Kocman&#8217;s LL(k) parser generator<\/h2>\n\n\n\n<ul><li><a href=\"http:\/\/www.fit.vutbr.cz\/~ikocman\/llkptg\/\" class=\"ek-link\">Link<\/a><\/li><li>Simplified YACC input grammar, and k.<\/li><li>Outputs LL(k) tables, with export to CSV.<\/li><\/ul>\n\n\n\n<h2>HackingOff LL(1) parser generator<\/h2>\n\n\n\n<ul><li><a href=\"http:\/\/hackingoff.com\/compilers\/ll-1-parser-generator\" class=\"ek-link\">Link<\/a><\/li><li>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).<\/li><li>Computes FIRST, FOLLOW, LL(1) tables.<\/li><\/ul>\n\n\n\n<h2>Trash on the web<\/h2>\n\n\n\n<ul><li><a href=\"http:\/\/codinggorilla.com\/publish-web-site\/wwwroot\/\" class=\"ek-link\">Link<\/a><\/li><li>Currently I&#8217;m developing <em>Trash on the Web<\/em>. But, I plan to have conversion, table and parser generation, analysis, automaton output and display, LR(k), ALL(*), FIRST, FOLLOW, and transformations.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my implementation of Trash on the Web, I collected a list of some online parser generators. There aren&#8217;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&#8217;t have basic grammar analysis. Many of the sites do not offer EBNF &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/165.227.223.229\/index.php\/2021\/09\/05\/parser-generators-on-the-web\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Parser generators on the Web&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/2914"}],"collection":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/comments?post=2914"}],"version-history":[{"count":0,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/2914\/revisions"}],"wp:attachment":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/media?parent=2914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/categories?post=2914"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/tags?post=2914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}