Bisonã¯ãæèèªç±ææ³ã®ä»æ§ãå ¥åã¨ãã¦åãåãã ãã®ææ³ã®æ£ããã¤ã³ã¹ã¿ã³ã¹ãèªèããã Cè¨èªã®é¢æ°ãçæãã¾ãã Bisonææ³ãã¡ã¤ã«ã®ååã¯ãé常`.y'ã§çµããã¾ãã Bisonææ³ã®æ¦è¦ Bisonææ³ãã¡ã¤ã«ã¯4ã¤ã®ä¸»è¦ãªé¨åãããªãã¾ãã ãããããé©åãªåºåãæåã¨ã¨ãã«ç¤ºãã¾ãã %{ C宣è¨é¨ï¼C declarationsï¼ %} Bison宣è¨é¨ï¼Bison declarationsï¼ %% ææ³è¦åé¨ï¼Grammar rulesï¼ %% 追å ã®Cããã°ã©ã é¨ï¼Additional C codeï¼ `/* ... */'ã§å²ã¾ããã³ã¡ã³ãã¯ãã©ã®é¨åã«ãæ¸ãã¾ãã C宣è¨é¨ C宣è¨é¨ï¼C declarationsï¼ã«ã¯ããã¯ãå®ç¾©ã¨ãææ³å®ç¾©ã®ã¢ã¯ã·ã§ã³ã§ 使ãããã®é¢æ°ã¨å¤æ°ã®å®£è¨ãããã¾ãã ãããã¯ãyyparseã®å®ç¾©ã«åªå ããããã«ãæ§æ解æå¨ãã¡
Bison 1.25 ããã¥ã¢ã« ç®æ¬¡ ã¾ããã æ¥æ¬èªè¨³ã«ããã£ã¦ Bisonã®å©ç¨æ¡ä»¶ GNUä¸è¬å ¬æ使ç¨è¨±è«¾æ¸ ã¯ããã« åæææ¸èªä½ã®åé å¸ã«é¢ã㦠ããªãã®æ°ããããã°ã©ã ã«ãããã®æ¡é ãé©ç¨ããæ¹æ³ Bisonã®æ¦å¿µ è¨èªã¨æèèªç±ææ³ å½¢å¼è¦åããBisonã®å ¥å㸠æå³å¤ æå³ã¢ã¯ã·ã§ã³ Bisonã®åºåââæ§æ解æå¨ãã¡ã¤ã« Bisonã使ãæé Bisonææ³ã®å ¨ä½å ä¾ éãã¼ã©ã³ãè¨æ³é»å rpcalcã®ããã®å®£è¨ rpcalcã®ããã®ææ³è¦å inputã®èª¬æ lineã®èª¬æ exprã®èª¬æ rpcalcåå¥è§£æå¨ å¶å¾¡é¢æ° ã¨ã©ã¼å ±åé¢æ° æ§æ解æå¨ãçæããããã«Bisonãå®è¡ æ§æ解æå¨ãã¡ã¤ã«ã®ã³ã³ãã¤ã« ä¸éè¨æ³é»åï¼calc åç´ãªã¨ã©ã¼å復 å¤æ©è½é»åï¼mfcalc mfcalcã®ããã®å®ç¾© mfcalcã®ããã®ææ³è¦å mfcalcã®è¨å·è¡¨ ç·´ç¿
åå bison ã使ã£ãã®ã§ãä»å㯠flex ã使ã£ã¦ã¿ã¾ãã flex 㯠info ããªã㦠man ãããªãã¨ããããããªãç¶æ³ã§ãããã¿ããªã®ã§æå¥ã¯è¨ãã¾ããã ï¼è¨»ï¼ç¸å¤ãããç¨èªã«ã¯ç¡é çãªã®ã§ä¸æ£ç¢ºãªãã¨ãããã¾ãï¼ flex ã¨ã¯ï¼ æ£è¦è¡¨ç¾ã¨ãã¼ã¯ã³è§£æ æ£è¦è¡¨ç¾ã¨ã¯ æ£è¦è¡¨ç¾ã®ææ³ æ£è¦è¡¨ç¾ã®ä¾ flex ã¤ã³ãããã®æ¦ç¥ C ã®å®£è¨æ flex ã®å®£è¨æ ãã¼ã¯ã³è¦å C ã®è¿½å ã³ã¼ã å ·ä½ä¾ åç´ãªãã¼ã¯ã³è§£æ ã¡ãã£ã¨è¤éãªãã¼ã¯ã³è§£æ bison ã¨ãããã¦ä½¿ã£ã¦ã¿ã ä¸ç½®è¨æ³è¨ç®æ© å¤æ°ã使ããè¨ç®æ© 追è¨ï¼tab2sp, cpp2html ï¼ï¼flex ã¨ã¯ï¼ flex ã¯ã¹ãã£ãï¼scannerï¼çæããã°ã©ã ã§ããã¹ãã£ãã¨ããã®ã¯ããã¼ã¯ã³è§£æãè¡ããã®ã®ãã¨ã§ããflex ã¯ãã®ã¹ãã£ãã C ã®ã³ã¼ãã¨ãã¦åºåãã¾ãã ã¹ãã£ãçæããã°ã©ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}