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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? flex.texi

?? 編譯原理(Flex):生成詞法和語法分析程序的源代碼的程序。
?? TEXI
?? 第 1 頁 / 共 5 頁
字號:
@end example

The "name" is a word beginning with a letter or an
underscore ('_') followed by zero or more letters, digits, '_',
or '-' (dash).  The definition is taken to begin at the
first non-white-space character following the name and
continuing to the end of the line.  The definition can
subsequently be referred to using "@{name@}", which will
expand to "(definition)".  For example,

@example
DIGIT    [0-9]
ID       [a-z][a-z0-9]*
@end example

@noindent
defines "DIGIT" to be a regular expression which matches a
single digit, and "ID" to be a regular expression which
matches a letter followed by zero-or-more
letters-or-digits.  A subsequent reference to

@example
@{DIGIT@}+"."@{DIGIT@}*
@end example

@noindent
is identical to

@example
([0-9])+"."([0-9])*
@end example

@noindent
and matches one-or-more digits followed by a '.' followed
by zero-or-more digits.

The @var{rules} section of the @code{flex} input contains a series of
rules of the form:

@example
pattern   action
@end example

@noindent
where the pattern must be unindented and the action must
begin on the same line.

See below for a further description of patterns and
actions.

Finally, the user code section is simply copied to
@file{lex.yy.c} verbatim.  It is used for companion routines
which call or are called by the scanner.  The presence of
this section is optional; if it is missing, the second @samp{%%}
in the input file may be skipped, too.

In the definitions and rules sections, any @emph{indented} text or
text enclosed in @samp{%@{} and @samp{%@}} is copied verbatim to the
output (with the @samp{%@{@}}'s removed).  The @samp{%@{@}}'s must
appear unindented on lines by themselves.

In the rules section, any indented or %@{@} text appearing
before the first rule may be used to declare variables
which are local to the scanning routine and (after the
declarations) code which is to be executed whenever the
scanning routine is entered.  Other indented or %@{@} text
in the rule section is still copied to the output, but its
meaning is not well-defined and it may well cause
compile-time errors (this feature is present for @code{POSIX} compliance;
see below for other such features).

In the definitions section (but not in the rules section),
an unindented comment (i.e., a line beginning with "/*")
is also copied verbatim to the output up to the next "*/".

@node Patterns, Matching, Format, Top
@section Patterns

The patterns in the input are written using an extended
set of regular expressions.  These are:

@table @samp
@item x
match the character @samp{x}
@item .
any character (byte) except newline
@item [xyz]
a "character class"; in this case, the pattern
matches either an @samp{x}, a @samp{y}, or a @samp{z}
@item [abj-oZ]
a "character class" with a range in it; matches
an @samp{a}, a @samp{b}, any letter from @samp{j} through @samp{o},
or a @samp{Z}
@item [^A-Z]
a "negated character class", i.e., any character
but those in the class.  In this case, any
character EXCEPT an uppercase letter.
@item [^A-Z\n]
any character EXCEPT an uppercase letter or
a newline
@item @var{r}*
zero or more @var{r}'s, where @var{r} is any regular expression
@item @var{r}+
one or more @var{r}'s
@item @var{r}?
zero or one @var{r}'s (that is, "an optional @var{r}")
@item @var{r}@{2,5@}
anywhere from two to five @var{r}'s
@item @var{r}@{2,@}
two or more @var{r}'s
@item @var{r}@{4@}
exactly 4 @var{r}'s
@item @{@var{name}@}
the expansion of the "@var{name}" definition
(see above)
@item "[xyz]\"foo"
the literal string: @samp{[xyz]"foo}
@item \@var{x}
if @var{x} is an @samp{a}, @samp{b}, @samp{f}, @samp{n}, @samp{r}, @samp{t}, or @samp{v},
then the ANSI-C interpretation of \@var{x}.
Otherwise, a literal @samp{@var{x}} (used to escape
operators such as @samp{*})
@item \0
a NUL character (ASCII code 0)
@item \123
the character with octal value 123
@item \x2a
the character with hexadecimal value @code{2a}
@item (@var{r})
match an @var{r}; parentheses are used to override
precedence (see below)
@item @var{r}@var{s}
the regular expression @var{r} followed by the
regular expression @var{s}; called "concatenation"
@item @var{r}|@var{s}
either an @var{r} or an @var{s}
@item @var{r}/@var{s}
an @var{r} but only if it is followed by an @var{s}.  The text
matched by @var{s} is included when determining whether this rule is
the @dfn{longest match}, but is then returned to the input before
the action is executed.  So the action only sees the text matched
by @var{r}.  This type of pattern is called @dfn{trailing context}.
(There are some combinations of @samp{@var{r}/@var{s}} that @code{flex}
cannot match correctly; see notes in the Deficiencies / Bugs section
below regarding "dangerous trailing context".)
@item ^@var{r}
an @var{r}, but only at the beginning of a line (i.e.,
which just starting to scan, or right after a
newline has been scanned).
@item @var{r}$
an @var{r}, but only at the end of a line (i.e., just
before a newline).  Equivalent to "@var{r}/\n".

Note that flex's notion of "newline" is exactly
whatever the C compiler used to compile flex
interprets '\n' as; in particular, on some DOS
systems you must either filter out \r's in the
input yourself, or explicitly use @var{r}/\r\n for "r$".
@item <@var{s}>@var{r}
an @var{r}, but only in start condition @var{s} (see
below for discussion of start conditions)
<@var{s1},@var{s2},@var{s3}>@var{r}
same, but in any of start conditions @var{s1},
@var{s2}, or @var{s3}
@item <*>@var{r}
an @var{r} in any start condition, even an exclusive one.
@item <<EOF>>
an end-of-file
<@var{s1},@var{s2}><<EOF>>
an end-of-file when in start condition @var{s1} or @var{s2}
@end table

Note that inside of a character class, all regular
expression operators lose their special meaning except escape
('\') and the character class operators, '-', ']', and, at
the beginning of the class, '^'.

The regular expressions listed above are grouped according
to precedence, from highest precedence at the top to
lowest at the bottom.  Those grouped together have equal
precedence.  For example,

@example
foo|bar*
@end example

@noindent
is the same as

@example
(foo)|(ba(r*))
@end example

@noindent
since the '*' operator has higher precedence than
concatenation, and concatenation higher than alternation ('|').
This pattern therefore matches @emph{either} the string "foo" @emph{or}
the string "ba" followed by zero-or-more r's.  To match
"foo" or zero-or-more "bar"'s, use:

@example
foo|(bar)*
@end example

@noindent
and to match zero-or-more "foo"'s-or-"bar"'s:

@example
(foo|bar)*
@end example

In addition to characters and ranges of characters,
character classes can also contain character class
@dfn{expressions}.  These are expressions enclosed inside @samp{[}: and @samp{:}]
delimiters (which themselves must appear between the '['
and ']' of the character class; other elements may occur
inside the character class, too).  The valid expressions
are:

@example
[:alnum:] [:alpha:] [:blank:]
[:cntrl:] [:digit:] [:graph:]
[:lower:] [:print:] [:punct:]
[:space:] [:upper:] [:xdigit:]
@end example

These expressions all designate a set of characters
equivalent to the corresponding standard C @samp{isXXX} function.  For
example, @samp{[:alnum:]} designates those characters for which
@samp{isalnum()} returns true - i.e., any alphabetic or numeric.
Some systems don't provide @samp{isblank()}, so flex defines
@samp{[:blank:]} as a blank or a tab.

For example, the following character classes are all
equivalent:

@example
[[:alnum:]]
[[:alpha:][:digit:]
[[:alpha:]0-9]
[a-zA-Z0-9]
@end example

If your scanner is case-insensitive (the @samp{-i} flag), then
@samp{[:upper:]} and @samp{[:lower:]} are equivalent to @samp{[:alpha:]}.

Some notes on patterns:

@itemize -
@item
A negated character class such as the example
"[^A-Z]" above @emph{will match a newline} unless "\n" (or an
equivalent escape sequence) is one of the
characters explicitly present in the negated character
class (e.g., "[^A-Z\n]").  This is unlike how many
other regular expression tools treat negated
character classes, but unfortunately the inconsistency
is historically entrenched.  Matching newlines
means that a pattern like [^"]* can match the
entire input unless there's another quote in the
input.

@item
A rule can have at most one instance of trailing
context (the '/' operator or the '$' operator).
The start condition, '^', and "<<EOF>>" patterns
can only occur at the beginning of a pattern, and,
as well as with '/' and '$', cannot be grouped
inside parentheses.  A '^' which does not occur at
the beginning of a rule or a '$' which does not
occur at the end of a rule loses its special
properties and is treated as a normal character.

The following are illegal:

@example
foo/bar$
<sc1>foo<sc2>bar
@end example

Note that the first of these, can be written
"foo/bar\n".

The following will result in '$' or '^' being
treated as a normal character:

@example
foo|(bar$)
foo|^bar
@end example

If what's wanted is a "foo" or a
bar-followed-by-a-newline, the following could be used (the special
'|' action is explained below):

@example
foo      |
bar$     /* action goes here */
@end example

A similar trick will work for matching a foo or a
bar-at-the-beginning-of-a-line.
@end itemize

@node Matching, Actions, Patterns, Top
@section How the input is matched

When the generated scanner is run, it analyzes its input
looking for strings which match any of its patterns.  If
it finds more than one match, it takes the one matching
the most text (for trailing context rules, this includes
the length of the trailing part, even though it will then
be returned to the input).  If it finds two or more
matches of the same length, the rule listed first in the
@code{flex} input file is chosen.

Once the match is determined, the text corresponding to
the match (called the @var{token}) is made available in the
global character pointer @code{yytext}, and its length in the
global integer @code{yyleng}.  The @var{action} corresponding to the
matched pattern is then executed (a more detailed
description of actions follows), and then the remaining input is
scanned for another match.

If no match is found, then the @dfn{default rule} is executed:
the next character in the input is considered matched and
copied to the standard output.  Thus, the simplest legal
@code{flex} input is:

@example
%%
@end example

which generates a scanner that simply copies its input
(one character at a time) to its output.

Note that @code{yytext} can be defined in two different ways:
either as a character @emph{pointer} or as a character @emph{array}.
You can control which definition @code{flex} uses by including
one of the special directives @samp{%pointer} or @samp{%array} in the
first (definitions) section of your flex input.  The
default is @samp{%pointer}, unless you use the @samp{-l} lex
compatibility option, in which case @code{yytext} will be an array.  The
advantage of using @samp{%pointer} is substantially faster
scanning and no buffer overflow when matching very large
tokens (unless you run out of dynamic memory).  The
disadvantage is that you are restricted in how your actions can
modify @code{yytext} (see the next section), and calls to the
@samp{unput()} function destroys the present contents of @code{yytext},
which can be a considerable porting headache when moving
between different @code{lex} versions.

The advantage of @samp{%array} is that you can then modify @code{yytext}
to your heart's content, and calls to @samp{unput()} do not
destroy @code{yytext} (see below).  Furthermore, existing @code{lex}
programs sometimes access @code{yytext} externally using
declarations of the form:
@example
extern char yytext[];
@end example
This definition is erroneous when used with @samp{%pointer}, but
correct for @samp{%array}.

@samp{%array} defines @code{yytext} to be an array of @code{YYLMAX} characters,
which defaults to a fairly large value.  You can change
the size by simply #define'ing @code{YYLMAX} to a different value
in the first section of your @code{flex} input.  As mentioned
above, with @samp{%pointer} yytext grows dynamically to
accommodate large tokens.  While this means your @samp{%pointer} scanner
can accommodate very large tokens (such as matching entire
blocks of comments), bear in mind that each time the
scanner must resize @code{yytext} it also must rescan the entire
token from the beginning, so matching such tokens can
prove slow.  @code{yytext} presently does @emph{not} dynamically grow if
a call to @samp{unput()} results in too much text being pushed
back; instead, a run-time error results.

Also note that you cannot use @samp{%array} with C++ scanner
classes (the @code{c++} option; see below).

@node Actions, Generated scanner, Matching, Top
@section Actions

Each pattern in a rule has a corresponding action, which
can be any arbitrary C statement.  The pattern ends at the
first non-escaped whitespace character; the remainder of
the line is its action.  If the action is empty, then when
the pattern is matched the input token is simply
discarded.  For example, here is the specification for a
program which deletes all occurrences of "zap me" from its
input:

@example
%%

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
bt7086福利一区国产| 欧美日韩夫妻久久| 午夜视频在线观看一区二区三区| 欧美在线色视频| 奇米精品一区二区三区四区 | 91免费看`日韩一区二区| 亚洲欧美经典视频| 精品精品欲导航| 91在线小视频| 久久精品久久99精品久久| 国产精品欧美精品| 欧美国产乱子伦| 欧美一a一片一级一片| 国产一区二区在线看| 亚洲国产精品久久人人爱| 中文字幕一区三区| 国产99一区视频免费| 亚洲精选一二三| 亚洲综合丝袜美腿| 亚洲成人黄色影院| 日韩国产高清在线| 老汉av免费一区二区三区| 韩国成人在线视频| 韩国v欧美v亚洲v日本v| 图片区小说区国产精品视频| 亚洲欧洲av色图| 国产精品毛片高清在线完整版| 日韩一区二区精品葵司在线| 欧美在线免费视屏| 91同城在线观看| 91视视频在线观看入口直接观看www | 国内国产精品久久| 免费久久精品视频| 日本成人在线视频网站| 三级成人在线视频| 日韩主播视频在线| 日日欢夜夜爽一区| 亚洲成a天堂v人片| 日韩国产高清在线| 美女在线视频一区| 国内精品国产成人国产三级粉色 | 久久久久久久久蜜桃| 国产精品视频线看| 久久综合九色综合欧美98| 日韩三级.com| 欧美精品一区男女天堂| 日韩午夜激情av| 日韩精品一区国产麻豆| 亚洲精品在线电影| 国产精品久久久久国产精品日日| 国产精品三级电影| 亚洲欧洲制服丝袜| 亚洲黄一区二区三区| 亚洲国产精品一区二区www在线| 依依成人精品视频| 亚洲成人av一区| 久久电影网站中文字幕| 国产毛片一区二区| 色琪琪一区二区三区亚洲区| 欧美亚洲综合色| 精品国产第一区二区三区观看体验 | 欧美成人午夜电影| 国产精品视频线看| 午夜精品一区在线观看| 国产一区二区三区免费播放| 成人免费毛片a| 337p亚洲精品色噜噜狠狠| 久久久不卡影院| 亚洲综合一区在线| 极品销魂美女一区二区三区| 成人黄色网址在线观看| 69久久夜色精品国产69蝌蚪网| 久久精品男人的天堂| 免费欧美高清视频| 欧美色男人天堂| 亚洲欧洲精品成人久久奇米网| 国产一二精品视频| 日韩你懂的电影在线观看| 国产·精品毛片| 91精品欧美福利在线观看| 亚洲精品你懂的| 粉嫩绯色av一区二区在线观看| 日韩免费一区二区三区在线播放| 亚洲成人精品一区二区| 欧美色图在线观看| 国产精品一级在线| 91精选在线观看| 夜夜嗨av一区二区三区网页| av在线不卡电影| 国产精品视频免费看| 国内成人免费视频| 欧美xxxx在线观看| 日本不卡不码高清免费观看| 91捆绑美女网站| 最新日韩av在线| 99久久综合狠狠综合久久| 国产喂奶挤奶一区二区三区| 国产制服丝袜一区| 2020国产精品自拍| 韩国女主播成人在线| 精品久久久久久综合日本欧美| 日韩不卡免费视频| 4438x成人网最大色成网站| 午夜av区久久| 91精品国产入口在线| 免费看黄色91| 久久久久久亚洲综合影院红桃| 国产一区二区在线观看视频| 久久亚洲一区二区三区明星换脸 | 国产一区二区日韩精品| 国产日韩欧美亚洲| 97久久超碰精品国产| 亚洲影院免费观看| 678五月天丁香亚洲综合网| 免费不卡在线观看| 2欧美一区二区三区在线观看视频| 欧美狂野另类xxxxoooo| 2023国产精品视频| 国产精品99久久久久久宅男| 欧美国产日本韩| 欧美日韩一区视频| 另类小说欧美激情| 国产精品毛片高清在线完整版 | 亚洲欧美日韩国产手机在线| 欧美精品日韩综合在线| 欧美成人一区二区| 成人av资源站| 日精品一区二区| 日本一二三不卡| 欧美日韩一区二区三区不卡| 久久精品噜噜噜成人88aⅴ| 国产日韩亚洲欧美综合| 欧美精品三级日韩久久| 国产一区二区影院| 亚洲午夜久久久久中文字幕久| 日韩限制级电影在线观看| 9色porny自拍视频一区二区| 偷窥国产亚洲免费视频| 中文天堂在线一区| 91碰在线视频| 一区二区欧美在线观看| 久久综合给合久久狠狠狠97色69| 日本久久电影网| 成人自拍视频在线观看| 蜜桃精品视频在线观看| 中文字幕一区二区不卡| 久久久精品综合| 欧美一区二区三区不卡| 欧美在线影院一区二区| 99免费精品视频| 成人精品小蝌蚪| 国产精品亚洲一区二区三区妖精 | 国产一区二区美女诱惑| 五月婷婷色综合| 一区二区视频在线| 国产精品区一区二区三区| 欧美xxxxxxxx| 91精品国产一区二区三区蜜臀| 在线亚洲+欧美+日本专区| 成人国产精品免费网站| 国产激情精品久久久第一区二区 | 国产日韩精品一区二区三区| 久久在线观看免费| 日韩一级黄色大片| 911精品产国品一二三产区| 欧美日韩综合一区| 欧美日韩国产色站一区二区三区| 欧美在线视频你懂得| 精品视频在线免费看| 欧美另类久久久品| 91精品国产麻豆国产自产在线 | 精品一区二区三区久久| 久久精品国产色蜜蜜麻豆| 国产在线视频精品一区| 成人免费视频网站在线观看| 成人动漫视频在线| 色婷婷av一区二区三区大白胸| 99久久精品国产麻豆演员表| 91福利在线免费观看| 日韩精品一区二区三区在线观看 | 一区二区久久久久久| 天天综合天天综合色| 久久99国产精品久久99果冻传媒| 国内一区二区在线| 99这里只有精品| 欧美一区永久视频免费观看| 欧美成人激情免费网| 18欧美乱大交hd1984| 视频在线观看一区二区三区| 激情欧美一区二区三区在线观看| www.爱久久.com| 欧美一级生活片| 国产精品色在线观看| 亚洲图片欧美视频| 国产毛片精品视频| 欧美日韩视频在线观看一区二区三区| 日韩欧美的一区| 日韩美女精品在线| 久久疯狂做爰流白浆xx| 欧美影院精品一区|