flex 与 bison(影印版) pmlz pdf mobi 地址 cbz 下载 epub 百度云

flex 与 bison(影印版)电子书下载地址
内容简介:
《flex 与 bison(影印版)》内容简介:如果你需要分析或处理Linux或Unix中的文本数据,这本有用的书籍就向你讲解了如何使用flex和bison迅速解决问题。《flex与bison》被期待已久,是经典O’Reilly系列书籍《lex & yacc》的续篇。在原书出版以来的近20年中,flex和bison已被证明比原来的Unix工具更可靠、更强大。
《flex与bison》一书涵盖了Linux和Unix程序开发中相同的重要核心功能,以及一些重要的新主题。你会找到适用于新手的修订教程和适用于高级用户的参考资料,以及对每个程序的基本用法的解释,并且运用它们创建简单、独立的应用程序。有了《flex与bison》,你会发现这些灵活的工具提供的广泛用途。
包括的主题有:
· 正则表达式工具无法处理的地址语法挤压(address syrltax crunching)
· 生成编译器和解释器,并运用大范围的文本处理功能
· 解释代码、配置文件或任何其他结构化的格式
· 学习关键编程技术,包括抽象语法树和符号表
· 用完整的示例代码实现一个完善的SQI一语法
· 使用新的功能,如纯(可重入)词法分析器(Iexer)和语法分析器(parser)、功能强大的JGLR分析器和C++的接口
书籍目录:
Preface
1. Introducing Flex and Bison
Lexical Analysis and Parsing
Regular Expressions and Scanning
Our First Flex Program
Programs in Plain Flex
Putting Flex and Bison Together
The Scanner as Coroutine
Tokens and Values
Grammars and Parsing
BNF Grammars
Bison’s Rule Input Language
Compiling Flex and Bison Programs Together
Ambiguous Grammars: Not Quite
Adding a Few More Rules
Flex and Bison vs. Handwritten Scanners and Parsers
Exercises
2. Using Flex
Regular Expressions
Regular Expression Examples
How Flex Handles Ambiguous Patterns
Context-Dependent Tokens
File I/O in Flex Scanners
Reading Several Files
The I/O Structure of a Flex Scanner
Input to a Flex Scanner
Flex Scanner Output
Start States and Nested Input Files
Symbol Tables and a Concordance Generator
Managing Symbol Tables
Using a Symbol Table
C Language Cross-Reference
Exercises
3. Using Bison
How a Bison Parser Matches Its Input
Shift/Reduce Parsing
What Bison’s LALR(1) Parser Cannot Parse
A Bison Parser
Abstract Syntax Trees
An Improved Calculator That Creates ASTs
Literal Character Tokens
Building the AST Calculator
Shift/Reduce Conflicts and Operator Precedence
When Not to Use Precedence Rules
An Advanced Calculator
Advanced Calculator Parser
Calculator Statement Syntax
Calculator Expression Syntax
Top-Level Calculator Grammar
Basic Parser Error Recovery
The Advanced Calculator Lexer
Reserved Words
Building and Interpreting ASTs
Evaluating Functions in the Calculator
User-Defined Functions
Using the Advanced Calculator
Exercises
4. Parsing SQL
A Quick Overview of SQL
Relational Databases
Manipulating Relations
Three Ways to Use SQL
SQL to RPN
The Lexer
Scanning SQL Keywords
Scanning Numbers
Scanning Operators and Punctuation
Scanning Functions and Names
Comments and Miscellany
The Parser
The Top-Level Parsing Rules
SQL Expressions
Select Statements
Delete Statement
Insert and Replace Statements
Update Statement
Create Database
Create Table
User Variables
The Parser Routines
The Makefile for the SQL Parser
Exercises
5. A Reference for Flex Specifications
Structure of a Flex Specification
Definition Section
Rules Section
User Subroutines
BEGIN
C++ Scanners
Context Sensitivity
Left Context
Right Context
Definitions (Substitutions)
ECHO
Input Management
Stdio File Chaining
Input Buffers
Input from Strings
File Nesting
input()
YY_INPUT
Flex Library
Interactive and Batch Scanners
Line Numbers and yylineno
Literal Block
Multiple Lexers in One Program
Combined Lexers
Multiple Lexers
Options When Building a Scanner
Portability of Flex Lexers
Porting Generated C Lexers
Reentrant Scanners
Extra Data for Reentrant Scanners
Access to Reentrant Scanner Data
Reentrant Scanners, Nested Files, and Multiple Scanners
Using Reentrant Scanners with Bison
Regular Expression Syntax
Metacharacters
REJECT
Returning Values from yylex()
Start States
unput()
yyinput() yyunput()
yyleng
yyless()
yylex() and YY_DECL
yymore()
yyrestart()
yy_scan_string and yy_scan_buffer
YY_USER_ACTION
yywrap()
6. A Reference for Bison Specifications
Structure of a Bison Grammar
Symbols
Definition Section
Rules Section
User Subroutines Section
Actions
Embedded Actions
Symbol Types for Embedded Actions
Ambiguity and Conflicts
Types of Conflicts
Shift/Reduce Conflicts
Reduce/Reduce Conflicts
%expect
GLR Parsers
Bugs in Bison Programs
Infinite Recursion
Interchanging Precedence
Embedded Actions
C++ Parsers
%code Blocks
End Marker
Error Token and Error Recovery
%destructor
Inherited Attributes ($0)
Symbol Types for Inherited Attributes
%initial-action
Lexical Feedback
Literal Block
Literal Tokens
Locations
%parse-param
Portability of Bison Parsers
Porting Bison Grammars
Porting Generated C Parsers
Libraries
Character Codes
Precedence and Associativity Declarations
Precedence
Associativity
Precedence Declarations
Using Precedence and Associativity to Resolve Conflicts
Typical Uses of Precedence
Recursive Rules
Left and Right Recursion
Rules
Special Characters
%start Declaration
Symbol Values
Declaring Symbol Types
Explicit Symbol Types
Tokens
Token Numbers
Token Values
%type Declaration
%union Declaration
Variant and Multiple Grammars
Combined Parsers
Multiple Parsers
Using %name-prefix or the -p Flag
Lexers for Multiple Parsers
Pure Parsers
y.output Files
Bison Library
main()
yyerror()
YYABORT
YYACCEPT
YYBACKUP
yyclearin
yydebug and YYDEBUG
YYDEBUG
yydebug
yyerrok
YYERROR
yyerror()
yyparse()
YYRECOVERING()
7. Ambiguities and Conflicts
The Pointer Model and Conflicts
Kinds of Conflicts
Parser States
Contents of name.output
Reduce/Reduce Conflicts
Shift/Reduce Conflicts
Review of Conflicts in name.output
Common Examples of Conflicts
Expression Grammars
IF/THEN/ELSE
Nested List Grammar
How Do You Fix the Conflict?
IF/THEN/ELSE (Shift/Reduce)
Loop Within a Loop (Shift/Reduce)
Expression Precedence (Shift/Reduce)
Limited Lookahead (Shift/Reduce or Reduce/Reduce)
Overlap of Alternatives (Reduce/Reduce)
Summary
Exercises
8. Error Reporting and Recovery
Error Reporting
Locations
Adding Locations to the Parser
Adding Locations to the Lexer
More Sophisticated Locations with Filenames
Error Recovery
Bison Error Recovery
Freeing Discarded Symbols
Error Recovery in Interactive Parsers
Where to Put Error Tokens
Compiler Error Recovery
Exercises
9. Advanced Flex and Bison
Pure Scanners and Parsers
Pure Scanners in Flex
Pure Parsers in Bison
Using Pure Scanners and Parsers Together
A Reentrant Calculator
GLR Parsing
GLR Version of the SQL Parser
C++ Parsers
A C++ Calculator
C++ Parser Naming
A C++ Parser
Interfacing a Scanner with a C++ Parser
Should You Write Your Parser in C++ ?
Exercises
Appendix: SQL Parser Grammar and Cross-Reference
Glossary
Index
作者介绍:
John Levine, Taughannock Networks的创始人,著有20余本技术书籍,其中包括《lex & yacc》和《qmail》,均为O’Reilly出版。
出版社信息:
暂无出版社相关信息,正在全力查找中!
书籍摘录:
A bison specification has the same three-part structure as a flex specification. (Flexcopied its structure from the earlier lex, which copied its structure from yacc, the predecessor of bison.) The first section, the definition section, handles control informationfor the parser and generally sets up the execution environment in which the parser willoperate. The second section contains the rules for the parser, and the third section isC code copied verbatim into the generated C program.
Bison creates the C program by plugging pieces into a standard skeleton file. The rulesare compiled into arrays that represent the state machine that matches the input tokens.The actions have the SN and @N values translated into C and then are put into a switchstatement within yyparse0 that runs the appropriate action each time there's a reduction. Some bits of the skeleton have multiple versions from which bison chooses depending on what options are in use; for example, if the parser uses the locations feature,it includes code to handle location data.
In this chapter we take the simple calculator example from Chapter 1 and extend itsignificantly. First, we rewrite it to take advantage of some handy bison shortcuts andchange it to produce a reusable data structure rather than computing the values on thefly. Later, we'll add more complex syntax for loops and functions and show how toimplement them in a simple interpreter.
One of the most powerful data structures used in compilers is an abstract syntax tree(AST). In Chapter 1 we saw a parse tree, a tree that has a node for every rule used toparse the input string. In most real grammars, there are rules that exist to managegrouping but that add no meaning to the program. In the calculator example, the rulesexp: term and term: factor exist only to tell the parser the relative precedence of theoperators. An AST is basically a parse tree that omits the nodes for the uninterestingrules.
在线阅读/听书/购买/PDF下载地址:
原文赏析:
calclist: /* nothing */
| calclist exp EOL { printf("= %dn", $1); }
;
SQL strings are enclosed in single quotes, using a pair of quotes to represent a single quote in the string
Bison并不分析任何的C代码,。。。
正确使用YYBACKUP()非常困难,。。。
接受不正确的输入然后把它报告为一个错误。。。
早期的错误恢复。。。再次运行程序所需要的等待时间。。。
其它内容:
媒体评论
“我很高兴看到John彻底详尽地重写这本经典书。他更新的示例和说明,能够帮助老用户和新手摆脱模仿那些已经根深蒂固的旧lex和yacc。”
——Joel E. Denny bison维护人员
前言
Flex and bison are tools designed for writers of compilers and interpreters, althoughthey are also useful for many applications that will interest noncompiler writers. Anyapplication that looks for patterns in its input or has an input or command language
书籍介绍
如果你需要分析或处理Linux或Unix中的文本数据,这本有用的书籍就向你讲解了如何使用flex和bison迅速解决问题。《flex与bison》被期待已久,是经典O’Reilly系列书籍《lex & yacc》的续篇。在原书出版以来的近20年中,flex和bison已被证明比原来的Unix工具更可靠、更强大。
《flex与bison》一书涵盖了Linux和Unix程序开发中相同的重要核心功能,以及一些重要的新主题。你会找到适用于新手的修订教程和适用于高级用户的参考资料,以及对每个程序的基本用法的解释,并且运用它们创建简单、独立的应用程序。有了《flex与bison》,你会发现这些灵活的工具提供的广泛用途。
网站评分
书籍多样性:5分
书籍信息完全性:4分
网站更新速度:5分
使用便利性:5分
书籍清晰度:9分
书籍格式兼容性:5分
是否包含广告:6分
加载速度:3分
安全性:6分
稳定性:8分
搜索功能:8分
下载便捷性:7分
下载点评
- 无广告(625+)
- 赞(421+)
- 少量广告(164+)
- 书籍多(424+)
- 服务好(453+)
- 五星好评(321+)
- 经典(327+)
- mobi(384+)
- 速度快(167+)
- 图书多(254+)
下载评价
- 网友 居***南:
请问,能在线转换格式吗?
- 网友 步***青:
。。。。。好
- 网友 冯***卉:
听说内置一千多万的书籍,不知道真假的
- 网友 濮***彤:
好棒啊!图书很全
- 网友 堵***洁:
好用,支持
- 网友 戈***玉:
特别棒
- 网友 堵***格:
OK,还可以
- 网友 汪***豪:
太棒了,我想要azw3的都有呀!!!
- 网友 訾***雰:
下载速度很快,我选择的是epub格式
- 网友 寇***音:
好,真的挺使用的!
- 网友 曾***文:
五星好评哦
- 网友 益***琴:
好书都要花钱,如果要学习,建议买实体书;如果只是娱乐,看看这个网站,对你来说,是很好的选择。
- 网友 孔***旋:
很好。顶一个希望越来越好,一直支持。
- 网友 通***蕊:
五颗星、五颗星,大赞还觉得不错!~~
- 网友 潘***丽:
这里能在线转化,直接选择一款就可以了,用他这个转很方便的
- 网友 利***巧:
差评。这个是收费的
喜欢"flex 与 bison(影印版)"的人也看了
凯斯特纳经典作品漫画版:两个小洛特 pmlz pdf mobi 地址 cbz 下载 epub 百度云
生殖内分泌疾病检查项目选择及应用 第3版 杨冬梓 主编 西医妇产科学 人民卫生 2023年10月参考书9787117352017 pmlz pdf mobi 地址 cbz 下载 epub 百度云
药事管理与法规 pmlz pdf mobi 地址 cbz 下载 epub 百度云
香格里拉魂 稻城亚丁 四川甘孜州稻城县,四川甘孜州文联 中国旅游出版社【正版】 pmlz pdf mobi 地址 cbz 下载 epub 百度云
阳光同学课时优化作业 语文三年级下(RJ 浙江) pmlz pdf mobi 地址 cbz 下载 epub 百度云
永远的和平 pmlz pdf mobi 地址 cbz 下载 epub 百度云
【订阅】进口原版年刊 モード?オプティーク 眼镜资讯杂志 日本日文原版 年订2期 D420 pmlz pdf mobi 地址 cbz 下载 epub 百度云
JSP Web技术及应用教程:微课视频版 pmlz pdf mobi 地址 cbz 下载 epub 百度云
漫画中小学生自我管理 全4册 抗挫力青春期时间管理自我学习 6-14岁儿童心理健康教育书籍 情绪管理与性格培养漫画故事书 pmlz pdf mobi 地址 cbz 下载 epub 百度云
幼儿园区域活动实用手册 pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 海洋的奥秘(奇想国童书) pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 会展业概论(第3版)/工商管理经典译丛·旅游管理系列 pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 聚合物燃烧与阻燃技术 pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 趣味串珠:初级篇 pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 这才是孩子爱看的漫画成语(全8册):小学生一二三四五六年级课外阅读书籍漫画成语故事儿童绘本漫画书 pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 你的形象决定你的价值:如何让自己活得像个人物 pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 中华人民共和国刑事法律法规规章司法解释大全(2021年版)(总第七版) pmlz pdf mobi 地址 cbz 下载 epub 百度云
- T-34中型坦克 pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 全新正版图书 叶片泵设计数值模拟基础与应用张德胜机械工业出版社9787111521310 叶片泵设计数值模拟青岛新华书店旗舰店 pmlz pdf mobi 地址 cbz 下载 epub 百度云
- 军事装备维修保障学 pmlz pdf mobi 地址 cbz 下载 epub 百度云
书籍真实打分
故事情节:4分
人物塑造:8分
主题深度:3分
文字风格:3分
语言运用:8分
文笔流畅:5分
思想传递:9分
知识深度:9分
知识广度:3分
实用性:3分
章节划分:9分
结构布局:4分
新颖与独特:5分
情感共鸣:5分
引人入胜:8分
现实相关:3分
沉浸感:9分
事实准确性:5分
文化贡献:7分