flex

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.



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值