亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? flex.texi

?? 詞法分析器生成工具
?? TEXI
?? 第 1 頁 / 共 5 頁
字號:
"zap me"
@end example

(It will copy all other characters in the input to the
output since they will be matched by the default rule.)

Here is a program which compresses multiple blanks and
tabs down to a single blank, and throws away whitespace
found at the end of a line:

@example
%%
[ \t]+        putchar( ' ' );
[ \t]+$       /* ignore this token */
@end example

If the action contains a '@{', then the action spans till
the balancing '@}' is found, and the action may cross
multiple lines.  @code{flex} knows about C strings and comments and
won't be fooled by braces found within them, but also
allows actions to begin with @samp{%@{} and will consider the
action to be all the text up to the next @samp{%@}} (regardless of
ordinary braces inside the action).

An action consisting solely of a vertical bar ('|') means
"same as the action for the next rule." See below for an
illustration.

Actions can include arbitrary C code, including @code{return}
statements to return a value to whatever routine called
@samp{yylex()}.  Each time @samp{yylex()} is called it continues
processing tokens from where it last left off until it either
reaches the end of the file or executes a return.

Actions are free to modify @code{yytext} except for lengthening
it (adding characters to its end--these will overwrite
later characters in the input stream).  This however does
not apply when using @samp{%array} (see above); in that case,
@code{yytext} may be freely modified in any way.

Actions are free to modify @code{yyleng} except they should not
do so if the action also includes use of @samp{yymore()} (see
below).

There are a number of special directives which can be
included within an action:

@itemize -
@item
@samp{ECHO} copies yytext to the scanner's output.

@item
@code{BEGIN} followed by the name of a start condition
places the scanner in the corresponding start
condition (see below).

@item
@code{REJECT} directs the scanner to proceed on to the
"second best" rule which matched the input (or a
prefix of the input).  The rule is chosen as
described above in "How the Input is Matched", and
@code{yytext} and @code{yyleng} set up appropriately.  It may
either be one which matched as much text as the
originally chosen rule but came later in the @code{flex}
input file, or one which matched less text.  For
example, the following will both count the words in
the input and call the routine special() whenever
"frob" is seen:

@example
        int word_count = 0;
%%

frob        special(); REJECT;
[^ \t\n]+   ++word_count;
@end example

Without the @code{REJECT}, any "frob"'s in the input would
not be counted as words, since the scanner normally
executes only one action per token.  Multiple
@code{REJECT's} are allowed, each one finding the next
best choice to the currently active rule.  For
example, when the following scanner scans the token
"abcd", it will write "abcdabcaba" to the output:

@example
%%
a        |
ab       |
abc      |
abcd     ECHO; REJECT;
.|\n     /* eat up any unmatched character */
@end example

(The first three rules share the fourth's action
since they use the special '|' action.)  @code{REJECT} is
a particularly expensive feature in terms of
scanner performance; if it is used in @emph{any} of the
scanner's actions it will slow down @emph{all} of the
scanner's matching.  Furthermore, @code{REJECT} cannot be used
with the @samp{-Cf} or @samp{-CF} options (see below).

Note also that unlike the other special actions,
@code{REJECT} is a @emph{branch}; code immediately following it
in the action will @emph{not} be executed.

@item
@samp{yymore()} tells the scanner that the next time it
matches a rule, the corresponding token should be
@emph{appended} onto the current value of @code{yytext} rather
than replacing it.  For example, given the input
"mega-kludge" the following will write
"mega-mega-kludge" to the output:

@example
%%
mega-    ECHO; yymore();
kludge   ECHO;
@end example

First "mega-" is matched and echoed to the output.
Then "kludge" is matched, but the previous "mega-"
is still hanging around at the beginning of @code{yytext}
so the @samp{ECHO} for the "kludge" rule will actually
write "mega-kludge".
@end itemize

Two notes regarding use of @samp{yymore()}.  First, @samp{yymore()}
depends on the value of @code{yyleng} correctly reflecting the
size of the current token, so you must not modify @code{yyleng}
if you are using @samp{yymore()}.  Second, the presence of
@samp{yymore()} in the scanner's action entails a minor
performance penalty in the scanner's matching speed.

@itemize -
@item
@samp{yyless(n)} returns all but the first @var{n} characters of
the current token back to the input stream, where
they will be rescanned when the scanner looks for
the next match.  @code{yytext} and @code{yyleng} are adjusted
appropriately (e.g., @code{yyleng} will now be equal to @var{n}
).  For example, on the input "foobar" the
following will write out "foobarbar":

@example
%%
foobar    ECHO; yyless(3);
[a-z]+    ECHO;
@end example

An argument of 0 to @code{yyless} will cause the entire
current input string to be scanned again.  Unless
you've changed how the scanner will subsequently
process its input (using @code{BEGIN}, for example), this
will result in an endless loop.

Note that @code{yyless} is a macro and can only be used in the
flex input file, not from other source files.

@item
@samp{unput(c)} puts the character @code{c} back onto the input
stream.  It will be the next character scanned.
The following action will take the current token
and cause it to be rescanned enclosed in
parentheses.

@example
@{
int i;
/* Copy yytext because unput() trashes yytext */
char *yycopy = strdup( yytext );
unput( ')' );
for ( i = yyleng - 1; i >= 0; --i )
    unput( yycopy[i] );
unput( '(' );
free( yycopy );
@}
@end example

Note that since each @samp{unput()} puts the given
character back at the @emph{beginning} of the input stream,
pushing back strings must be done back-to-front.
An important potential problem when using @samp{unput()} is that
if you are using @samp{%pointer} (the default), a call to @samp{unput()}
@emph{destroys} the contents of @code{yytext}, starting with its
rightmost character and devouring one character to the left
with each call.  If you need the value of yytext preserved
after a call to @samp{unput()} (as in the above example), you
must either first copy it elsewhere, or build your scanner
using @samp{%array} instead (see How The Input Is Matched).

Finally, note that you cannot put back @code{EOF} to attempt to
mark the input stream with an end-of-file.

@item
@samp{input()} reads the next character from the input
stream.  For example, the following is one way to
eat up C comments:

@example
%%
"/*"        @{
            register int c;

            for ( ; ; )
                @{
                while ( (c = input()) != '*' &&
                        c != EOF )
                    ;    /* eat up text of comment */

                if ( c == '*' )
                    @{
                    while ( (c = input()) == '*' )
                        ;
                    if ( c == '/' )
                        break;    /* found the end */
                    @}

                if ( c == EOF )
                    @{
                    error( "EOF in comment" );
                    break;
                    @}
                @}
            @}
@end example

(Note that if the scanner is compiled using @samp{C++},
then @samp{input()} is instead referred to as @samp{yyinput()},
in order to avoid a name clash with the @samp{C++} stream
by the name of @code{input}.)

@item YY_FLUSH_BUFFER
flushes the scanner's internal buffer so that the next time the scanner
attempts to match a token, it will first refill the buffer using
@code{YY_INPUT} (see The Generated Scanner, below).  This action is
a special case of the more general @samp{yy_flush_buffer()} function,
described below in the section Multiple Input Buffers.

@item
@samp{yyterminate()} can be used in lieu of a return
statement in an action.  It terminates the scanner
and returns a 0 to the scanner's caller, indicating
"all done".  By default, @samp{yyterminate()} is also
called when an end-of-file is encountered.  It is a
macro and may be redefined.
@end itemize

@node Generated scanner, Start conditions, Actions, Top
@section The generated scanner

The output of @code{flex} is the file @file{lex.yy.c}, which contains
the scanning routine @samp{yylex()}, a number of tables used by
it for matching tokens, and a number of auxiliary routines
and macros.  By default, @samp{yylex()} is declared as follows:

@example
int yylex()
    @{
    @dots{} various definitions and the actions in here @dots{}
    @}
@end example

(If your environment supports function prototypes, then it
will be "int yylex( void  )".)   This  definition  may  be
changed by defining the "YY_DECL" macro.  For example, you
could use:

@example
#define YY_DECL float lexscan( a, b ) float a, b;
@end example

to give the scanning routine the name @code{lexscan}, returning a
float, and taking two floats as arguments.  Note that if
you give arguments to the scanning routine using a
K&R-style/non-prototyped function declaration, you must
terminate the definition with a semi-colon (@samp{;}).

Whenever @samp{yylex()} is called, it scans tokens from the
global input file @code{yyin} (which defaults to stdin).  It
continues until it either reaches an end-of-file (at which
point it returns the value 0) or one of its actions
executes a @code{return} statement.

If the scanner reaches an end-of-file, subsequent calls are undefined
unless either @code{yyin} is pointed at a new input file (in which case
scanning continues from that file), or @samp{yyrestart()} is called.
@samp{yyrestart()} takes one argument, a @samp{FILE *} pointer (which
can be nil, if you've set up @code{YY_INPUT} to scan from a source
other than @code{yyin}), and initializes @code{yyin} for scanning from
that file.  Essentially there is no difference between just assigning
@code{yyin} to a new input file or using @samp{yyrestart()} to do so;
the latter is available for compatibility with previous versions of
@code{flex}, and because it can be used to switch input files in the
middle of scanning.  It can also be used to throw away the current
input buffer, by calling it with an argument of @code{yyin}; but
better is to use @code{YY_FLUSH_BUFFER} (see above).  Note that
@samp{yyrestart()} does @emph{not} reset the start condition to
@code{INITIAL} (see Start Conditions, below).


If @samp{yylex()} stops scanning due to executing a @code{return}
statement in one of the actions, the scanner may then be called
again and it will resume scanning where it left off.

By default (and for purposes of efficiency), the scanner
uses block-reads rather than simple @samp{getc()} calls to read
characters from @code{yyin}.  The nature of how it gets its input
can be controlled by defining the @code{YY_INPUT} macro.
YY_INPUT's calling sequence is
"YY_INPUT(buf,result,max_size)".  Its action is to place
up to @var{max_size} characters in the character array @var{buf} and
return in the integer variable @var{result} either the number of
characters read or the constant YY_NULL (0 on Unix
systems) to indicate EOF.  The default YY_INPUT reads from
the global file-pointer "yyin".

A sample definition of YY_INPUT (in the definitions
section of the input file):

@example
%@{
#define YY_INPUT(buf,result,max_size) \
    @{ \
    int c = getchar(); \
    result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \
    @}
%@}
@end example

This definition will change the input processing to occur
one character at a time.

When the scanner receives an end-of-file indication from
YY_INPUT, it then checks the @samp{yywrap()} function.  If
@samp{yywrap()} returns false (zero), then it is assumed that the
function has gone ahead and set up @code{yyin} to point to
another input file, and scanning continues.  If it returns
true (non-zero), then the scanner terminates, returning 0
to its caller.  Note that in either case, the start
condition remains unchanged; it does @emph{not} revert to @code{INITIAL}.

If you do not supply your own version of @samp{yywrap()}, then you
must either use @samp{%option noyywrap} (in which case the scanner
behaves as though @samp{yywrap()} returned 1), or you must link with
@samp{-lfl} to obtain the default version of the routine, which always
returns 1.

Three routines are available for scanning from in-memory
buffers rather than files: @samp{yy_scan_string()},
@samp{yy_scan_bytes()}, and @samp{yy_scan_buffer()}.  See the discussion
of them below in the section Multiple Input Buffers.

The scanner writes its @samp{ECHO} output to the @code{yyout} global
(default, stdout), which may be redefined by the user
simply by assigning it to some other @code{FILE} pointer.

@node Start conditions, Multiple buffers, Generated scanner, Top
@section Start conditions

@code{flex} provides a mechanism for conditionally activating
rules.  Any rule whose pattern is prefixed with "<sc>"
will only be active when the scanner is in the start
condition named "sc".  For example,

@example
<STRING>[^"]*        @{ /* eat up the string body ... */
            @dots{}
            @}
@end example

@noindent
will be active only when the scanner is in the "STRING"
start condition, and

@example
<INITIAL,STRING,QUOTE>\.        @{ /* handle an escape ... */
            @dots{}
            @}
@end example

@noindent
will be active only when the current start condition is
either "INITIAL", "STRING", or "QUOTE".

Start conditions are declared in the definitions (first)
section of the input using unindented lines beginning with
either @samp{%s} or @samp{%x} followed by a list of names.  The former
declares @emph{inclusive} start conditions, the latter @emph{exclusive}
start conditions.  A start condition is activated using
the @code{BEGIN} action.  Until the next @code{BEGIN} action is
executed, rules with the given start condition will be active
and rules with other start conditions will be inactive.
If the start condition is @emph{inclusive}, then rules with no

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品免费看| 亚洲青青青在线视频| 在线观看日韩毛片| 99视频精品全部免费在线| 成人一区二区三区视频在线观看| 人人狠狠综合久久亚洲| 亚洲午夜久久久久久久久电影网 | 亚洲三级视频在线观看| 国产精品久久久久久久久免费丝袜| 精品国产一区二区三区久久久蜜月| 欧美精品亚洲一区二区在线播放| 欧美一区二区在线免费播放| 欧美成人a在线| 欧美激情一区在线观看| 国产精品国产三级国产aⅴ无密码| 中文字幕欧美一区| 一区二区三区在线观看视频| 五月综合激情婷婷六月色窝| 免费在线观看视频一区| 国产成人日日夜夜| 在线观看三级视频欧美| 欧美va在线播放| 国产精品婷婷午夜在线观看| 亚洲精品一二三区| 免费人成在线不卡| 国产成人在线电影| 色综合久久中文字幕| 555www色欧美视频| 国产欧美精品一区二区色综合朱莉| 综合久久一区二区三区| 丝袜诱惑亚洲看片| 国产精品综合网| 欧美在线一二三| 久久久久久免费网| 亚洲国产精品人人做人人爽| 久久国内精品自在自线400部| 成av人片一区二区| 欧美高清dvd| 国产精品久久夜| 久国产精品韩国三级视频| 99久久伊人精品| 精品日韩99亚洲| 有坂深雪av一区二区精品| 国产一区二区三区综合| 91行情网站电视在线观看高清版| 精品欧美一区二区久久| 亚洲同性gay激情无套| 亚洲成人在线网站| av电影在线观看不卡| 日韩精品影音先锋| 亚洲成人动漫在线观看| 国产精品一区专区| 日韩三级视频中文字幕| 亚洲成av人片一区二区梦乃| 99久久综合色| 欧美国产亚洲另类动漫| 韩国女主播一区| 91精品婷婷国产综合久久| 亚洲男同1069视频| a美女胸又www黄视频久久| 久久香蕉国产线看观看99| 日本 国产 欧美色综合| 在线电影院国产精品| 夜夜嗨av一区二区三区中文字幕| 不卡的av在线| 国产精品日产欧美久久久久| 国产精品一区二区三区四区| 欧美mv日韩mv亚洲| 美女网站视频久久| 欧美三级中文字幕在线观看| 亚洲一区二区三区在线| 色哟哟日韩精品| 亚洲视频在线观看三级| 色诱视频网站一区| 亚洲视频一区在线观看| 不卡一区二区在线| 亚洲天天做日日做天天谢日日欢| 99麻豆久久久国产精品免费| 一区二区三区精品在线| 欧美亚州韩日在线看免费版国语版| 亚洲靠逼com| 欧美日韩黄色影视| 青青国产91久久久久久 | 国产一区二区美女| 久久综合一区二区| 丰满少妇在线播放bd日韩电影| 91福利国产精品| 亚洲激情在线激情| 欧美日韩国产精选| 狠狠色丁香久久婷婷综| 亚洲国产精品黑人久久久| 国产一区二区美女诱惑| 国产精品美日韩| 91国偷自产一区二区三区观看 | 丝袜亚洲精品中文字幕一区| 91精品国产综合久久久久| 九色综合国产一区二区三区| 国产蜜臀97一区二区三区| 色悠久久久久综合欧美99| 视频精品一区二区| 国产日本亚洲高清| 91黄色免费看| 国产一区二区三区久久久| 中文一区在线播放| 欧美日韩和欧美的一区二区| 久久99精品久久久久久国产越南| 亚洲国产精品成人综合| 在线亚洲欧美专区二区| 久久99国产精品免费网站| 亚洲啪啪综合av一区二区三区| 精品污污网站免费看| 国产成人免费视频| 亚洲国产成人av| 国产欧美在线观看一区| 欧美日韩久久不卡| 成av人片一区二区| 蜜桃视频第一区免费观看| 国产精品久久久久久久久搜平片 | 久久精品72免费观看| 亚洲欧美电影院| 国产午夜精品福利| 欧美日韩一二区| 成人v精品蜜桃久久一区| 另类小说视频一区二区| 亚洲特黄一级片| 国产色综合一区| 日韩欧美专区在线| 欧美视频在线播放| aaa欧美色吧激情视频| 韩国v欧美v日本v亚洲v| 亚洲成人动漫一区| 一区二区三区日韩| 亚洲视频在线一区观看| 久久久国产午夜精品| 日韩一区二区三区四区| 欧美日韩久久一区二区| 一本色道久久综合狠狠躁的推荐| 国产成人亚洲综合a∨猫咪| 亚洲精品欧美激情| 中文字幕av一区二区三区高 | 成人小视频免费在线观看| 奇米888四色在线精品| 亚洲一区二区三区影院| 亚洲精品国产a| 国产精品不卡一区二区三区| 国产亚洲成aⅴ人片在线观看| 精品国产伦一区二区三区观看方式 | 国产麻豆精品在线观看| 日韩成人一级大片| 天堂蜜桃91精品| 日本强好片久久久久久aaa| 亚洲国产aⅴ天堂久久| 一区二区不卡在线播放| 夜夜嗨av一区二区三区四季av| 亚洲女爱视频在线| 亚洲黄色性网站| 亚洲mv在线观看| 香蕉影视欧美成人| 婷婷综合久久一区二区三区| 亚洲第一狼人社区| 日韩av一二三| 蜜桃传媒麻豆第一区在线观看| 久久99国产精品麻豆| 国产精品99久久久久久久vr | 久久9热精品视频| 精品一区二区三区免费观看| 国精品**一区二区三区在线蜜桃| 国产永久精品大片wwwapp| 国产**成人网毛片九色 | 欧美一级在线视频| 久久一区二区视频| 国产精品久久久久久一区二区三区| 国产精品美女久久久久av爽李琼 | 久久综合综合久久综合| 国产麻豆视频精品| 色婷婷av一区二区三区软件 | 欧美性淫爽ww久久久久无| 7777精品伊人久久久大香线蕉完整版 | 1024成人网| 亚洲chinese男男1069| 精品系列免费在线观看| 成人app网站| 51午夜精品国产| 国产亚洲综合av| 亚洲欧美二区三区| 久久www免费人成看片高清| 国产福利91精品一区二区三区| 日本乱人伦aⅴ精品| 欧美xxxx在线观看| 亚洲精品久久7777| 国产一区二区美女诱惑| 欧美日韩在线一区二区| 久久精品欧美日韩| 日本在线观看不卡视频| 成人免费看黄yyy456| 欧美一级搡bbbb搡bbbb| 亚洲精品写真福利| 懂色一区二区三区免费观看| 欧美日韩一本到| 亚洲精品乱码久久久久久久久|