å¯ãåã« OCaml ã§ãªããæ¸ãã¦ã¿ãããã¨æã£ã¦æ¸ãã¦ã¿ãã exception Unexpected_char let interpret str = (* ãããã¡ *) let buf = Array.create 3000 0 in (* 対å¿ããå³æ¬å¼§(])ãæ¢ãã«è¡ã *) let rec rp idx n = match String.get str idx with | '[' -> rp (idx+1) (n+1) | ']' -> if n=0 then idx else rp (idx+1) (n-1) | _ -> rp (idx+1) n (* 対å¿ããå·¦æ¬å¼§([)ãæ¢ãã«è¡ã *) and lp idx n = match String.get str idx with | '[' -> if n=0 then idx else lp (idx-1) (n-
{{#tags}}- {{label}}
{{/tags}}