Ruby ã®æ£è¦è¡¨ç¾ã ã㧠Brainfuck ã¤ã³ã¿ããªã¿ãä½ããã¨ãã§ãã¾ãããæ£è¦è¡¨ç¾ã®å®è¡ã¯ =~ ã ããªã®ã§ãã«ã¼ããªã©ãæ£è¦è¡¨ç¾ã®å é¨ã§å®è¡ãã¦ã¾ãã https://github.com/shinh/hack/blob/master/bf_rb_reg/bf.rb ã¤ã¾ãã©ããããã¨ãã§ãããã¨ããã¨ã BF_REG ã¨ãã Regexp 㨠BF_SUFFIX ã¨ããæååå®æ°ããã£ã¦ã bf ã¨ããæååã«æ ¼ç´ããã Brainfuck ã®ã³ã¼ãã BF_REG =~ bf + BF_SUFFIX ã§å®è¡ãããã¨ãã§ãã¾ããåºå㯠$~['o0'], $~['o1'], ... ã«å ¥ã£ã¦ããã®ã§ã output = '' 256.times do |i| o = $~["o#{i}"] break if !o output += o end çãªã³ã¼ãã§åãåºããã¨ãã§ã
{{#tags}}- {{label}}
{{/tags}}