flex
来源:互联网 发布:telnet端口23在哪 编辑:程序博客网 时间:2024/06/03 14:52
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.
- FLEX
- flex
- flex
- FLEX
- Flex
- Flex
- flex
- Flex
- Flex
- Flex
- Flex
- Flex
- Flex
- Flex
- flex
- Flex
- flex
- flex
- test
- DM9000驱动在MINI2440上的移植学习笔记
- HTTP协议详解
- 初次学C语言的小成果
- 字符数组存放测试
- flex
- leetcode Permutations
- MATLAB小贴士(2)
- LAV Filter 源代码分析 4: LAV Video (2)
- left/right join 与+使用通俗说明
- Dijkstra算法
- 用ajax技术实现 无刷新实现用户登录
- 34 个简单实用的 Ubuntu 快捷键
- 博客迁移GitHub