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

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

?? flex.texi

?? 編譯原理(Flex):生成詞法和語法分析程序的源代碼的程序。
?? TEXI
?? 第 1 頁 / 共 5 頁
字號:
\input texinfo
@c %**start of header
@setfilename flex.info
@settitle Flex - a scanner generator
@c @finalout
@c @setchapternewpage odd
@c %**end of header

@set EDITION 2.5
@set UPDATED March 1995
@set VERSION 2.5

@c FIXME - Reread a printed copy with a red pen and patience.
@c FIXME - Modify all "See ..." references and replace with @xref's.

@ifinfo
@format
START-INFO-DIR-ENTRY
* Flex: (flex).         A fast scanner generator.
END-INFO-DIR-ENTRY
@end format
@end ifinfo

@c Define new indices for commands, filenames, and options.
@c @defcodeindex cm
@c @defcodeindex fl
@c @defcodeindex op

@c Put everything in one index (arbitrarily chosen to be the concept index).
@c @syncodeindex cm cp
@c @syncodeindex fl cp
@syncodeindex fn cp
@syncodeindex ky cp
@c @syncodeindex op cp
@syncodeindex pg cp
@syncodeindex vr cp

@ifinfo
This file documents Flex.

Copyright (c) 1990 The Regents of the University of California.
All rights reserved.

This code is derived from software contributed to Berkeley by
Vern Paxson.

The United States Government has rights in this work pursuant
to contract no. DE-AC03-76SF00098 between the United States
Department of Energy and the University of California.

Redistribution and use in source and binary forms are permitted
provided that: (1) source distributions retain this entire
copyright notice and comment, and (2) distributions including
binaries display the following acknowledgement:  ``This product
includes software developed by the University of California,
Berkeley and its contributors'' in the documentation or other
materials provided with the distribution and in all advertising
materials mentioning features or use of this software.  Neither the
name of the University nor the names of its contributors may be
used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.

@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).

@end ignore
@end ifinfo

@titlepage
@title Flex, version @value{VERSION}
@subtitle A fast scanner generator
@subtitle Edition @value{EDITION}, @value{UPDATED}
@author Vern Paxson

@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1990 The Regents of the University of California.
All rights reserved.

This code is derived from software contributed to Berkeley by
Vern Paxson.

The United States Government has rights in this work pursuant
to contract no. DE-AC03-76SF00098 between the United States
Department of Energy and the University of California.

Redistribution and use in source and binary forms are permitted
provided that: (1) source distributions retain this entire
copyright notice and comment, and (2) distributions including
binaries display the following acknowledgement:  ``This product
includes software developed by the University of California,
Berkeley and its contributors'' in the documentation or other
materials provided with the distribution and in all advertising
materials mentioning features or use of this software.  Neither the
name of the University nor the names of its contributors may be
used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
@end titlepage

@ifinfo

@node Top, Name, (dir), (dir)
@top flex

@cindex scanner generator

This manual documents @code{flex}.  It covers release @value{VERSION}.

@menu
* Name::                        Name
* Synopsis::                    Synopsis
* Overview::                    Overview
* Description::                 Description
* Examples::                    Some simple examples
* Format::                      Format of the input file
* Patterns::                    Patterns
* Matching::                    How the input is matched
* Actions::                     Actions
* Generated scanner::           The generated scanner
* Start conditions::            Start conditions
* Multiple buffers::            Multiple input buffers
* End-of-file rules::           End-of-file rules
* Miscellaneous::               Miscellaneous macros
* User variables::              Values available to the user
* YACC interface::              Interfacing with @code{yacc}
* Options::                     Options
* Performance::                 Performance considerations
* C++::                         Generating C++ scanners
* Incompatibilities::           Incompatibilities with @code{lex} and POSIX
* Diagnostics::                 Diagnostics
* Files::                       Files
* Deficiencies::                Deficiencies / Bugs
* See also::                    See also
* Author::                      Author
@c * Index::                       Index
@end menu

@end ifinfo

@node Name, Synopsis, Top, Top
@section Name

flex - fast lexical analyzer generator

@node Synopsis, Overview, Name, Top
@section Synopsis

@example
flex [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]
[--help --version] [@var{filename} @dots{}]
@end example

@node Overview, Description, Synopsis, Top
@section Overview

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

@table @asis
@item Description
a brief overview of the tool

@item Some Simple Examples

@item Format Of The Input File

@item Patterns
the extended regular expressions used by flex

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

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

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

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

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

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

@item Miscellaneous Macros
a summary of macros available to the actions

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

@item Interfacing With Yacc
connecting flex scanners together with yacc parsers

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

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

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

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

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

@item Files
files used by flex

@item Deficiencies / Bugs
known problems with flex

@item See Also
other documentation, related tools

@item Author
includes contact information
@end table

@node Description, Examples, Overview, Top
@section Description

@code{flex} is a tool for generating @dfn{scanners}: programs which
recognized lexical patterns in text.  @code{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 @dfn{rules}. @code{flex} generates as output a C
source file, @file{lex.yy.c}, which defines a routine @samp{yylex()}.
This file is compiled and linked with the @samp{-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.

@node Examples, Format, Description, Top
@section Some simple examples

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

@example
%%
username    printf( "%s", getlogin() );
@end example

By default, any text not matched by a @code{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 "username" expanded.  In this input, there is just one
rule.  "username" is the @var{pattern} and the "printf" is the
@var{action}.  The "%%" marks the beginning of the rules.

Here's another simple example:

@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 );
        @}
@end example

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 @samp{yylex()} and in the @samp{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:

@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 ) );
            @}

@{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();
    @}
@end example

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

The details of this example will be explained in the
following sections.

@node Format, Patterns, Examples, Top
@section Format of the input file

The @code{flex} input file consists of three sections, separated
by a line with just @samp{%%} in it:

@example
definitions
%%
rules
%%
user code
@end example

The @dfn{definitions} section contains declarations of simple
@dfn{name} definitions to simplify the scanner specification,
and declarations of @dfn{start conditions}, which are explained
in a later section.
Name definitions have the form:

@example
name definition

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品在线一区二区三区| 久久久精品2019中文字幕之3| 天天操天天干天天综合网| 国产精品久久久久久久久久久免费看| 欧美日韩一区二区三区免费看| 国产成人亚洲精品青草天美| 麻豆成人av在线| 久久国产麻豆精品| 日本不卡视频在线| 青青青伊人色综合久久| 婷婷开心激情综合| 一本到不卡精品视频在线观看| 欧美韩国日本一区| 国产欧美视频一区二区| 在线观看日韩电影| 6080亚洲精品一区二区| 亚洲.国产.中文慕字在线| 亚洲一区欧美一区| 777xxx欧美| 精品国产一区二区三区不卡| 精品处破学生在线二十三| 久久精品亚洲精品国产欧美 | 成人免费高清在线| 成人高清av在线| 91免费在线看| 欧美大黄免费观看| 亚洲精品视频自拍| 免费欧美日韩国产三级电影| 国产a精品视频| 成人免费va视频| 欧美亚洲尤物久久| 日韩欧美aaaaaa| 一区二区三区中文字幕在线观看| 免费不卡在线观看| 欧美性xxxxxx少妇| 久久综合成人精品亚洲另类欧美| 国产亚洲精品福利| 亚洲成人免费电影| 成人av电影在线播放| 欧美一区二区三区思思人| 一区二区三区在线看| 国产成人精品一区二区三区四区 | 欧美视频三区在线播放| 国产欧美日韩不卡免费| 日韩主播视频在线| 欧美色区777第一页| 国产精品视频线看| 国产剧情一区二区| 91麻豆精品国产| 一级中文字幕一区二区| 99久久久免费精品国产一区二区 | 欧美体内she精视频| 国产不卡高清在线观看视频| 不卡的电视剧免费网站有什么| 欧美日韩一级黄| 亚洲天堂成人网| 国产真实乱偷精品视频免| 成人毛片视频在线观看| 欧美tk—视频vk| 蜜桃av噜噜一区| 精品99999| 久久女同性恋中文字幕| 婷婷夜色潮精品综合在线| 99精品桃花视频在线观看| 国产精品萝li| 欧美中文字幕一区| 亚洲成人动漫一区| 欧美成人三级在线| 国产成人精品综合在线观看| |精品福利一区二区三区| 粉嫩13p一区二区三区| 成人一区二区视频| 亚洲欧美一区二区三区极速播放 | 亚洲精品视频免费看| 欧美美女喷水视频| av高清不卡在线| 亚洲成av人影院| 国产精品每日更新在线播放网址| 精品视频色一区| 丰满白嫩尤物一区二区| 国产午夜精品美女毛片视频| 欧美日韩三级在线| 国产精品一区二区三区四区| 国产精品视频观看| 色婷婷精品大视频在线蜜桃视频| 欧美国产日韩亚洲一区| 成人高清视频在线| 久久精品国产99国产| 亚洲综合视频在线| 日韩综合在线视频| 婷婷综合五月天| 免费一级片91| 国产福利91精品一区| 91久久精品网| 高清不卡一二三区| 麻豆中文一区二区| 亚洲女同ⅹxx女同tv| 日韩欧美成人一区| 91精品久久久久久蜜臀| 日韩一区二区免费视频| 欧美一区二区观看视频| 91精品国产综合久久香蕉的特点 | 日韩欧美国产一区二区在线播放| 91麻豆免费在线观看| 欧洲亚洲精品在线| 欧美日韩国产小视频| 欧美一区二区三区在线观看视频 | 91香蕉视频黄| 色狠狠一区二区| 日韩一级在线观看| 久久久影视传媒| 1000精品久久久久久久久| 欧美tk—视频vk| 国产亚洲人成网站| 日韩综合小视频| 成人精品视频.| 欧美疯狂性受xxxxx喷水图片| 日韩精品一区二区三区在线播放 | 国产一区二区电影| av一区二区三区黑人| 精品久久久三级丝袜| 洋洋av久久久久久久一区| 北条麻妃一区二区三区| 精品成人一区二区三区| 青青草成人在线观看| 色噜噜偷拍精品综合在线| 国产精品污www在线观看| 国产精品自拍一区| 日韩一区二区三区四区五区六区 | 成人免费高清视频在线观看| 欧美一级夜夜爽| 日韩在线一区二区| 欧美亚洲丝袜传媒另类| 激情文学综合插| 日韩欧美在线1卡| 激情欧美一区二区| 国产精品久久久久婷婷| 制服丝袜亚洲播放| 91黄视频在线观看| 亚洲午夜激情网页| 欧美日韩在线电影| 午夜欧美在线一二页| 91精品久久久久久久99蜜桃 | 精品国产91洋老外米糕| 欧美日韩国产天堂| 欧美三级中文字幕| 国产大片一区二区| 亚洲第一精品在线| 久久亚洲精品小早川怜子| 国产成人高清视频| 亚洲va欧美va天堂v国产综合| 国产亚洲欧美日韩日本| 国产成人福利片| 亚洲午夜电影在线| 久久久三级国产网站| 91一区一区三区| 久99久精品视频免费观看| 国产精品久久久久久久久免费丝袜 | 午夜婷婷国产麻豆精品| 精品捆绑美女sm三区| 欧美专区日韩专区| 成人免费毛片app| 久久99久久99| 亚洲成人免费看| 国产农村妇女精品| 欧美群妇大交群的观看方式| 国产盗摄女厕一区二区三区| 日产国产欧美视频一区精品| 中文字幕亚洲视频| 日本一区二区三区国色天香 | 樱花影视一区二区| 国产精品日产欧美久久久久| 欧美大胆人体bbbb| 3atv一区二区三区| 欧美日韩五月天| 欧美日韩一区二区不卡| 成人丝袜18视频在线观看| 国产成人av电影在线播放| 国产精品自拍毛片| 国产不卡在线一区| 国产成人av福利| 国产盗摄女厕一区二区三区| 成人黄页在线观看| 日日夜夜精品视频免费| 久久久不卡网国产精品二区| 欧美大片国产精品| 久久久不卡网国产精品一区| 国产欧美精品一区| ...xxx性欧美| 性做久久久久久久久| 日韩成人一级大片| 久久综合综合久久综合| 福利视频网站一区二区三区| 色综合中文字幕| 欧美乱妇15p| 日本一区免费视频| 亚洲电影一区二区| 国产夫妻精品视频| 色嗨嗨av一区二区三区| 4438亚洲最大|