{"id":2919,"date":"2010-12-13T22:05:59","date_gmt":"2010-12-14T03:05:59","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=2919"},"modified":"2010-12-13T22:26:50","modified_gmt":"2010-12-14T03:26:50","slug":"derivative-parsing","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2010\/12\/13\/derivative-parsing\/","title":{"rendered":"Derivative Parsing"},"content":{"rendered":"<p><a href=\"http:\/\/arxiv.org\/abs\/1010.5023\">Matthew Might and David Darais<\/a> (via <a href=\"http:\/\/lambda-the-ultimate.org\/node\/4148\">Lambda<\/a>):<\/p>\n<blockquote cite=\"http:\/\/arxiv.org\/abs\/1010.5023\"><p>This work introduces parsers based on the derivative of context-free languages and upon the derivative of parser combinators. Parsers based on derivatives meet all of the aforementioned requirements: they accept arbitrary grammars, they produce parse forests efficiently (and lazily), and they are easy to implement (less than 250 lines of Scala code for the complete library). Derivative-based parsers also avoid the precompilation overhead of traditional parser generators; this cost is amortized (and memoised) across the parse itself. In addition, derivative-based parsers can be modified mid-parse, which makes it conceivable that a language could to modify its own syntax at compile- or run-time.<\/p><\/blockquote>\n<p>An interesting approach. The paper is actually called &ldquo;Yacc Is Dead,&rdquo; which I think is true in the sense that for a variety of pragmatic reasons most programmers today do not write their parsers using Yacc-style generators.<\/p>\n<p>Update: Might has as <a href=\"http:\/\/matt.might.net\/articles\/parsing-with-derivatives\/\">follow-up blog post<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Matthew Might and David Darais (via Lambda): This work introduces parsers based on the derivative of context-free languages and upon the derivative of parser combinators. Parsers based on derivatives meet all of the aforementioned requirements: they accept arbitrary grammars, they produce parse forests efficiently (and lazily), and they are easy to implement (less than 250 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-2919","post","type-post","status-publish","format-standard","hentry","category-programming-category"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/2919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=2919"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/2919\/revisions"}],"predecessor-version":[{"id":2922,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/2919\/revisions\/2922"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=2919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=2919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=2919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}