加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex

发布时间:2020-12-15 04:03:29 所属栏目:百科 来源:网络整理
导读:linux下的flex全称叫做 快速词汇分析程序生成器 (很可惜,百度上费尽周折没有搜到想要的关于Flex的有用信息,不过搜Lex还是有点结果的,一下信息搜自google) http://flex.sourceforge.net/ Flex Flex (The Fast Lexical Analyzer) Flex is a fast lexical

linux下的flex全称叫做  快速词汇分析程序生成器
(很可惜,百度上费尽周折没有搜到想要的关于Flex的有用信息,不过搜Lex还是有点结果的,一下信息搜自google)
 
http://flex.sourceforge.net/

Flex

Flex (The Fast Lexical Analyzer)

Flex is a fast lexical analyser generator. It is a tool for generating programs that perform pattern-matching on text. Flex is a free (but non-GNU) implementation of the original Unix?lex?program. To download the software,get the documentation,and more,please see the?Flex home page.

Overview of Flex

Flex is a tool for generating scanners. A scanner,sometimes called a tokenizer,is a program which recognizes lexical patterns in text. The flex program reads user-specified 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 a C source file named,"lex.yy.c",which defines the function yylex(). The file "lex.yy.c" can be compiled and linked to produce an executable. When the executable is run,it analyzes its input for occurrences of text matching the regular expressions for each rule. Whenever it finds a match,it executes the corresponding C code.

(Flex是有详细的manual文档的,尽情的搜吧)

1

linux ubuntu 12.04 安装flex

sudo apt-get install flex

2

Terminal解释

wayne@ubuntu:~/Downloads/lxr-1.2.0$ flex --help Usage: flex [OPTIONS] [FILE]... Generates programs that perform pattern-matching on text.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读