æ¦è¦ ãã¼ãµã¨ã¹ãã£ã ããã°ã©ã è¨èªã®ãã¼ãµã®æ¸ãããã¯æãããã¤ããç 究ããã¦ãã¦ããã ããªããã£ããããå®ç³ãããããã»ã©å¤ãªï¼ã¾ãã¯ææ§ãªï¼ææ³ã§ãªã éããå®ç³ã«ã®ã£ã¦ããã°è§£æ±ºã§ãããã®ã ã ã¾ãæåºè¾ºã«ã¯æååãåèªï¼ãã¼ã¯ã³ã¨ãè¨ãï¼ã®åã«åãåºãé¨ åãããããããã¹ãã£ãï¼scannerï¼ã¨ãã¬ã¯ãµï¼lexerï¼ã¨è¨ ããæ¥æ¬èªã§è¨ãã¨åå¥è§£æå¨ã ããè¨ãã«ããã®ã§ã¹ãã£ãã¨å¼ã¼ãã ã¹ãã£ãã¨ãããã®ãåºã¦ããæ ¹åºã«ã¯ãããããåèªã®åºåãã«ã¯ç©ºç½ãã ã§ãããã¨ãã常èããããããã¦å®éã«ããã¦ãã®ããã°ã©ãã³ã° è¨èªã¯ããããä»æ§ã«ãªã£ã¦ããããã®ã»ãã楽ã ããã ã ä¾ãã°å¤ãFortranã§ã¯ç©ºç½ãæå³ãæããªãã£ããã¤ã¾ã空ç½ãå ¥ãã¦ã åèªåºåãã¨ã¯éããªãããå¤æ°ã®éä¸ã§ä½ã®å触ãããªã空ç½ãæ¿å ¥ããã ãããã¨ãã§ãããã¨ããã解æãæãããé¢åãªãã®
We present two novel approaches to parsing context-free languages. The first approach is based on an extension of Brzozowski's derivative from regular expressions to context-free grammars. The second approach is based on a generalization of the derivative to parser combinators. The payoff of these techniques is a small (less than 250 lines of code), easy-to-implement parsing library capable of par
ã¾ã¤ãã¨ããèªèº«ã«ããStreemã«ã¤ãã¦ã®è§£èª¬ã¯ãä»å¾æ¥çµLinuxã§é 次æ²è¼ãããããã§ããã¾ã¤ãã¨ãããStreemã«ã¤ãã¦è§£èª¬ããå 容ã¯ããããããããã°ã©ãã³ã°è¨èªè¨è¨ã«é¢ããé«ã¬ãã«ãªãã®ã¨ãªãã®ã§ã¯ãªãã§ããããã æ¬è¨äºã¯ããã¨ã¯ç¡é¢ä¿ã«ã2015å¹´1æã«å ¬éããã¦ããStreemã«ã¤ãã¦ã®ä½ã¬ãã«ãªè§£èª¬ãã¤ã¾ãç¾æç¹ã®Streemã®ã½ã¼ã¹ãã¡ã¤ã«ï¼ã®ä¸é¨ï¼ã®èªã¿è§£ãæ¹ã示ãã¾ããå ·ä½çã«ã¯ãGitHubã®Streemãªãã¸ããªã«ãããlex.lãã¨ãparse.yãã¨ãã2ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ã«ã¤ãã¦è§£èª¬ãã¾ãã Streemã®ã½ã¼ã¹ãã¡ã¤ã«ã¯ãhttps://github.com/matz/streemãããã¦ã³ãã¼ãã§ãã¾ããç»é¢å³ä¸ã«ããï¼»Download ZIPï¼½ãã¿ã³ãã¯ãªãã¯ãã¦ãã ããã lex.lã¨parse.y ãã¦ã³ãã¼ãããStreemã½ã¼ã¹ãã¡ã¤ã«ã®
Go è¨èªã«ããæçæ°é»å 2013-02-15 (é´) 1. ã¯ããã« 2. ãã¼ã¯ã³ã®åãåºã 3. å帰ä¸éæ³ã«ããå¼ã®è§£éã¨è©ä¾¡ 4. æçæ°ã®è¡¨ç¤º 5. ãããã« src/calc/calc.go: æçæ°é»åããã°ã©ã calc-25-02-13.tar.bz2: ã½ã¼ã¹ä¸å¼: 5454 ãã¤ã 1. ã¯ããã« Go è¨èªã¯ UTF-8 ããã¹ãã«å¯¾ããåå¥è§£æå¨ãæ¨æºããã±ã¼ã¸ "text/scanner" (scanner - The Go Programming Language [golang.org]) ã§ç¨æãã¦ããã ãã®åå¥è§£æå¨ãèªèããæååãªãã©ã«ãæ°å¤ãªãã©ã«ã®å½¢å¼ã¯ Go è¨èªã®ææ³ã«ãããã£ããã®ã«éããããï¼ãããã¯ä»æ¥æ®åãã¦ããæ £ç¿ã«æ²¿ã£ã¦ããï¼ããã« + ã * ãªã©ã®è¨å·ã«ã¤ãã¦ã¯æåã³ã¼ãããã®ã¾ã¾è¿ããï¼if ã for ãªã©ã®åèªã«ã¤
Go è¨èªã«ããç°¡å㪠Lisp 2013-04-04 (é´) 1. ã¯ããã« 2. åå¥è§£æ 3. æ§æ解æ 4. ç°å¢ã¨è©ä¾¡å¨ 5. ãããã« tiny-lisp.go: 主æç¶ã src/lisp/data.go: cons ã»ã«ã¨ã·ã³ãã«ãã®ä» src/lisp/env.go: ç°å¢ã¨è©ä¾¡å¨ src/lisp/globals.go: ãããã¬ãã«ã®ç°å¢ src/lisp/interp.go: ãã¡ã¤ã«ãæååãå ¥åã¨ããã¤ã³ã¿ã¼ããªã¿ src/lisp/lex.go: åå¥è§£æããã³æ§æ解æ 8queens.l: ï¼ã¯ã¤ã¼ã³åé¡ã®ããã°ã©ã ä¾ (Let Little Lambda Lisp be a Little Lazy §7 ããåæ²) README.txt lisp-25-04-01.tar.bz2: ã½ã¼ã¹ä¸å¼: 11728 ãã¤ã 1. ã¯ããã« Go è¨èªã«ããæçæ°é»
ãã®è¨äºã¯ Go ãã® 3 Advent Calendar 2015 ã® 22 æ¥ç®ã®è¨äºã§ãã go tool ã®ä¸ã«ã¯ yacc ã¨ããã³ãã³ããããã¾ããããã¯ãã¼ãµã¸ã§ãã¬ã¼ã¿ã§ãã yacc ã® Go è¨èªçã§ãããã®è¨äºã§ã¯ãããã¤ãã£ã¦ç°¡å㪠jq ã®ã¯ã¨ãªãã¼ãµã£ã½ããã®ãä½ã£ã¦ã¿ããã¨æãã¾ãã ï¼ãã®è¨äºã®ã³ã¼ã㯠https://github.com/zoncoen-sample/goyacc-jq-query-parser ã«ããã¾ãããã¨ãã®è¨äºã§è©±ãã¦ããã®ã使ã£ã¦éã«ä½ã£ã jq like TOML processor ã https://github.com/zoncoen/tq ã«ä¸ãã£ã¦ã¾ããï¼ ãåç¥ã®æ¹ãå¤ããã¨æãã¾ããä¸å¿ç°¡åã«ç´¹ä»ãã¦ããã¨ã jq ã¯æ¨æºå ¥åããåãã¨ã£ã JSON æååããå¤ãåãåºãããå å·¥ãããããäºãã§ããã³ãã³ãã©
go toolã«ã¯yaccã¨ãããã®ãããã ããã¯unixã®è¨èªå¦çç³»ã§åºã使ãããyaccã¨ãããã¼ãµã¸ã§ãã¬ã¼ã¿ã®Goãã¼ã¸ã§ã³ã§ããã æ¬ç¨¿ã¯ãã®ä½¿ãæ¹ã説æãããã¥ã¼ããªã¢ã«ã§ããã 対象èªè goyaccã使ã - Qiitaã¨ããè¨äºããã£ã¦ãããã¯goã®yaccã使ã£ã¦ç°¡åãªè¨èªã®æ§æ解æããã¦ä½¿ãæ¹ã説æãã¦ããã ããããyaccã«ã¤ãã¦ã®åºæ¬çãªèª¬æãå®å ¨ã§ã¯ãªã(ä¾ãã°%%ã¨ã)ãyaccã触ã£ããã¨ããªã人ã«ã¯è¥å¹²é£ããã å¾ã£ã¦ãç§ã®ãããªGoã®ææ³ã¯ç解ãã¦ãããyaccã使ã£ããã¨ããªã人åãã«ããç°¡åãªä½¿ãæ¹ã説æããã åèè³æ yacc - The Go Programming Languageãå ¬å¼ã®ããã¥ã¡ã³ãã£ã½ããããããyaccã®ææ³èªä½ã¯ä»ã«ä»»ãã¦ããã RHGã®éç¿yaccãã¨ã¦ãåèã«ãªãã¨æãã æ¬ç¨¿ã¯ããã¾ã§åã£ä»ãæããã¥ã¼ããªã¢
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}