2005-05-01ãã1ã¶æéã®è¨äºä¸è¦§
ããããªæé¢ãããããäºäººã¨ããè¥ãã¦åªç§ã§ãæ ç±ã¨æ°æ¦ãæã£ãã¨ã³ã¸ãã¢ã§ãããã¨ã¯ããåããã¾ããèå©å¿ã«ãæ°ãæªããªãããã«ããã¦ãæè¿ã®åã®é¢å¿ã¯ãæååã¨ãã®ãã¤ã¢ã¹ï¼æååãã¤ã¢ã¹ããããã¯ç°å¢ãã¤ã¢ã¹ï¼ã§ãããæååãã¤ã¢ã¹â¦
orionaeããã®ç«å ´ã¯ãç¾å¨ã®åã®ç«å ´ã«è¿ãé¢ããããå¿æ çã«ã¯ããç解ã§ãã¾ããããnaoyaããã®âç¡éªæ°ãããâè¨è使ããæçºçã¨åãåã£ãã®ã§ããããï¼ ã©ããè°è«ã«ç¡çãããã¾ãï¼å¾ã§ä¸é¨è¨æ£ããªãã£ã¦ãã¾ããï¼ã è¨èªã¯é¢ä¿ãªãã¨ããã®ã¯â¦
noyaããã®æè¦ã¯ã9å²æ¹åæã§ãããã®ã§ããæ®ã1å²ããã®å 容ã«ã§ã¯ãªãã¦ããã®ç¡éªæ°ããã表ç¾ã«çåãæãããã¨ãããã¨ã§ããæ°ãï¼ï¼ãä¸åãªæ¹æ³è«ã解説ããååãæ¸ç±ï¼ã¹ã¼ããçã¦è¨è¨æ¸ãæ¸ãã¦ãããã®ãä½ãï¼é ã§ã£ãã¡ã®è¨è¨å±ãä½æ¥ãâ¦
ã¾ãã¯ææããã®å¼ç¨ï¼ ã¢ã¸ã£ã¤ã«ã®äººã ã¯ãã¦ã©ã¼ã¿ã¼ãã©ã¼ã«ã«ä»£è¡¨ããããããªãä»ã¨ãªã£ã¦ã¯ã©ãã§ããããããªï¼ã¨ãããå¼å®³ãå¤ãï¼æ¹æ³ãæ¹å¤ããããã«ãï¼ããããã¯æ¦ç¥çã«ï¼ãã½ããã¦ã§ã¢å·¥å¦ããã¹ã±ã¼ãã´ã¼ãã«é¸ãã ã®ã§ããã ãç¾å ´â¦
ãããããã¨ã ã£ãã®ããã¼ããããã5æ22æ¥ï¼æ¥æï¼ããããããããã¤ã©ã»ãµã¤ããçµç±ããã¢ã¯ã»ã¹ãå¢ãã¦ããããã¯ãã£ããä½ã ããªï¼ãã¨æã£ã¦ããã®ã§ãããã£ã¨äºæ ãããã£ãããnaoyaããã®ãåãã¯ã¦ãªãPerlãé¸ã¶çç±ã(id:naoya:20050518)â¦
以ä¸ãä¸é£ã®ãã¹ãã¯ãXMLã®å 容ã¢ãã«ã®è©±é¡ã§ãããããã«XMLã®âå¤æå主義âããã®èæ¯ã§ããåã¯ãå 容ã¢ãã«ã¯ããã¼ã¿æ§é ã¢ãã«ãå«ãã¦èããã¹ãã ãã¨è¿°ã¹ã¾ããããã®ãã¼ã¿æ§é ã¯ããªã¹ããããªã¼ã«éå®ãã¹ãã§ã¯ããã¾ããããªããªããå¿ç¨é â¦
åï¼ãªã¹ãï¼æ£è¦è¡¨ç¾ã¯æ¢ã«ããç¥ããããã®ã§ããã»ããæ£è¦è¡¨ç¾ã®å¿ç¨ä¾ã¯ã次ã®è¨äºã§è¿°ã¹ã¦ãã¾ãã å±æ§ã®ããã®æ£è¦è¡¨ç¾ å±æ§ãå 容ãï¼ããã¯åé¡ã§ã¯ãªã ããã§ã¯ãããã°ï¼ãã«ãã»ããï¼æ£è¦è¡¨ç¾ã®ä¾ãæãã¦ããã¾ããããXHTMLã®headã®å 容ãâ¦
ä»ã¾ã§ï¼éææ¥ã¨ä»æ¥ï¼ã®è©±ãã¾ã¨ããã¨ããªã¹ããããã°ãã»ããã®ãããã«å¯¾ãã¦ã2é æ¼ç®ã»ã¨å®æ°Iãå®ç¾©ã§ãã¦ãããã«ãããããã®ãã¯ã¼ï¼ããéåï¼ä¸ã«ã»ã¨Iãæã¡ä¸ãããã¨ãã§ãããã£ã¦ãã¨ã§ãããããã¦ããã¯ã¼ã®ä¸ã§ã次ã®è¨ç®æ³åãæç«ãâ¦
ï¼æ¨ææ¥ã®ç¶ããªã®ã§ãï¼ããã ãããã¨æåéãâéãæããâã®ã ãã©ã [éè¨ï¼åå¿]ãã¼ã¿æ§é ã®åºæ¬ã¨ãã¦ã®ã³ã¬ã¯ã·ã§ã³ [éè¨ï¼åå¿]æ¼ç®ãã»ãã¨å®æ°ãIãããªã¼ãã¼ãã¼ãå®ç¾©ãã ã®æ¬¡ã®è©±ã§ãããªã¹ããããã°ãã»ããã®ãã¯ã¼ãä½ãã¾ããã£ã¦ãâ¦
Lispã«é¢ããæ¬ã ãè¨äºã ãã«ã次ã®ãããªè©±ãï¼ããè¦ãï¼ï¼ ãã人ããLispã§å¤ç¨ãã¦ããlambdaã¨ããèªã¯ãä½è¨ãªbãããã®ã§ç¶´ããééãããããããããã°ã®åå ã¨ããªãã®ã§ãã©ã ãã§ã¯ãªãã¦ã¢ã«ãã¡ã«ãã¹ãã ãã¨ä¸»å¼µãããæ¡ã®å®ããã®äººã¯ã¢â¦
åä¾ã®éåä¼ã£ã¦ã®ã¯ãå§ãããçµããã¾ã§è¦ããããããªãã®ããç¥ãã¾ããããã®ã¸ããåã¯ãã¾ãèªèãã¦ãªããæã¶ãã§ãªãã¨ãªãçµæ¥ããã¿ãªè¦³æ¦ãã¦ã¾ããï¼ä»æ¥ã®ãã¨ï¼ããªãã«ã¯æºåä¸ç«¯ã®æ¹ããããããæ°èãéèªãæ庫æ¬ã¯ãã¨ãããåº§æ¤ åãâ¦
æ¨æ¥ï¼éæï¼ããã¯ã¦ãªããã¯ãã¼ã¯ããµã¼ãã¹ãã¯ããã¦ä½¿ã£ã¦ã¿ã¾ãã*1ããã¼ã«ã«ããã¯ãã¼ã¯ããã£ãã¨ç§»ãã¦ãããã¡ã«ããã®åç´ä½æ¥ãã¯ã»ã«ãªã£ã¦ãã¦ããµã«ã®ããã«å ¥åãã¦ã¾ãã¾ãããããã¦æ°ãã¤ãã¨ãåã®ããã¯ãã¼ã¯ã¨ã³ããªã®ã»ã¨ãã©ã1â¦
2,3æ¥åã«ãããã«ãªã£ã¦(?)Citeseerããæ°ç·¨ã®è«æãããªã³ããããã¨ãããããã´ã¼ã«ããã©ããï¼ã§ããã®ããªãã¨ãï¼ã®ããâhttp://citeseer.ist.psu.edu/goldblatt01calculus.html ãèªãã§ã¿ããããã®ã´ã¼ã«ããã©ããããã¯ãalgebrasã«å¯¾ãããã¼â¦
ããã¤ã©ã»ãµã¤ãã«ç½®ããå®è£ ï¼zipãã¡ã¤ã«ï¼ã¯ãã³ã¼ãã£ã³ã°ã¯ã¤ã¤ã«ã²ã³ãªãã®ã§ãããå ¨ä½ã®æãç«ã¡ã¯å²ã¨ã¾ããï¼ã¯ã½ãã¸ã¡ã¨è¨ã£ã¦ãããããï¼ãªæ§æã«ãã¦ãã¾ããæç§æ¸ã©ãããåå¥è§£æå¨ï¼Lexerï¼ãããã¼ã¯ã³ï¼Tokenï¼ãæ§æ解æå¨ï¼Parserï¼â¦
2005-05-23 ãWhitespace(6)ï¼ç¶ãã¯ããã®ãï¼ãããï¼ åããã¿ï¼ããããã®ãã®ï¼ã§ããã¾ãã«å¼ã£å¼µãã¨é¬±é¶ãããã·ãã³ã¤ãã£ã¦ãããèªåã§ãããã©ããªã(ç¬)ãããâ¦ï¼çç¥ï¼ ãã®ãã®è©±ã¯å¢ãã§æ¸ããã®ã ãããããã ã空ãã¨ããªã失ããã¦ãã¾ãâ¦
ãç¶ãã¨ã¯æããã©ããããã¨æ¸ãã件ã¯ãææ¥ä»¥éãããã¯ããã¨ããã¯ã¦ãªããçæãããã¼ãã«ã¯è¦ã°ãããããªããªã¼ãã¹ã¿ã¤ã«ã·ã¼ãæ¸ããªãã¨ãã¡ãªã®ããããã¯ã¡ã³ãããããã追è¨ï¼â ãã¼ãã«ãå°ãã¯ã¾ãã«ãªã£ããã¾ã ã·ã§ãã¤ãã©ã
ã¯ã¦ãªãã¤ã¢ãªã¼ã»ã·ã¹ãã ã®æ¹è¡å¦çããã°ã£ã¦ãããããªï¼æ¹è¡ã段è½ã®éå§ï¼åºåãã¨ãã¦èªèããã¦ãªãããã ãæä½æ¥ã§ã¬ã¤ã¢ã¦ãã¯ããããªãã§ãã¤ã¤ã ã追è¨ï¼â ããã¯çã¿ã°ã§ãã¼ãã«ãå ¥ããã®ããããªãã£ãã¿ãããç°¡æãã¼ã¯ã¢ããã¨çã¿ã°â¦
ä»æ¥ã®æ¼é£¯ã¯ãä¸è¯å± é å±ã©ã³ãã®äºç®ãã°ããé£ã®ã客ï¼ä¸å½äººã®ãã«ãããï¼ã¯ãå¾æ¥å¡ã®ä¸å½äººãããããã¨ãã©ããã¦ãä¸å½èªã§è©±ããããããããªãã ããã å¼ã³ã¤ãããããã°ã«æ¥ãã®ãã¿ã¯ããã£ã¦æ¥µãã¦ç±å¿ã«è©±ããããã®ã ããããããããããâ¦
2é ï¼å¼æ°ã2ã¤æã¤ï¼æ¼ç®ãã»ããããªã¹ããããã°ãã»ããã«å¯¾ãã¦ãªã¼ãã¼ãã¼ãå®ç¾©ãã¾ããããäºä¾ã§å®ç¾©ã«ä»£ãã¾ãã ãªã¹ãï¼(1, 2, 1, 3)ã»(3, 3, 5) = (1, 2, 1, 3, 3, 3, 5) ããã°ï¼[1, 2, 1, 3]ã»[3, 3, 5] = [1, 2, 1, 3, 3, 3, 5] ã»ããï¼{1â¦
ï¼æ¨æ¥ã®ç¶ãã«è¿ãããããªããæ¥åé£è¼ãã¦ããæ°åã«ãªã£ã¦ããï¼æ¨æ¥ãå 容ã¢ãã«ã®ãã¢ãã«ãããæ§æã¢ãã«ï¼æ£è¦è¡¨ç¾ï¼ã«éå®ããããã¼ã¿æ§é ã¢ãã«ãæå³ã¢ãã«ãå«ãã¦èããããã¨è¿°ã¹ã¾ããããã¼ã¿æ§é ã®åºæ¬çãªãã¨ã¯ãSmalltalkãJavaãªã©ã§â¦
ã¨ãæ¯é±æ¸ãã®ã¯ããããã¦å¿ã®æºåããã¦ããã¨ããããæ°åããå ¥ãã¦ããã®ã§ããæ¯ã®æ²»çã¯æéããããï¼ããã¨çãããï¼ããªãã«ã¯ä¸å¹´ããããäºå®ã§ãéããããã«æ«æãã¦ãã¾ã人ãããããã ãâæç¶ããæå¿åâãå¿ è¦ãªãã§ãããã¨ããã§ãä¾â¦
éåã¨é·ã ã¨æ¸ãã¦ãã¾ã£ããªãã¼ãæ¨æ¥ãä»æ¥ã®æ¥è¨ã®å 容ãæ´çãã¦ãè¨äºã«ãã¦ããã¤ã©ã»ãµã¤ãã«ç½®ããã»ããããã ãããªãåç §ã®ä¾¿å®ãèãã¦ããããä¸åº¦æ¸ãã¦ãã¾ãã¨ããããã¾ã¨ãç´ãã£ã¦ããã£ããã«è¦ããä½æ¥ã«ãªã(è¦ç¬)ã
åãæ¨æ¥ãæååãã¨å¼ãã ãã®ã¯ããæå³ã¢ãã«ï¼ã®ä½ç³»ï¼ãå ±æããã³ãã¥ããã£ãã ã¨è¨ãæãã¦ãããã§ãããã»ãã¨ã®æå³ã¢ãã«ã®è¨è¿°ã¯ãèªç¶è¨èªã«ããããããå¾ãªãã§ããããããã¼ã¿æ§é ã¢ãã«ã¨æ§æã¢ãã«ã¯ããç¨åº¦ã¯å½¢å¼çãªè¨è¿°ãã§ããã â¦
ã¾ã¼ãXML-DTDã®#PCDATAã¨ããè¨æ³ï¼æ¦å¿µã¯ãã¾ã£ãã使ãç©ã«ãªããªãã·ãã¢ããªãã ããã代æ¿ã¨ãã¦1æåã表ã#charãåºãããã©ããã1ã¤ã®ä»£æ¿ã¨ãã¦#dataã¨ããè¨å·ãå°å ¥ãã¾ãããã#dataã¯ãå 容ã«å«ã¾ãã極大ãªæååã¨ããããã¾ãï¼DOMã®ãã¼â¦
å ã«æããpriceã®ä¾ããã次ã®ãã¼ã¯ã¢ããã®ã»ãããããããªæ°ããã¾ãããï¼priceã®ä¾2ï¼ <price><value>2300</value><unit>JPY</unit></price>ãã®ãããããããªæ°ããããæ ¹æ ã¯ããã£ã¡ã®ã»ãããã¼ã¿æ§é ã¢ãã«ã¨ã®å¯¾å¿ãç´æ¥çã ããã§ãããã¼ã¿æ§é ã¢ãã«ãæ¬ä¼¼ã³ã¼ãã§ç¤ºãã°ããâ¦
pã®å 容ã«é¢ãããã¼ã¿æ§é ã¢ãã«ã¯ãæ¨æ¥ã®ãããã¹ããããã¡ã®æååãã§è¿°ã¹ããããªãããã¡ã»ã¢ãã«ã§ããããåºæ¬åä½ï¼ã¢ãã ï¼ã¯æåã¾ãã¯è¦ç´ ã§ãããæååä½ã§ã®ã¢ãã¬ãã·ã³ã°ã¨ãªãã¬ã¼ã·ã§ã³ããµãã¼ããã¹ãã§ã*1ãæ§æçã«ãã(#PCDATA|bâ¦
æ¨æ¥æãã2ã¤ã®ä¾ãããpã®ä¾ãããpriceã®ä¾ãã¨ãã¦å¼ç¨ãã¾ããï¼ãã ããé貨è¨å·ã¯ISO 4217ã®ã³ã¼ãã§ããJPYã«å¤æ´ãããï¼pã®ä¾ï¼ <p>ãã<br/>ã¨ã¦ã<em>éè¦</em>ã</p>priceã®ä¾ï¼ <price>2300<unit>JPY</unit></price>ãããã®æ§æã¢ãã«ããDTDã®è¨æ³ã§æ¸ãã°æ¬¡ã®ããã«ãªãã§ãããã pã®ä¾ï¼ (#â¦
ï¼æ¨æ¥ã®ç¶ããã¿ãããªãã®ï¼XML-DTDã®å 容ã¢ãã«ã¨ã¯ãããã¦ãã«è¨ã£ã¦ãã¾ãã°ãæ£è¦è¡¨ç¾ã®ä¸æ¹è¨ã«éãã¾ããããã®ãããªæå³ã§ãã¢ãã«ãã¨ããèªã使ãã®ã¯ç°ä¾ã®ç¨èªæ³ã§ãï¼SGMLç±æ¥ã®ç¨èªã¯ã ãããå¥å¦ãªãã ãã©ãï¼ãã§ãåã¯ããã£ã¨ãå 容ã¢â¦
æ··åå 容ã§ãã<price>2300<unit>YEN</unit></price>ãªãã¦ã®ã¯ã¾ãå¥ç©*1ã§ãããã¹ãé¨åãæ´æ°ãé貨åä½ã¨ãããã¼ã¿åã§åä»ãï¼typingï¼ããã¦ããã¨èãããã¾ãã2300ã2350ã«å¤æ´ããã®ã¯âä»»æã®æååç·¨éâã§ã¯ãªãã¦ãâæ´æ°å¤ã®æ´æ°âå¦çã§ããã¤ã¾ããæ··åå 容ã ããåä»ãä¸â¦
æ··åå 容ãå¿ è¦ã¨ããæååã1ã¤ã§ã¯ããã¾ããããããã¹ãææ¸ãã¯ã¼ããææ¸ã®å»¶é·ã¨ãã¦XMLææ¸ãæ±ãããç«å ´ããè¨ãã¨ãæ··åå 容ããããã¹ããã¼ãã¨è¦ç´ ãã¼ãï¼ãã®ä»ã®æ象ç¡è±¡ã¯ç¡è¦ï¼ãæ··ãã£ã¦ä¸¦ãã ãã®ãã¨è¦ãã®ããã¾ããªãã®ã§ããæ··åâ¦