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

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

?? 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡的电影网站| 欧美专区亚洲专区| 亚洲最新视频在线观看| 7777精品伊人久久久大香线蕉超级流畅 | 国产呦萝稀缺另类资源| 亚洲精品中文在线观看| 日韩欧美一区二区久久婷婷| 色老头久久综合| 国产很黄免费观看久久| 日韩福利视频网| 亚洲精品美腿丝袜| 欧美激情中文不卡| 精品国产一区二区精华| 欧美日韩亚洲高清一区二区| 97se亚洲国产综合自在线| 国产麻豆一精品一av一免费 | 亚洲第一在线综合网站| 中文字幕不卡的av| 亚洲精品在线三区| 日韩一区二区三区电影在线观看 | 精品免费国产一区二区三区四区| 色吊一区二区三区| 成人福利视频网站| 久久99国产精品麻豆| 丝袜美腿一区二区三区| 亚洲自拍偷拍网站| 亚洲精品欧美综合四区| 中文字幕一区日韩精品欧美| 久久久亚洲高清| 欧美一区二区三区视频| 欧美性受xxxx黑人xyx性爽| eeuss鲁片一区二区三区 | 久久99精品国产麻豆婷婷洗澡| 亚洲图片自拍偷拍| 亚洲综合久久久久| 一区二区三区国产豹纹内裤在线| 国产精品沙发午睡系列990531| 久久综合色8888| 久久久综合网站| 久久婷婷久久一区二区三区| 2024国产精品| 久久久久久久免费视频了| 久久女同精品一区二区| 2020国产成人综合网| 久久久久9999亚洲精品| 久久精品一区二区三区不卡牛牛| 精品99999| 国产亚洲污的网站| 久久综合久久综合久久综合| 国产丝袜美腿一区二区三区| 亚洲国产精品成人久久综合一区 | 国产清纯白嫩初高生在线观看91 | 中文字幕高清不卡| 中文字幕日韩欧美一区二区三区| 国产精品成人在线观看| 亚洲美女一区二区三区| 亚洲激情一二三区| 亚洲va欧美va人人爽午夜| 日韩av一区二| 久久er99精品| 成人综合激情网| 91免费在线看| 欧美日本高清视频在线观看| 精品入口麻豆88视频| 久久久精品国产免大香伊| 中文字幕中文字幕中文字幕亚洲无线| 国产精品视频一二三区| 中文字幕亚洲电影| 午夜精品久久久久久久99水蜜桃| 欧美aaaaa成人免费观看视频| 国产伦精品一区二区三区在线观看| 国产成人av影院| 91蜜桃视频在线| 欧美一区日本一区韩国一区| 久久久www免费人成精品| 中文字幕一区视频| 午夜成人在线视频| 国产在线不卡一卡二卡三卡四卡| 不卡视频一二三| 欧美年轻男男videosbes| 久久久久久综合| 亚洲国产日韩在线一区模特| 精品亚洲aⅴ乱码一区二区三区| 懂色av一区二区夜夜嗨| 欧美军同video69gay| 久久品道一品道久久精品| 亚洲精品中文在线观看| 精品无人区卡一卡二卡三乱码免费卡 | 三级欧美韩日大片在线看| 国产二区国产一区在线观看| 欧美探花视频资源| 久久久美女毛片| 午夜成人在线视频| 成人免费视频播放| 欧美一级二级三级乱码| 亚洲少妇30p| 精品一区二区综合| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 日韩一区二区免费在线观看| 亚洲图片你懂的| 国产精品综合网| 欧美一卡二卡三卡| 伊人婷婷欧美激情| 成人免费精品视频| 精品美女一区二区| 日本午夜精品一区二区三区电影| 99久久精品免费| 久久久亚洲高清| 蜜桃av噜噜一区| 欧美在线一区二区三区| 中文字幕欧美激情一区| 日韩国产欧美视频| 欧美天堂一区二区三区| 中文字幕制服丝袜成人av| 国产美女在线精品| 欧美成人性福生活免费看| 亚洲国产日韩a在线播放性色| av不卡在线播放| 国产精品视频一区二区三区不卡| 国产一区美女在线| 精品精品欲导航| 日韩国产精品久久久| 欧美日韩一区三区| 亚洲视频中文字幕| 不卡的av在线| 中文字幕+乱码+中文字幕一区| 国内精品视频一区二区三区八戒| 欧美剧情电影在线观看完整版免费励志电影 | 久久99国产精品免费| 欧美xxxxxxxxx| 捆绑调教美女网站视频一区| 欧美一区二区免费观在线| 亚洲国产精品久久久久秋霞影院| 欧洲av一区二区嗯嗯嗯啊| 亚洲免费电影在线| 欧洲国内综合视频| 亚洲不卡在线观看| 777xxx欧美| 久久99国产精品久久| 久久综合精品国产一区二区三区| 国产在线一区观看| 久久久av毛片精品| 丰满岳乱妇一区二区三区| 欧美激情一区二区| 不卡的电影网站| 亚洲色大成网站www久久九九| 91猫先生在线| 亚洲v精品v日韩v欧美v专区| 7777女厕盗摄久久久| 精品系列免费在线观看| 久久综合狠狠综合久久综合88| 国产成人免费av在线| 国产精品乱人伦一区二区| 91影院在线免费观看| 一区二区理论电影在线观看| 欧美无人高清视频在线观看| 午夜电影网一区| 久久综合成人精品亚洲另类欧美| 风间由美性色一区二区三区| 亚洲欧洲综合另类在线| 欧美男男青年gay1069videost | 99精品欧美一区二区蜜桃免费 | 国产精品自拍在线| 国产视频一区在线播放| 99re成人精品视频| 五月激情六月综合| 2022国产精品视频| 91蝌蚪porny| 日本色综合中文字幕| 国产日韩视频一区二区三区| 91网站在线观看视频| 亚洲成人动漫在线免费观看| 欧美一级黄色大片| 丰满白嫩尤物一区二区| 夜夜揉揉日日人人青青一国产精品 | 国产精品传媒入口麻豆| 欧美午夜精品久久久久久超碰| 另类调教123区| 亚洲日本免费电影| 日韩午夜激情视频| 91在线观看污| 久久国产精品99久久久久久老狼 | 亚洲成av人片一区二区梦乃| 精品国产免费人成电影在线观看四季| www.欧美亚洲| 另类综合日韩欧美亚洲| 亚洲欧美经典视频| 欧美成人一区二区三区在线观看| 91麻豆国产香蕉久久精品| 免费精品99久久国产综合精品| 国产精品国产三级国产aⅴ原创 | 884aa四虎影成人精品一区| 国产精品一级黄| 亚洲一区二区三区精品在线| 久久综合九色综合欧美就去吻| 欧美日韩亚洲另类| 9i在线看片成人免费| 精品一区二区在线视频| 五月激情综合婷婷| 亚洲免费在线视频|