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

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

?? lex-docs.txt

?? 句法分析器。一般用文法(grammar)來(lái)刻畫(huà).常見(jiàn)的是短語(yǔ)結(jié)構(gòu)文法(chomsky hierarchy),其中最常用的是上下文無(wú)關(guān)文法(CFG)。
?? TXT
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
characters which are not both upper case letters, both lower case
letters, or both digits is implementation dependent and will get a
warning message.  (E.g., [0-z] in ASCII is many more characters
than it is in EBCDIC).  If it is desired to include the character
- in a character class, it should be first or last; thus
                                   [-+0-9]
matches all the digits and the two signs.

     In character classes, the ^ operator must appear as the first
character after the left bracket; it indicates that the resulting
string is to be complemented with respect to the computer
character set.  Thus
                                   [^abc]
matches all characters except a, b, or c, including all special or
control characters; or
                                  [^a-zA-Z]
is any character which is not a letter.  The \ character provides
the usual escapes within character class brackets.

     Arbitrary character.  To match almost any character, the
operator character
                                      .
is the class of all characters except newline.  Escaping into
octal is possible although non-portable:
                                 [\40-\176]
matches all printable characters in the ASCII character set, from
octal 40 (blank) to octal 176 (tilde).

     Optional expressions.  The operator ?  indicates an optional
element of an expression.  Thus
                                    ab?c
matches either ac or abc.

     Repeated expressions.  Repetitions of classes are indicated
by the operators * and +.
                                     a*
is any number of consecutive a characters, including zero; while
                                     a+
is one or more instances of a.  For example,
                                   [a-z]+
is all strings of lower case letters.  And
                            [A-Za-z][A-Za-z0-9]*
indicates all alphanumeric strings with a leading alphabetic
character.  This is a typical expression for recognizing
identifiers in computer languages.

     Alternation and Grouping.  The operator | indicates
alternation:
                                   (ab|cd)
matches either ab or cd.  Note that parentheses are used for
grouping, although they are not necessary on the outside level;
                                    ab|cd
would have sufficed.  Parentheses can be used for more complex
expressions:
                               (ab|cd+)?(ef)*
matches such strings as abefef, efefef, cdef, or cddd; but not
abc, abcd, or abcdef.

     Context sensitivity.  Lex will recognize a small amount of
surrounding context.  The two simplest operators for this are ^
and $.  If the first character of an expression is ^, the
expression will only be matched at the beginning of a line (after
a newline character, or at the beginning of the input stream).
This can never conflict with the other meaning of ^, comple-
mentation of character classes, since that only applies within the
[] operators.  If the very last character is $, the expression
will only be matched at the end of a line (when immediately
followed by newline).  The latter operator is a special case of
the / operator character, which indicates trailing context.  The
expression
                                    ab/cd
matches the string ab, but only if followed by cd.  Thus
                                     ab$
is the same as
                                    ab/\n
Left context is handled in Lex by start conditions as explained in
section 10.  If a rule is only to be executed when the Lex
automaton interpreter is in start condition x, the rule should be
prefixed by
                                     <x>
using the angle bracket operator characters.  If we considered
``being at the beginning of a line'' to be start condition ONE,
then the ^ operator would be equivalent to
                                    <ONE>
Start conditions are explained more fully later.

     Repetitions and Definitions.  The operators {} specify either
repetitions (if they enclose numbers) or definition expansion
(if they enclose a name).  For example
                                   {digit}
looks for a predefined string named digit and inserts it at that
point in the expression.  The definitions are given in the first
part of the Lex input, before the rules.  In contrast,
                                   a{1,5}
looks for 1 to 5 occurrences of a.

     Finally, initial % is special, being the separator for Lex
source segments.

4.  Lex Actions.

     When an expression written as above is matched, Lex executes
the corresponding action.  This section describes some features of
Lex which aid in writing actions.  Note that there is a default
action, which consists of copying the input to the output.  This
is performed on all strings not otherwise matched.  Thus the Lex
user who wishes to absorb the entire input, without producing any
output, must provide rules to match everything.  When Lex is being
used with Yacc, this is the normal situation.  One may consider
that actions are what is done instead of copying the input to the
output; thus, in general, a rule which merely copies can be
omitted.  Also, a character combination which is omitted from
the rules and which appears as input is likely to be printed on
the output, thus calling attention to the gap in the rules.

     One of the simplest things that can be done is to ignore the
input.  Specifying a C null statement, ; as an action causes this
result.  A frequent rule is
                                 [ \t\n]   ;
which causes the three spacing characters (blank, tab, and
newline) to be ignored.

     Another easy way to avoid writing actions is the action
character |, which indicates that the action for this rule is the
action for the next rule.  The previous example could also have
been written
                                   " "
                                   "\t"
                                   "\n"
with the same result, although in different style.  The quotes
around \n and \t are not required.

     In more complex actions, the user will often want to know the
actual text that matched some expression like [a-z]+.  Lex leaves
this text in an external character array named yytext.  Thus, to
print the name found, a rule like
                       [a-z]+   printf("%s", yytext);
will print the string in yytext.  The C function printf accepts a
format argument and data to be printed; in this case, the format
is ``print string'' (% indicating data conversion, and s
indicating string type), and the data are the characters in
yytext.  So this just places the matched string on the output.
This action is so common that it may be written as ECHO:
                               [a-z]+   ECHO;
is the same as the above.  Since the default action is just to
print the characters found, one might ask why give a rule, like
this one, which merely specifies the default action?  Such rules
are often required to avoid matching some other rule which is
not desired.  For example, if there is a rule which matches read
it will normally match the instances of read contained in bread or
readjust; to avoid this, a rule of the form [a-z]+ is needed.
This is explained further below.

     Sometimes it is more convenient to know the end of what has
been found; hence Lex also provides a count yyleng of the number
of characters matched.  To count both the number of words and the
number of characters in words in the input, the user might write
                   [a-zA-Z]+   {words++; chars += yyleng;}
which accumulates in chars the number of characters in the words
recognized.  The last character in the string matched can be
accessed by
                              yytext[yyleng-1]

     Occasionally, a Lex action may decide that a rule has not
recognized the correct span of characters.  Two routines are
provided to aid with this situation.  First, yymore() can be
called to indicate that the next input expression recognized is to
be tacked on to the end of this input.  Normally, the next input
string would overwrite the current entry in yytext.  Second,
yyless (n) may be called to indicate that not all the characters
matched by the currently successful expression are wanted right
now.  The argument n indicates the number of characters in yytext
to be retained.  Further characters previously matched are
returned to the input.  This provides the same sort of lookahead
offered by the / operator, but in a different form.

    Example: Consider a language which defines a string as a set
of characters between quotation (") marks, and provides that to
include a " in a string it must be preceded by a \.  The regular
expression which matches that is somewhat confusing, so that it
might be preferable to write
                  \"[^"]*   {
                            if (yytext[yyleng-1] == '\\')
                                 yymore();
                            else
                                 ... normal user processing
                            }
which will, when faced with a string such as "abc\"def" first
match the five characters "abc\; then the call to yymore() will
cause the next part of the string, "def, to be tacked on the end.
Note that the final quote terminating the string should be picked
up in the code labeled ``normal processing''.

     The function yyless() might be used to reprocess text in
various circumstances.  Consider the C problem of distinguishing
the ambiguity of ``=-a''.  Suppose it is desired to treat this as
``=- a'' but print a message.  A rule might be
                 =-[a-zA-Z]   {
                              printf("Op (=-) ambiguous\n");
                              yyless(yyleng-1);
                              ... action for =- ...
                              }
which prints a message, returns the letter after the operator to
the input stream, and treats the operator as ``=-''.
Alternatively it might be desired to treat this as ``= -a''.  To
do this, just return the minus sign as well as the letter to the
input:
                 =-[a-zA-Z]   {
                              printf("Op (=-) ambiguous\n");
                              yyless(yyleng-2);
                              ... action for = ...
                              }
will perform the other interpretation.  Note that the expressions
for the two cases might more easily be written
                               =-/[A-Za-z]
in the first case and
                                 =/-[A-Za-z]
in the second; no backup would be required in the rule action.  It
is not necessary to recognize the whole identifier to observe the
ambiguity.  The possibility of ``=-3'', however, makes
                                 =-/[^ \t\n]
a still better rule.

     In addition to these routines, Lex also permits access to the
I/O routines it uses.  They are:

1)   input() which returns the next input character;

2)   output(c) which writes the character c on the output; and

3) unput(c) pushes the character c back onto the input stream to
   be read later by input().

By default these routines are provided as macro definitions, but
the user can override them and supply private versions.  These
routines define the relationship between external files and
internal characters, and must all be retained or modified
consistently.  They may be redefined, to cause input or output to
be transmitted to or from strange places, including other programs
or internal memory; but the character set used must be consistent
in all routines; a value of zero returned by input must mean end
of file; and the relationship between unput and input must be
retained or the Lex lookahead will not work.  Lex does not look
ahead at all if it does not have to, but every rule ending in + *
?  or $ or containing / implies lookahead.  Lookahead is also
necessary to match an expression that is a prefix of another
expression.  See below for a discussion of the character set used
by Lex.  The standard Lex library imposes a 100 character limit on
backup.

     Another Lex library routine that the user will sometimes want
to redefine is yywrap() which is called whenever Lex reaches an
end-of-file.  If yywrap returns a 1, Lex continues with the normal
wrapup on end of input.  Sometimes, however, it is convenient to
arrange for more input to arrive from a new source.  In this case,
the user should provide a yywrap which arranges for new input and
returns 0.  This instructs Lex to continue processing.  The
default yywrap always returns 1.

     This routine is also a convenient place to print tables,
summaries, etc.  at the end of a program.  Note that it is not
possible to write a normal rule which recognizes end-of-file; the
only access to this condition is through yywrap.  In fact, unless
a private version of input() is supplied a file containing nulls
cannot be handled, since a value of 0 returned by input is taken
to be end-of-file.


5.  Ambiguous Source Rules.

     Lex can handle ambiguous specifications.  When more than one
expression can match the current input, Lex chooses as follows:

1)   The longest match is preferred.

2)   Among rules which matched the same number of characters, the
     rule given first is preferred.

Thus, suppose the rules
                      integer   keyword action ...;
                      [a-z]+    identifier action ...;
to be given in that order.  If the input is integers, it is taken
as an identifier, because [a-z]+ matches 8 characters while
integer matches only 7.  If the input is integer, both rules match
7 characters, and the keyword rule is selected because it was
given first.  Anything shorter (e.g. int) will not match the
expression integer and so the identifier interpretation is used.

     The principle of preferring the longest match makes rules
containing expressions like .* dangerous.  For example,
                                    '.*'

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产综合在线| 亚洲色图在线播放| 国产午夜亚洲精品午夜鲁丝片 | eeuss鲁片一区二区三区在线看| 色偷偷一区二区三区| 国产性做久久久久久| 免费欧美在线视频| 欧美日韩你懂的| 成人欧美一区二区三区1314| 国产精品综合在线视频| 日韩精品中午字幕| 丝袜美腿亚洲一区二区图片| 色综合天天在线| 亚洲国产精品成人久久综合一区| 三级欧美在线一区| 一本到三区不卡视频| 国产精品久久久久久久浪潮网站| 精品午夜久久福利影院| 91精品久久久久久久久99蜜臂| 麻豆精品久久久| 欧美午夜一区二区| 亚洲免费在线观看视频| 成人午夜电影小说| 日本一区免费视频| 成人中文字幕在线| 国产视频一区二区三区在线观看| 国内国产精品久久| 欧美成人一区二区三区| 久久精品国产精品亚洲综合| 欧美一区在线视频| 美日韩一级片在线观看| 欧美成人高清电影在线| 另类的小说在线视频另类成人小视频在线 | 视频在线观看91| 欧美喷潮久久久xxxxx| 天天av天天翘天天综合网| 欧美日韩五月天| 日韩高清一区二区| 欧美一区二区三区的| 国内欧美视频一区二区| 久久久噜噜噜久久人人看| 国产夫妻精品视频| 亚洲婷婷国产精品电影人久久| 99久久国产综合精品色伊| 一区二区三区在线视频观看| 欧美性猛交xxxxxxxx| 日韩国产在线观看一区| 欧美成人激情免费网| 成人高清av在线| 亚洲一区在线电影| 日韩欧美国产不卡| 成人午夜免费视频| 亚洲成人自拍一区| 精品国产精品网麻豆系列| 国产老女人精品毛片久久| 国产精品黄色在线观看| 欧美在线观看一区| 免费国产亚洲视频| 国产精品视频免费| 欧美日韩国产首页在线观看| 激情丁香综合五月| 一区二区欧美国产| 欧美tk丨vk视频| 91网址在线看| 激情小说欧美图片| 亚洲精品一二三四区| 日韩欧美成人激情| 欧美一区二区三区四区在线观看| 极品尤物av久久免费看| 亚洲欧美综合色| 欧美成人在线直播| 色综合久久久久综合体 | 亚洲午夜国产一区99re久久| 日韩区在线观看| 成人av片在线观看| 免费视频最近日韩| 一区二区三区四区激情| 久久综合色天天久久综合图片| 91麻豆蜜桃一区二区三区| 激情六月婷婷综合| 午夜精品一区二区三区电影天堂 | 国产亚洲短视频| 欧美狂野另类xxxxoooo| 99国产精品久久久久久久久久久| 青青草97国产精品免费观看| 亚洲色图丝袜美腿| 中文字幕免费一区| 精品粉嫩超白一线天av| 欧美日韩在线播放三区四区| 成人黄色网址在线观看| 国产一区二区影院| 日本亚洲电影天堂| 亚洲国产精品久久不卡毛片| 国产精品日日摸夜夜摸av| 久久女同性恋中文字幕| 欧美成人一区二区三区片免费| 欧美美女直播网站| 欧美在线播放高清精品| 91论坛在线播放| 91美女视频网站| 99久久婷婷国产| 不卡欧美aaaaa| 国产91清纯白嫩初高中在线观看| 日韩二区三区四区| 日韩激情一区二区| 人人精品人人爱| 蜜臀久久99精品久久久画质超高清 | 国产在线观看一区二区| 久久99日本精品| 久久99热这里只有精品| 久久99蜜桃精品| 欧美性高清videossexo| 在线视频一区二区免费| 在线观看一区二区精品视频| 色综合久久久久综合体桃花网| 91小视频在线| 色噜噜狠狠成人中文综合| 色成年激情久久综合| 欧美三片在线视频观看| 欧美美女一区二区在线观看| 欧美一区二区三区四区在线观看 | 中文字幕精品—区二区四季| 久久久影视传媒| 国产精品三级电影| 亚洲男人的天堂在线观看| 亚洲一二三专区| 免费黄网站欧美| 国产99久久久精品| 成人国产精品视频| 欧美自拍偷拍午夜视频| 欧美性感一区二区三区| 欧美电影免费观看高清完整版在线| 制服丝袜av成人在线看| 久久无码av三级| 亚洲男帅同性gay1069| 日韩在线a电影| 国产成人亚洲精品狼色在线| 99视频精品免费视频| 精品视频999| 337p日本欧洲亚洲大胆精品 | 在线观看视频一区二区欧美日韩| 欧美日韩在线播放三区| 26uuu精品一区二区三区四区在线| 久久精品欧美日韩| 国产精品动漫网站| 视频在线观看一区二区三区| 国产激情视频一区二区在线观看| 91在线播放网址| 欧美电视剧在线观看完整版| 国产精品乱人伦一区二区| 亚洲国产精品一区二区尤物区| 国产在线播放一区三区四| 日本韩国一区二区三区| 欧美一区二区在线免费播放| 国产精品国产三级国产普通话蜜臀 | 日韩美女视频在线| 亚洲人成精品久久久久| 老司机午夜精品99久久| 91麻豆成人久久精品二区三区| 欧美一级午夜免费电影| 亚洲激情中文1区| 国产精品一区二区你懂的| 欧美乱妇23p| 亚洲免费观看高清完整版在线观看 | 日本强好片久久久久久aaa| 国产制服丝袜一区| 欧美日韩久久不卡| 国产精品国产自产拍高清av王其| 乱中年女人伦av一区二区| 91蜜桃在线观看| 欧美国产激情一区二区三区蜜月 | 日韩女同互慰一区二区| 亚洲男人的天堂在线观看| 国产精品一二三| 日韩精品中文字幕在线不卡尤物 | 99久久精品99国产精品| 久久免费午夜影院| 日本亚洲电影天堂| 欧美精品日日鲁夜夜添| 亚洲欧美偷拍三级| 99久久精品国产一区| 久久视频一区二区| 狠狠v欧美v日韩v亚洲ⅴ| 91精品国产手机| 天堂一区二区在线| 欧美在线观看视频一区二区三区| 1000部国产精品成人观看| 国产成人高清在线| 久久久久久免费网| 韩国视频一区二区| 欧美刺激脚交jootjob| 奇米色777欧美一区二区| 91麻豆精品国产自产在线| 亚洲午夜影视影院在线观看| 欧美日韩一区二区欧美激情| 亚洲成人精品一区二区| 欧美日本韩国一区| 日产国产高清一区二区三区| 日韩欧美一二三| 国产一区二区在线观看免费|