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

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

?? flex.man

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



FLEX(1)                  USER COMMANDS                    FLEX(1)



NAME
     flex - fast lexical analyzer generator

SYNOPSIS
     flex [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput  -Pprefix
     -Sskeleton] [--help --version] [filename ...]

OVERVIEW
     This manual describes flex, a tool for  generating  programs
     that  perform pattern-matching on text.  The manual includes
     both tutorial and reference sections:

         Description
             a brief overview of the tool

         Some Simple Examples

         Format Of The Input File

         Patterns
             the extended regular expressions used by flex

         How The Input Is Matched
             the rules for determining what has been matched

         Actions
             how to specify what to do when a pattern is matched

         The Generated Scanner
             details regarding the scanner that flex produces;
             how to control the input source

         Start Conditions
             introducing context into your scanners, and
             managing "mini-scanners"

         Multiple Input Buffers
             how to manipulate multiple input sources; how to
             scan from strings instead of files

         End-of-file Rules
             special rules for matching the end of the input

         Miscellaneous Macros
             a summary of macros available to the actions

         Values Available To The User
             a summary of values available to the actions

         Interfacing With Yacc
             connecting flex scanners together with yacc parsers




Version 2.5          Last change: April 1995                    1






FLEX(1)                  USER COMMANDS                    FLEX(1)



         Options
             flex command-line options, and the "%option"
             directive

         Performance Considerations
             how to make your scanner go as fast as possible

         Generating C++ Scanners
             the (experimental) facility for generating C++
             scanner classes

         Incompatibilities With Lex And POSIX
             how flex differs from AT&T lex and the POSIX lex
             standard

         Diagnostics
             those error messages produced by flex (or scanners
             it generates) whose meanings might not be apparent

         Files
             files used by flex

         Deficiencies / Bugs
             known problems with flex

         See Also
             other documentation, related tools

         Author
             includes contact information


DESCRIPTION
     flex is a  tool  for  generating  scanners:  programs  which
     recognized  lexical  patterns in text.  flex reads the given
     input files, or its standard input  if  no  file  names  are
     given,  for  a  description  of  a scanner to generate.  The
     description is in the form of pairs of  regular  expressions
     and  C  code,  called  rules.  flex  generates as output a C
     source file, lex.yy.c, which defines a routine yylex(). This
     file is compiled and linked with the -lfl library to produce
     an executable.  When the executable is run, it analyzes  its
     input  for occurrences of the regular expressions.  Whenever
     it finds one, it executes the corresponding C code.

SOME SIMPLE EXAMPLES
     First some simple examples to get the flavor of how one uses
     flex.  The  following  flex  input specifies a scanner which
     whenever it encounters the string "username" will replace it
     with the user's login name:

         %%



Version 2.5          Last change: April 1995                    2






FLEX(1)                  USER COMMANDS                    FLEX(1)



         username    printf( "%s", getlogin() );

     By default, any text not matched by a flex scanner is copied
     to  the output, so the net effect of this scanner is to copy
     its input file to its output with each occurrence of  "user-
     name"  expanded.   In  this  input,  there is just one rule.
     "username" is the pattern and the "printf"  is  the  action.
     The "%%" marks the beginning of the rules.

     Here's another simple example:

                 int num_lines = 0, num_chars = 0;

         %%
         \n      ++num_lines; ++num_chars;
         .       ++num_chars;

         %%
         main()
                 {
                 yylex();
                 printf( "# of lines = %d, # of chars = %d\n",
                         num_lines, num_chars );
                 }

     This scanner counts the number of characters and the  number
     of  lines in its input (it produces no output other than the
     final report on the counts).  The first  line  declares  two
     globals,  "num_lines"  and "num_chars", which are accessible
     both inside yylex() and in the main() routine declared after
     the  second  "%%".  There are two rules, one which matches a
     newline ("\n") and increments both the line  count  and  the
     character  count,  and one which matches any character other
     than a newline (indicated by the "." regular expression).

     A somewhat more complicated example:

         /* scanner for a toy Pascal-like language */

         %{
         /* need this for the call to atof() below */
         #include <math.h>
         %}

         DIGIT    [0-9]
         ID       [a-z][a-z0-9]*

         %%

         {DIGIT}+    {
                     printf( "An integer: %s (%d)\n", yytext,
                             atoi( yytext ) );



Version 2.5          Last change: April 1995                    3






FLEX(1)                  USER COMMANDS                    FLEX(1)



                     }

         {DIGIT}+"."{DIGIT}*        {
                     printf( "A float: %s (%g)\n", yytext,
                             atof( yytext ) );
                     }

         if|then|begin|end|procedure|function        {
                     printf( "A keyword: %s\n", yytext );
                     }

         {ID}        printf( "An identifier: %s\n", yytext );

         "+"|"-"|"*"|"/"   printf( "An operator: %s\n", yytext );

         "{"[^}\n]*"}"     /* eat up one-line comments */

         [ \t\n]+          /* eat up whitespace */

         .           printf( "Unrecognized character: %s\n", yytext );

         %%

         main( argc, argv )
         int argc;
         char **argv;
             {
             ++argv, --argc;  /* skip over program name */
             if ( argc > 0 )
                     yyin = fopen( argv[0], "r" );
             else
                     yyin = stdin;

             yylex();
             }

     This is the beginnings of a simple scanner  for  a  language
     like  Pascal.   It  identifies different types of tokens and
     reports on what it has seen.

     The details of this example will be explained in the follow-
     ing sections.

FORMAT OF THE INPUT FILE
     The flex input file consists of three sections, separated by
     a line with just %% in it:

         definitions
         %%
         rules
         %%
         user code



Version 2.5          Last change: April 1995                    4






FLEX(1)                  USER COMMANDS                    FLEX(1)



     The definitions section contains declarations of simple name
     definitions  to  simplify  the  scanner  specification,  and
     declarations of start conditions, which are explained  in  a
     later section.

     Name definitions have the form:

         name definition

     The "name" is a word beginning with a letter  or  an  under-
     score  ('_')  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 con-
     tinuing to the end of the line.  The definition  can  subse-
     quently  be referred to using "{name}", which will expand to
     "(definition)".  For example,

         DIGIT    [0-9]
         ID       [a-z][a-z0-9]*

     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

         {DIGIT}+"."{DIGIT}*

     is identical to

         ([0-9])+"."([0-9])*

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

     The rules section of the flex input  contains  a  series  of
     rules of the form:

         pattern   action

     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  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 %% in the input file
     may be skipped, too.

     In the definitions and rules sections, any indented text  or
     text  enclosed in %{ and %} is copied verbatim to the output



Version 2.5          Last change: April 1995                    5






FLEX(1)                  USER COMMANDS                    FLEX(1)



     (with the %{}'s removed).  The %{}'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  declara-
     tions)  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 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 "*/".

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

         x          match the character 'x'
         .          any character (byte) except newline
         [xyz]      a "character class"; in this case, the pattern
                      matches either an 'x', a 'y', or a 'z'
         [abj-oZ]   a "character class" with a range in it; matches
                      an 'a', a 'b', any letter from 'j' through 'o',
                      or a 'Z'
         [^A-Z]     a "negated character class", i.e., any character
                      but those in the class.  In this case, any
                      character EXCEPT an uppercase letter.
         [^A-Z\n]   any character EXCEPT an uppercase letter or
                      a newline
         r*         zero or more r's, where r is any regular expression
         r+         one or more r's
         r?         zero or one r's (that is, "an optional r")
         r{2,5}     anywhere from two to five r's
         r{2,}      two or more r's
         r{4}       exactly 4 r's
         {name}     the expansion of the "name" definition
                    (see above)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩亚洲欧美高清| 91看片淫黄大片一级在线观看| 欧美日韩三级视频| 亚洲午夜av在线| 色香蕉久久蜜桃| 亚洲va天堂va国产va久| 这里只有精品视频在线观看| 欧美aaa在线| 欧美精品一区二区三区蜜臀| 国产成人鲁色资源国产91色综| 国产亚洲视频系列| 99re这里都是精品| 五月婷婷色综合| 精品国产99国产精品| 成人高清免费观看| 亚洲一区二区在线免费观看视频| 欧美专区日韩专区| 久久精品国产一区二区三区免费看 | 日韩一卡二卡三卡| 国产一区二区三区av电影| 《视频一区视频二区| 欧美精品1区2区| 国产成人精品网址| 夜色激情一区二区| www激情久久| 欧美性极品少妇| 久久av老司机精品网站导航| 国产精品免费免费| 欧美福利视频一区| 成人av网站在线观看| 天天av天天翘天天综合网| 久久欧美一区二区| 在线一区二区三区做爰视频网站| 麻豆高清免费国产一区| 亚洲男人天堂一区| 精品国产91乱码一区二区三区 | av动漫一区二区| 天堂久久一区二区三区| 国产日韩精品一区| 欧美精品久久一区| 成人理论电影网| 老司机免费视频一区二区| 亚洲欧洲制服丝袜| 久久综合九色综合欧美98| 欧美亚洲动漫精品| a亚洲天堂av| 美女网站一区二区| 一区二区三区精品在线观看| 国产欧美在线观看一区| 日韩欧美中文字幕公布| 欧美无砖砖区免费| 不卡视频在线看| 国产做a爰片久久毛片| 亚洲超碰精品一区二区| 国产欧美日韩在线看| 亚洲欧美激情在线| 欧美一区国产二区| 欧美日韩一区高清| 91亚洲精品一区二区乱码| 国产一区二区电影| 欧美96一区二区免费视频| 一区二区成人在线| 成人欧美一区二区三区小说| 久久一区二区视频| 欧美va天堂va视频va在线| 欧美浪妇xxxx高跟鞋交| 欧美优质美女网站| 在线看国产一区二区| 波波电影院一区二区三区| 国产成人精品aa毛片| 久久av资源网| 国产在线麻豆精品观看| 久久精品国产久精国产| 麻豆精品视频在线观看| 久久机这里只有精品| 毛片av一区二区| 免费在线观看日韩欧美| 蜜臀91精品一区二区三区| 日韩影院在线观看| 免费高清视频精品| 另类小说综合欧美亚洲| 久久99日本精品| 精东粉嫩av免费一区二区三区| 蜜桃久久久久久久| 极品少妇xxxx精品少妇偷拍| 麻豆精品在线视频| 国产专区综合网| 国产一区欧美日韩| 成人一区在线观看| 色综合天天综合在线视频| 波多野结衣在线一区| 成人动漫精品一区二区| 91尤物视频在线观看| 成人国产精品免费网站| 91在线免费看| 欧美日韩不卡在线| 精品国产一二三| 中文文精品字幕一区二区| 亚洲人成精品久久久久| 亚洲二区在线视频| 久久av老司机精品网站导航| 国产suv精品一区二区三区| 97久久精品人人澡人人爽| 欧美亚洲国产bt| 久久综合一区二区| 欧美国产成人精品| 亚洲一区二区中文在线| 美国三级日本三级久久99 | 欧美系列日韩一区| 日韩区在线观看| 国产精品美女一区二区三区| 亚洲欧美怡红院| 日韩中文字幕一区二区三区| 紧缚捆绑精品一区二区| 97se亚洲国产综合自在线不卡| 精品视频在线看| 久久精品视频在线看| 亚洲三级视频在线观看| 日韩精品乱码免费| 成人av在线观| 日韩视频一区二区在线观看| 制服.丝袜.亚洲.中文.综合| 色天使久久综合网天天| 欧美大片在线观看一区二区| 亚洲欧洲精品天堂一级 | 色综合久久天天| 日韩欧美国产一区二区在线播放| 国产精品素人一区二区| 日本vs亚洲vs韩国一区三区| caoporm超碰国产精品| 精品久久人人做人人爱| 亚洲一卡二卡三卡四卡无卡久久| 国产一区二区伦理片| 欧美主播一区二区三区| 久久蜜桃av一区二区天堂| 亚洲一区二区av在线| 成人午夜碰碰视频| 欧美一区二区视频免费观看| 自拍偷拍国产精品| 国产精品1024| 欧美成人乱码一区二区三区| 亚洲一区二区美女| 99r国产精品| 欧美高清在线视频| 国模娜娜一区二区三区| 91麻豆精品国产91久久久 | 国产91精品久久久久久久网曝门| 在线播放视频一区| 亚洲一二三级电影| 99精品视频中文字幕| 久久久国产精华| 狠狠狠色丁香婷婷综合激情| 911精品国产一区二区在线| 亚洲女人小视频在线观看| 成人黄色电影在线| 中文字幕免费在线观看视频一区| 久久99精品国产91久久来源| 欧美日韩国产大片| 亚洲最大的成人av| 色综合色狠狠天天综合色| 中文字幕av一区二区三区高| 国产精品白丝jk黑袜喷水| 精品少妇一区二区三区日产乱码 | 国产亚洲欧洲997久久综合| 久久99精品国产.久久久久| 日韩精品一区二区三区视频播放| 日本亚洲欧美天堂免费| 欧美日韩日本视频| 丝袜美腿亚洲一区| 欧美一区二区三区系列电影| 视频一区二区国产| 日韩视频一区二区三区在线播放| 免费av成人在线| 日韩欧美视频一区| 国产一区二区三区四区五区入口 | 欧美bbbbb| 337p粉嫩大胆色噜噜噜噜亚洲| 激情亚洲综合在线| 久久久亚洲精品石原莉奈| 国产成人在线视频免费播放| 亚洲精品一区二区三区蜜桃下载| 久久99在线观看| 91丨porny丨国产| 日韩亚洲欧美在线观看| 精品一区二区三区免费毛片爱| 精品久久久三级丝袜| 国产精品乡下勾搭老头1| 欧美精选午夜久久久乱码6080| 青青草原综合久久大伊人精品优势| 宅男在线国产精品| 九一九一国产精品| 国产三级欧美三级日产三级99| 国产超碰在线一区| 国产精品视频看| 91网站视频在线观看| 国产精品毛片久久久久久久| 欧美影院午夜播放| 蜜桃91丨九色丨蝌蚪91桃色| 国产亚洲一区二区三区四区 | 亚洲蜜臀av乱码久久精品 |