{"id":2917,"date":"2013-08-21T11:37:52","date_gmt":"2013-08-21T02:37:52","guid":{"rendered":"http:\/\/peta.okechan.net\/blog\/?p=2917"},"modified":"2013-08-21T11:38:15","modified_gmt":"2013-08-21T02:38:15","slug":"2-8-%e7%b5%90%e8%ab%96","status":"publish","type":"post","link":"https:\/\/peta.okechan.net\/blog\/archives\/2917","title":{"rendered":"2.8. \u7d50\u8ad6"},"content":{"rendered":"<p><a href=\"https:\/\/peta.okechan.net\/blog\/archives\/2836\" title=\"LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\">LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u65e5\u672c\u8a9e\u8a33<\/a><br \/>\n\u7b2c2\u7ae0 \u4e07\u83ef\u93e1: \u69cb\u6587\u89e3\u6790\u5668\u3068AST\u306e\u5b9f\u88c5<br \/>\n<a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl02.html#conclusions\" target=\"_blank\">\u7b2c8\u7bc0 \u7d50\u8ad6<\/a><\/p>\n<p>\u30b3\u30e1\u30f3\u30c8\u4ed8\u304d\u3067400\u884c\u5f31\u306e\u30b3\u30fc\u30c9\uff08\u30b3\u30e1\u30f3\u30c8\u3001\u7a7a\u884c\u7121\u3057\u3060\u3068240\u884c\u7a0b\u5ea6\uff09\u306b\u3088\u3063\u3066\u3001\u5b57\u53e5\u89e3\u6790\u5668\u3001\u69cb\u6587\u89e3\u6790\u5668\u3001AST\u69cb\u7bc9\u306e\u305f\u3081\u306e\u30b3\u30fc\u30c9\u3092\u542b\u3080\u3001\u6211\u3005\u306e\u5c0f\u3055\u306a\u8a00\u8a9e\u3092\u5b8c\u5168\u306b\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u305f\u3002<br \/>\n\u3053\u308c\u306b\u3088\u3063\u3066\u5b8c\u6210\u3057\u305f\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306b\u3088\u3063\u3066\u3001\u4e07\u83ef\u93e1\u306e\u30b3\u30fc\u30c9\u306f\u691c\u8a3c\u3055\u308c\u3001\u3082\u3057\u6587\u6cd5\u7684\u306a\u9593\u9055\u3044\u304c\u3042\u308c\u3070\u305d\u306e\u65e8\u8868\u793a\u3055\u308c\u308b\u3060\u308d\u3046\u3002<br \/>\n\u4ee5\u4e0b\u306f\u3001\u64cd\u4f5c\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u3042\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ .\/a.out\r\nready&gt; def foo(x y) x+foo(y, 4.0);\r\nParsed a function definition.\r\nready&gt; def foo(x y) x+y y;\r\nParsed a function definition.\r\nParsed a top-level expr\r\nready&gt; def foo(x y) x+y );\r\nParsed a function definition.\r\nError: unknown token when expecting an expression\r\nready&gt; extern sin(a);\r\nready&gt; Parsed an extern\r\nready&gt; ^D\r\n$<\/pre>\n<p>\u3053\u308c\u306b\u306f\u6539\u826f\u306e\u4f59\u5730\u304c\u307e\u3060\u307e\u3060\u3042\u308b\u3002<br \/>\n\u65b0\u305f\u306aAST\u30ce\u30fc\u30c9\u3092\u5b9a\u7fa9\u3057\u305f\u308a\u3057\u3066\u3001\u3044\u308d\u3093\u306a\u65b9\u6cd5\u3067\u8a00\u8a9e\u3092\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<br \/>\n\u6b21\u306e\u7ae0\u3067\u306f\u3001AST\u304b\u3089LLVM\u4e2d\u9593\u8868\u73fe\uff08LLVM IR\uff09\u3092\u751f\u6210\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002<\/p>\n<p><em>\u8a33\u6ce8: \u307e\u3060\u3053\u306e\u6642\u70b9\u3067\u306f\u4e00\u822c\u7684\u306a\u610f\u5473\u306b\u304a\u3051\u308b\u30b3\u30f3\u30d1\u30a4\u30e9\u306b\u306a\u3063\u3066\u306a\u3044\u70b9\u306b\u6ce8\u610f\u3002<br \/>\n\u73fe\u6642\u70b9\u3067\u306f\u4e07\u83ef\u93e1\u306e\u30b3\u30fc\u30c9\u3092\u89e3\u6790\u3057\u3001AST\u3092\u69cb\u7bc9\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u3067\u3042\u308b\u3002<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/peta.okechan.net\/blog\/archives\/2836\" title=\"LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\">LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u65e5\u672c\u8a9e\u8a33<\/a><br \/>\n\u7b2c2\u7ae0 \u4e07\u83ef\u93e1: \u69cb\u6587\u89e3\u6790\u5668\u3068AST\u306e\u5b9f\u88c5<br \/>\n<a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl02.html#conclusions\" target=\"_blank\">\u7b2c8\u7bc0 \u7d50\u8ad6<\/a><\/p>\n<p>\u30b3\u30e1\u30f3\u30c8\u4ed8\u304d\u3067400\u884c\u5f31\u306e\u30b3\u30fc\u30c9\uff08\u30b3\u30e1\u30f3\u30c8\u3001\u7a7a\u884c\u7121\u3057\u3060\u3068240\u884c\u7a0b\u5ea6\uff09\u306b\u3088\u3063\u3066\u3001\u5b57\u53e5\u89e3\u6790\u5668\u3001\u69cb\u6587\u89e3\u6790\u5668\u3001AST\u69cb\u7bc9\u306e\u305f\u3081\u306e\u30b3\u30fc\u30c9\u3092\u542b\u3080\u3001\u6211\u3005\u306e\u5c0f\u3055\u306a\u8a00\u8a9e\u3092\u5b8c\u5168\u306b\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u305f\u3002<br \/>\n\u3053\u308c\u306b\u3088\u3063\u3066\u5b8c\u6210\u3057\u305f\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306b\u3088\u3063\u3066\u3001\u4e07\u83ef\u93e1\u306e\u30b3\u30fc\u30c9\u306f\u691c\u8a3c\u3055\u308c\u3001\u3082\u3057\u6587\u6cd5\u7684\u306a\u9593\u9055\u3044\u304c\u3042\u308c\u3070\u305d\u306e\u65e8\u8868\u793a\u3055\u308c\u308b\u3060\u308d\u3046\u3002<br \/>\n\u4ee5\u4e0b\u306f\u3001\u64cd\u4f5c\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u3042\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ .\/a.out\r\nready&gt; def foo(x y) x+foo(y, 4.0);\r\nParsed a function definition.\r\nready&gt; def foo(x y) x+y y;\r\nParsed a function definition.\r\nParsed a top-level expr\r\nready&gt; def foo(x y) x+y );\r\nParsed a function definition.\r\nError: unknown token when expecting an expression\r\nready&gt; extern sin(a);\r\nready&gt; Parsed an extern\r\nready&gt; ^D\r\n$<\/pre>\n<p>\u3053\u308c\u306b\u306f\u6539\u826f\u306e\u4f59\u5730\u304c\u307e\u3060\u307e\u3060\u3042\u308b\u3002<br \/>\n\u65b0\u305f\u306aAST\u30ce\u30fc\u30c9\u3092\u5b9a\u7fa9\u3057\u305f\u308a\u3057\u3066\u3001\u3044\u308d\u3093\u306a\u65b9\u6cd5\u3067\u8a00\u8a9e\u3092\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<br \/>\n\u6b21\u306e\u7ae0\u3067\u306f\u3001AST\u304b\u3089LLVM\u4e2d\u9593\u8868\u73fe\uff08LLVM IR\uff09\u3092\u751f\u6210\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002<\/p>\n<p><em>\u8a33\u6ce8: \u307e\u3060\u3053\u306e\u6642\u70b9\u3067\u306f\u4e00\u822c\u7684\u306a\u610f\u5473\u306b\u304a\u3051\u308b\u30b3\u30f3\u30d1\u30a4\u30e9\u306b\u306a\u3063\u3066\u306a\u3044\u70b9\u306b\u6ce8\u610f\u3002<br \/>\n\u73fe\u6642\u70b9\u3067\u306f\u4e07\u83ef\u93e1\u306e\u30b3\u30fc\u30c9\u3092\u89e3\u6790\u3057\u3001AST\u3092\u69cb\u7bc9\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u3067\u3042\u308b\u3002<\/em><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[466,467],"class_list":["post-2917","post","type-post","status-publish","format-standard","hentry","category-tech","tag-kaleidoscope","tag-llvm"],"_links":{"self":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/2917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/comments?post=2917"}],"version-history":[{"count":0,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/2917\/revisions"}],"wp:attachment":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/media?parent=2917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/categories?post=2917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/tags?post=2917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}