Erhältlich:Nicht auf LagerMixed-Media-Product: Fachbuch
Flex & Bison [With Access Code]
von Levine
- Verlag
- Oreilly Media
- Unsere Artikel-Nr.
- 4QKLL3K
Beschreibung
If you need to parse or process text data in Linux or Unix, this useful book explains how to use flex and bison to solve your problems quickly. flex & bison is the long-awaited sequel to the classic O'Reilly book, lex & yacc. In the nearly two decades since the original book was published, the flex and bison utilities have proven to be more reliable and more powerful than the original Unix tools. flex & bison. covers the same core functionality vital to Linux and Unix program development, along with several important new topics. You'll find revised tutorials for novices and references for advanced users, as well as an explanation of each utility's basic usage and simple, standalone applications you can create with them. With flex & bison. , you'll discover the wide range of uses these flexible tools offer. Address syntax crunching that regular expressions tools can't handle Build compilers and interpreters, and handle a wide range of text processing functions Interpret code, configuration files, or any other structured format Learn key programming techniques, including abstract syntax trees and symbol tables Implement a full SQL grammar-with complete sample code Use new features such as pure (reentrant) lexers and parsers, powerful GLR parsers, and interfaces to C
Spezifikationen
| Sprache | Englisch |
|---|---|
| Autor | Levine |
| Erscheinungsjahr | 2009 |
| Format | Mixed-Media-Product |
| Anzahl Seiten | 271 |
Inhaltsverzeichnis
Preface;
Scope of This Book;
Conventions Used in This Book;
Getting Flex and Bison;
This Book's Example Files;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgments;
Chapter 1: Introducing Flex and Bison;
1.1 Lexical Analysis and Parsing;
1.2 Regular Expressions and Scanning;
1.3 Grammars and Parsing;
1.4 Ambiguous Grammars: Not Quite;
1.5 Adding a Few More Rules;
1.6 Flex and Bison vs. Handwritten Scanners and Parsers;
1.7 Exercises;
Chapter 2: Using Flex;
2.1 Regular Expressions;
2.2 File I/O in Flex Scanners;
2.3 Reading Several Files;
2.4 The I/O Structure of a Flex Scanner;
2.5 Start States and Nested Input Files;
2.6 Symbol Tables and a Concordance Generator;
2.7 C Language Cross-Reference;
2.8 Exercises;
Chapter 3: Using Bison;
3.1 How a Bison Parser Matches Its Input;
3.2 Shift/Reduce Parsing;
3.3 A Bison Parser;
3.4 Abstract Syntax Trees;
3.5 An Improved Calculator That Creates ASTs;
3.6 Shift/Reduce Conflicts and Operator Precedence;
3.7 An Advanced Calculator;
3.8 Using the Advanced Calculator;
3.9 Exercises;
Chapter 4: Parsing SQL;
4.1 A Quick Overview of SQL;
4.2 Manipulating Relations;
4.3 Three Ways to Use SQL;
4.4 SQL to RPN;
4.5 The Lexer;
4.6 The Parser;
4.7 The Makefile for the SQL Parser;
4.8 Exercises;
Chapter 5: A Reference for Flex Specifications;
5.1 Structure of a Flex Specification;
5.2 BEGIN;
5.3 C++ Scanners;
5.4 Context Sensitivity;
5.5 Definitions (Substitutions);
5.6 ECHO;
5.7 Input Management;
5.8 Flex Library;
5.9 Interactive and Batch Scanners;
5.10 Line Numbers and yylineno;
5.11 Literal Block;
5.12 Multiple Lexers in One Program;
5.13 Options When Building a Scanner;
5.14 Portability of Flex Lexers;
5.15 Reentrant Scanners;
5.16 Regular Expression Syntax;
5.17 REJECT;
5.18 Returning Values from yylex();
5.19 Start States;
5.20 unput();
5.21 yyinput() yyunput();
5.22 yyleng;
5.23 yyless();
5.24 yylex() and YY_DECL;
5.25 yymore();
5.26 yyrestart();
5.27 yy_scan_string and yy_scan_buffer;
5.28 YY_USER_ACTION;
5.29 yywrap();
Chapter 6: A Reference for Bison Specifications;
6.1 Structure of a Bison Grammar;
6.2 Actions;
6.3 Ambiguity and Conflicts;
6.4 Bugs in Bison Programs;
6.5 C++ Parsers;
6.6 %code Blocks;
6.7 End Marker;
6.8 Error Token and Error Recovery;
6.9 Inherited Attributes ($0);
6.10 %initial-action;
6.11 Lexical Feedback;
6.12 Literal Block;
6.13 Literal Tokens;
6.14 Locations;
6.15 %parse-param;
6.16 Portability of Bison Parsers;
6.17 Precedence and Associativity Declarations;
6.18 Recursive Rules;
6.19 Rules;
6.20 Special Characters;
6.21 %start Declaration;
6.22 Symbol Values;
6.23 Tokens;
6.24 Variant and Multiple Grammars;
6.25 Multiple Parsers;
6.26 y.output Files;
6.27 Bison Library;
6.28 YYABORT;
6.29 YYACCEPT;
6.30 YYBACKUP;
6.31 yyclearin;
6.32 yydebug and YYDEBUG;
6.33 yyerrok;
6.34 YYERROR;
6.35 yyerror();
6.36 yyparse();
6.37 YYRECOVERING();
Chapter 7: Ambiguities and Conflicts;
7.1 The Pointer Model and Conflicts;
7.2 Kinds of Conflicts;
7.3 Parser States;
7.4 Contents of name.output;
7.5 Reduce/Reduce Conflicts;
7.6 Shift/Reduce Conflicts;
7.7 Review of Conflicts in name.output;
7.8 Common Examples of Conflicts;
7.9 How Do You Fix the Conflict?;
7.10 Summary;
7.11 Exercises;
Chapter 8: Error Reporting and Recovery;
8.1 Error Reporting;
8.2 Locations;
8.3 Error Recovery;
8.4 Bison Error Recovery;
8.5 Compiler Error Recovery;
8.6 Exercises;
Chapter 9: Advanced Flex and Bison;
9.1 Pure Scanners and Parsers;
9.2 GLR Parsing;
9.3 C++ Parsers;
9.4 Exercises;
SQL Parser Grammar and Cross-Reference;
Glossary;
Colophon;
Bewertungen
Produkt bewertenFür dieses Produkt liegt noch keine Bewertung vor. Wenn Sie es gekauft haben, teilen Sie gerne Ihre Erfahrung.
Zahlungsarten
Rechnung (Einzahlungsschein mit QR-Code), Twint, Kreditkarte, PostFinance, Apple, Google oder Samsung Pay.
Versand
Kostenlos: Schweiz & Liechtenstein
Rückgabe
Kein Rückgaberecht
Bei diesem Produkt hat entweder der Hersteller/Verlag das Rückgaberecht ausgeschlossen oder eine Rückgabe ist aufgrund des Vertriebssystems nicht möglich.
![Flex & Bison [With Access Code]](https://d2s1q1kdof6gxg.cloudfront.net/covers/small/4qkll3k.webp)