{"id":11,"date":"2010-05-12T10:54:03","date_gmt":"2010-05-12T15:54:03","guid":{"rendered":"https:\/\/dalnefre.com\/wp\/?page_id=11"},"modified":"2022-02-05T21:17:44","modified_gmt":"2022-02-06T04:17:44","slug":"humus-grammar","status":"publish","type":"page","link":"https:\/\/dalnefre.com\/wp\/humus\/humus-grammar\/","title":{"rendered":"Humus Grammar"},"content":{"rendered":"<p>This grammar describes the syntax of <a href=\"humus\">Humus<\/a> in terms of tokens, ignoring whitespace and comments.<\/p>\n<pre>repl  = stmt+\nblock = '[' stmt* ']'\nstmt  = 'DEF' ptrn 'AS' expr\n      | 'LET' eqtn\n      | ('AFTER' expr)? 'SEND' expr 'TO' expr\n      | 'CREATE' ident 'WITH' expr\n      | 'BECOME' expr\n      | 'THROW' expr\n      | expr\nexpr  = 'CASE' expr 'OF' (ptrn ':' expr)+ 'END'\n      | 'IF' eqtn expr ('ELIF' eqtn expr)* ('ELSE' expr)?\n      | 'LET' eqtn 'IN' expr\n      | term ',' expr\n      | term\nterm  = const\n      | call\n      | ident\n      | 'NEW' term\n      | '(' expr? ')'\ncall  = ident '(' expr? ')'\n      | '(' expr ')' '(' expr? ')'\neqtn  = ptrn '=' ptrn\n      | ident '(' ptrn? ')' '=' expr\nptrn  = pterm ',' ptrn\n      | pterm\npterm = '_'\n      | const\n      | ident\n      | '$' term\n      | '(' ptrn? ')'\nconst = block\n      | 'SELF'\n      | '\\' ptrn '.' expr\n      | number\n      | '?'\n      | 'NIL'\n      | 'TRUE'\n      | 'FALSE'\n      | '#' token\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This grammar describes the syntax of Humus in terms of tokens, ignoring whitespace and comments. repl = stmt+ block = &#8216;[&#8216; stmt* &#8216;]&#8217; stmt = &#8216;DEF&#8217; ptrn &#8216;AS&#8217; expr | &#8216;LET&#8217; eqtn | (&#8216;AFTER&#8217; expr)? &#8216;SEND&#8217; expr &#8216;TO&#8217; expr | &#8216;CREATE&#8217; ident &#8216;WITH&#8217; expr | &#8216;BECOME&#8217; expr | &#8216;THROW&#8217; expr | expr expr = &#8216;CASE&#8217; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3,"menu_order":9,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-11","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/dalnefre.com\/wp\/wp-json\/wp\/v2\/pages\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalnefre.com\/wp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dalnefre.com\/wp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dalnefre.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalnefre.com\/wp\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":0,"href":"https:\/\/dalnefre.com\/wp\/wp-json\/wp\/v2\/pages\/11\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/dalnefre.com\/wp\/wp-json\/wp\/v2\/pages\/3"}],"wp:attachment":[{"href":"https:\/\/dalnefre.com\/wp\/wp-json\/wp\/v2\/media?parent=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}