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

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

?? flex.texi

?? 編譯原理(Flex):生成詞法和語法分析程序的源代碼的程序。
?? 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一区二区三区免费野_久草精品视频
日韩有码一区二区三区| 欧美一区二区三区的| 欧美高清在线精品一区| 国产91丝袜在线播放0| 国产精品色哟哟| 成人va在线观看| 亚洲视频一二区| 欧美日韩亚洲综合一区| 日本vs亚洲vs韩国一区三区二区 | 亚洲国产精品精华液2区45| 成人一区在线看| 亚洲欧美日韩久久| 91精品国产一区二区人妖| 国产在线播放一区三区四| 国产三级精品三级| 91福利区一区二区三区| 另类小说一区二区三区| 欧美国产视频在线| 欧美日精品一区视频| 久久精品国产澳门| 国产精品盗摄一区二区三区| 欧美色爱综合网| 精品一区二区三区日韩| 一区二区中文视频| 欧美一区永久视频免费观看| 国产精品1024久久| 亚洲成人免费电影| 欧美激情一区二区三区| 欧美日韩高清不卡| 国产成人精品影视| 首页国产欧美日韩丝袜| 国产欧美日韩久久| 欧美一区二区三区婷婷月色| 成人久久18免费网站麻豆 | 日韩欧美电影一区| 91免费看片在线观看| 免费高清视频精品| 一区二区三区在线视频免费| 久久一区二区三区四区| 欧美色图免费看| 成人午夜免费视频| 久久精品国产成人一区二区三区| 综合欧美一区二区三区| 亚洲精品一区二区三区在线观看| 欧美午夜精品一区二区蜜桃| 国产精品1区2区3区在线观看| 天天操天天色综合| 综合婷婷亚洲小说| 国产清纯白嫩初高生在线观看91| 91精品久久久久久久91蜜桃| 91浏览器打开| 国产精品主播直播| 青青草精品视频| 亚洲一区二区高清| 亚洲视频网在线直播| 国产人成亚洲第一网站在线播放| 日韩欧美一区二区视频| 欧美三级一区二区| 91福利在线看| 色婷婷av一区| 91麻豆swag| 99v久久综合狠狠综合久久| 国产91在线|亚洲| 国产精品香蕉一区二区三区| 国产最新精品精品你懂的| 久久精品国产精品青草| 免播放器亚洲一区| 丝袜亚洲精品中文字幕一区| 亚洲h在线观看| 亚洲综合区在线| 亚洲欧美另类图片小说| 日韩理论电影院| 中文字幕一区二区三区四区不卡 | 国内精品自线一区二区三区视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲成人激情av| 夜夜精品视频一区二区| 亚洲人成影院在线观看| 亚洲伦在线观看| 一区二区三区在线看| 亚洲久草在线视频| 一区二区激情视频| 亚洲国产欧美一区二区三区丁香婷| 亚洲色图视频免费播放| 亚洲黄色录像片| 夜夜精品浪潮av一区二区三区| 亚洲影视在线播放| 午夜视频一区二区| 蜜臀av一区二区三区| 国产一区二区在线影院| 国产成人啪免费观看软件| 国产成人aaaa| 色噜噜狠狠色综合欧洲selulu| 欧美亚洲一区二区在线| 欧美一区二区在线看| 欧美电影免费观看高清完整版在线| 精品国产精品网麻豆系列| 亚洲无人区一区| 麻豆精品久久久| 国产精品一线二线三线精华| av在线不卡电影| 欧美视频一区二| 日韩精品中文字幕在线不卡尤物 | 亚洲无线码一区二区三区| 日韩综合一区二区| 精品在线亚洲视频| 99久久亚洲一区二区三区青草| 欧美亚州韩日在线看免费版国语版| 欧美久久久久久久久久| 精品成人a区在线观看| 国产精品理论在线观看| 亚洲一区二区三区爽爽爽爽爽| 老司机午夜精品99久久| 99久久婷婷国产综合精品电影| 欧美性一区二区| 久久精品一二三| 一区二区高清在线| 国产在线国偷精品产拍免费yy| 色综合久久中文综合久久97| 欧美一区二区三区日韩视频| 中文无字幕一区二区三区 | 热久久久久久久| 成人精品视频一区二区三区| 欧美亚洲另类激情小说| 久久午夜色播影院免费高清| 亚洲影视在线观看| 国产成人丝袜美腿| 欧美一级高清片| 亚洲美女在线一区| 国产麻豆精品theporn| 欧美无乱码久久久免费午夜一区 | 日韩欧美中文字幕一区| 亚洲精品欧美激情| 国产在线视频一区二区| 欧美色图第一页| 中文字幕一区二区5566日韩| 激情文学综合网| 欧美日韩一本到| 亚洲精品综合在线| 国产aⅴ精品一区二区三区色成熟| 欧美精品1区2区| 一区二区三区四区高清精品免费观看| 狠狠色2019综合网| 欧美一区二区日韩一区二区| 亚洲乱码国产乱码精品精可以看| 国产91在线看| 久久无码av三级| 免费日本视频一区| 欧美日韩精品一区二区三区| 亚洲人成电影网站色mp4| 福利一区二区在线观看| 精品国产伦一区二区三区免费| 亚洲福利视频一区| 在线免费观看一区| 亚洲女同ⅹxx女同tv| a在线播放不卡| 中文字幕不卡一区| 国产精品羞羞答答xxdd| 久久蜜桃香蕉精品一区二区三区| 免费一级欧美片在线观看| 欧美麻豆精品久久久久久| 一区二区三区欧美亚洲| 91丨porny丨户外露出| 国产精品久久久久影院| 不卡av在线免费观看| 国产精品免费看片| 成人白浆超碰人人人人| 国产精品美女久久久久久2018 | 久久中文娱乐网| 韩国视频一区二区| 精品处破学生在线二十三| 久久se精品一区二区| 日韩精品一区二| 国产精品香蕉一区二区三区| 国产日韩精品一区二区浪潮av | 久久国产免费看| 久久日韩粉嫩一区二区三区| 国产美女精品在线| 国产精品久久久久婷婷二区次| av中文字幕不卡| 亚洲精品日日夜夜| 欧美女孩性生活视频| 久久99久久99小草精品免视看| 久久久久久久网| 成人精品免费看| 一区二区三区不卡视频| 欧美剧在线免费观看网站| 免费精品视频在线| 国产三级精品视频| 日本韩国视频一区二区| 日韩有码一区二区三区| 久久久久久久久一| 色一情一伦一子一伦一区| 婷婷中文字幕一区三区| 精品国产免费久久 | 国产成人av资源| 亚洲精品视频一区二区| 欧美大片一区二区三区| 成人avav影音| 亚洲h精品动漫在线观看|