Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

flexϸ½Ú ÉîδÀ´¼¼Êõ

1¡¢ÔÚflexÖУ¬²»ÄÜÖØж¨Òåinput()»òunput()£¬µ«ÊÇÄÜÖØж¨ÒåYY_INPUT£¬ËüÊÇflexµ÷ÓõĴÓÊäÈëÎļþÖжÁÈ¡Îı¾µÄºê¡£flex»º³åÇø£¬±»¶¨ÒåΪYY_BUFFER_STATEÀàÐÍ¡£Àý³Ìyy_create_buffer(FILE*,size0)Éú³ÉÖ¸¶¨´óСµÄflex»º³åÇø£¬Í¨³£ÊÇYY_BUF_SIZE£¬ÓÃÓÚ¶ÁÈ¡stdioFILE¡£¶Ôyy_swithc_to_buffer(flexbuf)µÄµ÷ÓøæËßɨÃè³ÌÐò¶ÁÈ¡ÏàÓ¦µÄÎļþ£¬¶øyy_delete_buffer(flexbuf)ɾ³ýflex»º³åÇø¡£µ±Ç°»º³åÇøÊÇYY_CURRENT_BUFFER£¬<<EOF>>ÔÚµ÷ÓÃyywrap()Ö®ºóÆ¥ÅäÎļþµÄ½áβ¡£
2¡¢yywrap()µ±´Ê·¨·ÖÎö³ÌÐòµ½´ïÊäÈëÎļþµÄ½áβʱ£¬µ÷Óá£
3¡¢¿ÉÒÔÖØж¨ÒåYY_INPUT£¬ÓÃÓÚ¶ÁÈ¡Êý¾Ý¿éµÄºê¡£
YY_INPUT(buffer,result,max_size) 
buffer:×Ö·û»º³åÇø
result:´æ´¢¶ÁÈ¡µÄ×Ö·ûÊýµÄ±äÁ¿
max_size:»º³åÇøµÄ´óС
4¡¢yylinenoÊÇÊäÈëÎļþµÄÐкÅ
1¡¢REJECT:ÕÒµ½Öصþ±ê¼ÇµÄËùÓгöÏÖ¡£È磺ÕÒµ½µ¥´Êpink,ink,pinµÄËùÓгöÏÖ
...
%%
pink {npink++;REJECT;}
ink {nink++;REJECT;}
pin  {npin++;REJECT;}
...
Èç¹ûÊäÈëµ¥´Êpink,ËùÓÐ3¸öģʽ¶¼Æ¥Å䡣ûÓÐREJECTÓï¾ä£¬ÄǾÍÖ»ÓÐ"pink"Æ¥Åä¡£
2¡¢yylex()
´Óyylex()ÖÐÏòµ÷ÓÃÕߣ¨Í¨³£ÊÇÓï·¨·ÖÎö³ÌÐò£©·µ»ØÒ»¸öÖµ¡£Ï´ε÷ÓÃyylex()ʱ£¬É¨Ãè³ÌÐò´ÓËüÍ£Ö¹µÄµØ·½¼ÌÐø¡£
¹æÔò¶ÎÖеÄËùÓдúÂë±»¿½±´µ½yylex()¡£
3¡¢yyrestart(fuke)ÖØÐÂÆô¶¯É¨Ã裬¼´yylex()ÖØдÓÎļþ¶ÁÈë¡£
4¡¢FLEXÆô¶¯Ê±Ä¬ÈÏÆðʼ״̬ΪINITIAL
BEGIN ״̬
£¥SÉùÃ÷ÆÕͨÆðʼ״̬
£¥xÉùÃ÷ÆðʼÅÅËüÐÔ״̬
ûÓÐÆðʼ״̬µÄ¹æÔòÔÚÅÅËüÐÔ´¦ÓÚ¼¤»îʱ²»Æ¥Åä¡£
5¡¢unput()
½«×Ö·ûc·µ»Ø¸øÊäÈëÁ÷¡£¼´°ÑÒѾ­É¨ÃèµÄ×Ö·ûÍÆ»Ø
6¡¢yyleng
±ê¼ÇÎı¾³¤¶È
7¡¢yyless()
yyless(n)Íƻسý±ê¼Ç¿ªÍ·µÄn×Ö·ûÒÔÍâµÄËùÓÐ×Ö·û¡£
8¡¢yymore()
ÔÚÕâ¸ö±ê¼Ç¸½¼ÓÏÂÒ»¸ö±ê¼Ç
Èç:
%%
hyper yymore()
text printf("Token is %s\n",yytext);
Èç¹ûÊäÈëµÄ×Ö·û´®ÊÇ"hypertext",ÔòÊä³ö"Token is hypertext"
9¡¢yywrap()
·µ»Ø0¼ÌÐøɨÃ裬·µ»Ø1±¨¸æÎļþ½áβµÄÁã±ê¼Ç


Ïà¹ØÎĵµ£º

C++ºÍflexʵÏÖÁÄÌìÊÒ¹¦ÄÜ

¹«Ë¾°²ÅÅ¿ªÊ¼×ö·þÎñÆ÷£¬Ã»ÓнӴ¥¹ýÕâЩ¶«Î÷¡£´ÓÁ㿪ʼѧϰ¡£
ÏîÄ¿ÊÇ×ö¸öÁÄÌìϵͳ¿Í»§¶ËÓÃflex£¬·þÎñÆ÷ÓÃC++£¬ÈÃÎÒÏȳöDemo¡£
·þÎñÆ÷²¿·Ö²ÎÕÕWindowsÍøÂç±à³ÌÒ»ÊéÖеÄselectÀý×Ó£¬»ù±¾Ò»Ñù£¬Ö»ÊÇ°ÑÀý×ÓÖеĵĵ¥¸ö»ØÓ¦ÏûÏ¢¸Ä³ÉÁËȺ·¢ÏûÏ¢¡£
ËäÈ»ÎÒ¶ÔselectÄ£ÐÍ»¹²»ÊìϤ£¬µ«ÊÇÎÒÖªµÀÈç¹ûÒªÔÚÒ»¸öÌ×½Ó×ÖÉÏ·¢ÏûÏ¢¾Í±ØÐëÉèÖÃFD ......

flex¿ì½Ý¼ü´óÈ«

Ctrl-F11: Ö´ÐУ¨Run£©
F11: ³ý´í£¨Debug£©
Ctrl-Alt-Down: Öظ´Ä¿Ç°ËùÔڱ༭ÁУ¨Repeat current line £©
Alt-Up: Òƶ¯±¾ÁУ¬»òÑ¡ÔñÁÐÍùÉÏÒƶ¯£¨Move line (or selection) up £©
Alt-Down: Òƶ¯±¾ÁУ¬»òÑ¡ÔñÁÐÏÂÍùÒƶ¯£¨Move line (or selection) down £©
Ctrl-Click: ÒÆÖÁ¶¨ÒåÇø£¨Go to definition (also F3) £© ......

Flex¼¼ÇÉ£º¼ÆËãÆ÷Ô´´úÂë

ÎÊÌâÃèÊö£º
ÊäÈëÒ»¸öÊý£¬È»ºó°´Ä³¸öÔËËã·û£¬ÔÙÊäÈëÁíÒ»¸öÊý£¬°´µÈºÅ¼´¿ÉµÃ³ö½á¹û¡£Ö»°´ÕÕÊäÈë˳Ðò¼ÆËã½á¹û£¬¶ø·Ç°´ÕÕÔËËã·ûÓÅÏȼ¶À´µÃ³ö½á¹û£¬¼´£¬Èç¹û°´Ë³ÐòÊäÈë2+8*3£½»áµÃµ½30£¬¶ø·Ç26.
Ëã·¨ÃèÊö£º
¶¨ÒåÈý¸öÈ«¾Ö±äÁ¿£¬·Ö±ðÊÇfirst£¨Number£©£¬ second£¨Number£©£¬ symbol£¨String£©
first´ú±í¶þÄ¿ÔËËãÖеÚÒ»¸öÊý£¬se ......

flex¹ú¼Ê»¯

£¨ÉÏ£©
µ±ÒªÊ¹Óò»Í¬ÓïÑԵİ汾µÄʱºò£¬±ãÐèÒªÁËÓ¦ÓóÌÐòµÄ¹ú¼Ê»¯¡£
¹ú¼Ê»¯²»µ¥Ö¸×Ö·û´®µÄ¹ú¼Ê»¯£¬»¹ÓÐǶÈëʽ×ÊÔ´£¨Í¼Æ¬£©µÄ¹ú¼Ê»¯£¬½Å±¾ÀඨÒåµÄÒýÓá£ÔÚ³ÌÐòµ±ÖÐʹÓùú¼Ê»¯µÄÒªµã°üÀ¨Á˱àд×ÊÔ´Îļþ£¬²ÎÊýµÄÉèÖ㬱¾µØ»¯Ïà¹ØµÄflex¿ò¼ÜÄÚÈÝ¡£
×ÊÔ´ÎļþÊÇÓúó׺ÃûΪ“.properties”½áÊøµÄÎļþ£¬ÒÔÒ»ÖÖ¼üÖµµÄÐ ......

flex repeater¿Ø¼þRepeater is not executing"µÄÒì³£


flex repeater¿Ø¼þ×¢Òâ
Repeater ¹ËÃû˼Ò壬Repeat¾ÍÊÇÖظ´µÄÒâ˼£¬ Repeater ¾ÍÊÇÓÃÀ´Öظ´µÄ¿Ø¼þ
Repeater »á¸ù¾ÝÊý¾ÝÔ´ÖжÔÏóµÄ¶àÉÙÀ´²úÉú¶àÉÙ¸ö×ÓÏÉú³ÉµÄ×ÓÏîÈ«²¿ÊÇÒÔÊý×éÐÎʽ´æÔÚµÄ
<mx:Repeater id="myRepeater" dataProvider="{myArray}">
        <mx:HBox> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ