Lex: a lexical analyzer generator.
Lex:一个词汇分析器生成器。
Lex is a lexical analysis tool that can be used to identify specific text strings in a structured way from source text.
Lex是一种词法分析工具,它可以用来从源文本识别特定结构的文本字符串。
Product liability is a special liability for tort, which applies for "lex loci delicti as lex sausae" principle in private international law.
产品责任作为一种特殊的侵权责任,在传统上适用“侵权行为地法作为准据法”这一国际私法原则。
A more powerful tool is exclusive states, in which only rules matching the exclusive state can be matched (this is not supported in all versions of lex, but should be available in anything modern).
更强大的工具是排他(exclusive)声明,在这个工具中,只有符合排他声明的规则才能被匹配(并不是所有的lex版本都支持这项功能,不过所有最新版本中都应该可以获得该功能)。
game-writing saga shows how the authors put together a configuration file parser for the game using lex and yacc.
游戏编写报告的SDL 用法,第 4 部分:lex和yacc 构建用于脚本和 GUI 设计的语法分析器 (developerWorks,2000 年 5 月)展示了作者如何使用 lex 和 yacc 为 游戏整合出一个配置文件解析器。
This stranger spoke no English but gave Lex a business card that identified him as a Kung Fu instructor.
这个陌生人不会讲英语,但给了莱克斯一张名片,据名片上写着他是一名功夫教练。
(Fig. B): The more particles we squeeze into the container, the testier they will become, especially if the container happens to be a rush-hour downtown local at 86th and Lex.
(图B):如果我们把更多的粒子挤入容器中,它们将变得易爆。假如这个容器正好是高峰期在86街和莱克星顿大道路口开往下城的地铁慢车车厢,情况就更是如此。
In this tutorial, you'll examine how to use lex and yacc, first to build a calculator.
在本教程中,首先您将研究如何使用lex和yacc来构建一个计算器。
Conveniently, this has been corrected: modern versions of both lex and yacc allow you to specify a prefix to use on the names of symbols in generated code.
这一点已经得到了修正,而且更加便利:lex和yacc的最新版本都允许您在生成代码的符号名称上指定一个前缀。
By using the lex and yacc tools, you can build a parsing engine that processes text according to specific rules.
通过使用lex和yacc工具,您可以构建一个分析引擎,根据特定的规则来处理文本。
A common problem is having a rule match too much text; worse, since lex prefers the longest match it can find, this can result in a totally inappropriate rule being matched.
常见的问题是,一个规则匹配太多的文本;更糟糕的是,由于lex倾向于匹配它能找到的最长的文本,这可能导致匹配的是一个完全不适当的规则。
The GNU versions of lex and yacc are flex and bison and, as with all things GNU, have excellent documentation including complete user manuals in a variety of formats.
lex和yacc的GNU版本是flex和bison,与所有的GNU软件一样,它们也都有非常好的文档,包括各种格式的完全用户手册。
Building on the ground we covered in part 1 of this two-part series, this article covers a couple of concrete applications of lex and yacc and discusses some common pitfalls.
在由两部分构成的系列文章的第1部分所涉及的内容基础之上,本文讨论了两个具体的lex和yacc应用程序,并讨论了一些常见的缺陷。
It consists of a series of rules that lex translates into the lexical analyzer.
它由一系列规则构成,lex将这些规则翻译为词汇分析器。
Their output is itself code, which needs to be fed into a compiler; typically, additional user code is added to use the code generated by lex and/or yacc.
它们的输出本身是代码,需要提供给编译器;通常,要增加另外 的用户代码来使用lex和/或 yacc生成的代码。
While lex can be used to generate sequences of tokens for a parser, it can also be used to perform simple input operations.
虽然可以用lex来为解析器生成记号序列,但也可以用它来执行简单的输入操作。
Readers with some experience working with parsers will probably notice how similar this is to tokenizer generated by a "lex" style programming tool.
具有解析器实践经验的读者可能会注意到,这和由“lex”风格的编程工具生成的标记器是很相似的。
This can create a problem when porting code from one system to another: generally, you are best off re-running lex and yacc on a new platform, rather than porting the generated code.
当将代码从一个系统移植到另一个系统时,这会产生问题:通常,您最好在新的平台上重新运行lex和yacc,而不要移植生成的代码。
Here's a simple example of a program that can be written in a page of yacc and a half-page of lex code.
这里是一个简单的示例程序,只需要一页yacc代码和半页lex代码就可以编写完该程序。
Lex: This tool is a standard component on most UNIX operating systems.
Lex:这个工具是大多数UNIX操作系统的标准组件。
A number of programs have been written to convert simple English text into dialects using only lex, for instance.
例如,有很多将简单的English本文转换为方言的程序都是只用lex编写的。
It used to be that using multiple parsers within a single program required a fair amount of careful tuning of the files generated by lex and yacc.
以前,在一个程序中使用多个解析器时,需要非常小心地调整lex和yacc生成的文件。
Lex takes a specification file and builds a corresponding lexical analyzer, coded in c.
lex可以接受规范文件并构建一个相应的词汇分析器(用c编写的)。
When yacc is run with the -d option, it generates a header file defining constants. Thus, our earlier lex example using.
当使用- d选项来运行yacc时,它会生成一个定义常量的头文件。
Since 2006 the number of mobile-phone-related patent complaints has increased by 20% annually, according to Lex Machina, a firm that keeps a database of intellectual-property spats in America.
据存有美国知识产权口角数据的LexMachina可知,自2006年以来,因手机引发的专利诉讼案正每年以20%的速率递增。
A number of very entertaining if trivial programs have been written entirely in lex (see Resources for links to those).
有很多非常有趣、完全用 lex编写的小程序(请参阅参考资料 中的链接)。
As the lead developer, Lex said recently, "I have always written extensible and modular codes, never a trashable one.
作为首席开发者,Lex最近这样说到,“我一直都在些可扩展的和模块化的代码,从来不写那种成为垃圾的。
Lex and yacc are a matched pair of tools.
lex和yacc是一对配对工具。
In Jurassic Park we laughed as Lex got hit with the full brutal force of a brachiosaurus sneeze.
《侏罗纪公园》中,看到莱克斯被蜿龙打喷嚏所释放的力量击倒时,我们大笑不止。
In Jurassic Park we laughed as Lex got hit with the full brutal force of a brachiosaurus sneeze.
《侏罗纪公园》中,看到莱克斯被蜿龙打喷嚏所释放的力量击倒时,我们大笑不止。
应用推荐