{"id":2981,"date":"2013-08-31T08:25:16","date_gmt":"2013-08-30T23:25:16","guid":{"rendered":"http:\/\/peta.okechan.net\/blog\/?p=2981"},"modified":"2013-08-31T08:25:16","modified_gmt":"2013-08-30T23:25:16","slug":"5-3-1-for%e3%83%ab%e3%83%bc%e3%83%97%e3%81%ae%e3%81%9f%e3%82%81%e3%81%ae%e5%ad%97%e5%8f%a5%e8%a7%a3%e6%9e%90%e5%99%a8%e6%8b%a1%e5%bc%b5","status":"publish","type":"post","link":"https:\/\/peta.okechan.net\/blog\/archives\/2981","title":{"rendered":"5.3.1. for\u30eb\u30fc\u30d7\u306e\u305f\u3081\u306e\u5b57\u53e5\u89e3\u6790\u5668\u62e1\u5f35"},"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\u7b2c5\u7ae0 \u4e07\u83ef\u93e1: \u8a00\u8a9e\u306e\u62e1\u5f35: \u5236\u5fa1\u30d5\u30ed\u30fc<br \/>\n<a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl05.html#lexer-extensions-for-the-for-loop\" target=\"_blank\">\u7b2c3.1\u7bc0 for\u30eb\u30fc\u30d7\u306e\u305f\u3081\u306e\u5b57\u53e5\u89e3\u6790\u5668\u62e1\u5f35<\/a><\/p>\n<p>\u5b57\u53e5\u89e3\u6790\u5668\u306e\u62e1\u5f35\u306f\u3001if\/then\/else\u306e\u5834\u5408\u3068\u540c\u3058\u611f\u3058\u3067\u3042\u308b\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">... \u30c8\u30fc\u30af\u30f3\u306e\u5217\u6319\u3067 ...\r\n\/\/ \u5236\u5fa1\r\ntok_if = -6, tok_then = -7, tok_else = -8,\r\ntok_for = -9, tok_in = -10\r\n\r\n... gettok\u306e\u4e2d\u3067 ...\r\nif (IdentifierStr == &quot;def&quot;) return tok_def;\r\nif (IdentifierStr == &quot;extern&quot;) return tok_extern;\r\nif (IdentifierStr == &quot;if&quot;) return tok_if;\r\nif (IdentifierStr == &quot;then&quot;) return tok_then;\r\nif (IdentifierStr == &quot;else&quot;) return tok_else;\r\nif (IdentifierStr == &quot;for&quot;) return tok_for;\r\nif (IdentifierStr == &quot;in&quot;) return tok_in;\r\nreturn tok_identifier;<\/pre>\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\u7b2c5\u7ae0 \u4e07\u83ef\u93e1: \u8a00\u8a9e\u306e\u62e1\u5f35: \u5236\u5fa1\u30d5\u30ed\u30fc<br \/>\n<a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl05.html#lexer-extensions-for-the-for-loop\" target=\"_blank\">\u7b2c3.1\u7bc0 for\u30eb\u30fc\u30d7\u306e\u305f\u3081\u306e\u5b57\u53e5\u89e3\u6790\u5668\u62e1\u5f35<\/a><\/p>\n<p>\u5b57\u53e5\u89e3\u6790\u5668\u306e\u62e1\u5f35\u306f\u3001if\/then\/else\u306e\u5834\u5408\u3068\u540c\u3058\u611f\u3058\u3067\u3042\u308b\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">... \u30c8\u30fc\u30af\u30f3\u306e\u5217\u6319\u3067 ...\r\n\/\/ \u5236\u5fa1\r\ntok_if = -6, tok_then = -7, tok_else = -8,\r\ntok_for = -9, tok_in = -10\r\n\r\n... gettok\u306e\u4e2d\u3067 ...\r\nif (IdentifierStr == &quot;def&quot;) return tok_def;\r\nif (IdentifierStr == &quot;extern&quot;) return tok_extern;\r\nif (IdentifierStr == &quot;if&quot;) return tok_if;\r\nif (IdentifierStr == &quot;then&quot;) return tok_then;\r\nif (IdentifierStr == &quot;else&quot;) return tok_else;\r\nif (IdentifierStr == &quot;for&quot;) return tok_for;\r\nif (IdentifierStr == &quot;in&quot;) return tok_in;\r\nreturn tok_identifier;<\/pre>\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-2981","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\/2981","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=2981"}],"version-history":[{"count":0,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/2981\/revisions"}],"wp:attachment":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/media?parent=2981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/categories?post=2981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/tags?post=2981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}