{"id":2967,"date":"2013-08-28T17:34:16","date_gmt":"2013-08-28T08:34:16","guid":{"rendered":"http:\/\/peta.okechan.net\/blog\/?p=2967"},"modified":"2013-08-28T17:34:16","modified_gmt":"2013-08-28T08:34:16","slug":"5-2-1-ifthenelse%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\/2967","title":{"rendered":"5.2.1. if\/then\/else\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-if-then-else\" target=\"_blank\">\u7b2c2.1\u7bc0 if\/then\/else\u306e\u305f\u3081\u306e\u5b57\u53e5\u89e3\u6790\u5668\u62e1\u5f35<\/a><\/p>\n<p>\u5b57\u53e5\u89e3\u6790\u5668\u306e\u62e1\u5f35\u306f\u7c21\u5358\u3067\u3042\u308b\u3002<br \/>\n\u307e\u305a\u3001\u95a2\u9023\u3059\u308b\u30c8\u30fc\u30af\u30f3\u306e\u305f\u3081\u306b\u65b0\u305f\u306a\u5217\u6319\u5024\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\/\/ \u5236\u5fa1\r\ntok_if = -6, tok_then = -7, tok_else = -8,<\/pre>\n<p>\u305d\u3057\u305f\u3089\u3001\u5b57\u53e5\u89e3\u6790\u5668\u3067\u65b0\u305f\u306a\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u8a8d\u8b58\u3055\u305b\u308b\u3002<br \/>\n\u3053\u308c\u306f\u5b9f\u306b\u7c21\u5358\u3067\u3042\u308b\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">...\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\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-if-then-else\" target=\"_blank\">\u7b2c2.1\u7bc0 if\/then\/else\u306e\u305f\u3081\u306e\u5b57\u53e5\u89e3\u6790\u5668\u62e1\u5f35<\/a><\/p>\n<p>\u5b57\u53e5\u89e3\u6790\u5668\u306e\u62e1\u5f35\u306f\u7c21\u5358\u3067\u3042\u308b\u3002<br \/>\n\u307e\u305a\u3001\u95a2\u9023\u3059\u308b\u30c8\u30fc\u30af\u30f3\u306e\u305f\u3081\u306b\u65b0\u305f\u306a\u5217\u6319\u5024\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\/\/ \u5236\u5fa1\r\ntok_if = -6, tok_then = -7, tok_else = -8,<\/pre>\n<p>\u305d\u3057\u305f\u3089\u3001\u5b57\u53e5\u89e3\u6790\u5668\u3067\u65b0\u305f\u306a\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u8a8d\u8b58\u3055\u305b\u308b\u3002<br \/>\n\u3053\u308c\u306f\u5b9f\u306b\u7c21\u5358\u3067\u3042\u308b\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">...\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\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-2967","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\/2967","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=2967"}],"version-history":[{"count":0,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/2967\/revisions"}],"wp:attachment":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/media?parent=2967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/categories?post=2967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/tags?post=2967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}