Building Parsers With Java (Paperback) | 拾書所

Building Parsers With Java (Paperback)

$ 990 元 原價 1,650

Description



Back to Top


Appropriate Courses

Compiler Construction, Java-Intermediate Programming.

Back to Top


Features

Back to Top


Table Of Contents

(NOTE: Each chapter concludes with a Summary.)
Foreword.
Preface.

Who Should Read This Book.
Using the Toolkit Code and the Sample Code.
Contents of the CD.
Applying the Code on the CD.
Hello World.
Coding Style.
Related Books.
Theoretical Context.
Yacc and Lex and Bison and Flex.
About the Cover.
Acknowledgments.

1. Introduction.
The Role of Parsers.
What Is a Language?
The Organization of This Book.

2. The Elements of a Parser.
What Is a Parser?
Parser Collaborations.
Assemblies.
The Assembly Class Interfaces.
Token and Character Assemblies.
Tokenizing.
Default and Custom Tokenization.
Assembly Appearance.
Assembly Summary.

The Parser Hierarchy.
The Composition of a Parser.

Terminal Parsers.
Using Terminals.
Word Terminals.
Num Terminals.
Literals.
Caseless Literals.
Symbols.
Quoted Strings.

Composite Parsers.
Repetition.
Alternation and Sequence.
Composing a Parser.
The Empty Parser.
Parser Summary.

Assemblers.
Parsers Use Assemblers.
Assemblers Work On Assemblies.
Elements Above.


3. Building a Parser.
Design Overview.
Deciding to Tokenize.
Designing Assemblers.
The Collaboration of Parsers, Assemblers, and Assemblies.
Using an Assembly's Stack.
Assemblers Plug In to Parser Composites.
A Language to Plug In To: Minimath.
Calculating a Minimath Result.
The Minimath Parser as an Object.
Building a Target.
Making a Target Cloneable.

Grammars: A Shorthand for Parsers.
Standard Grammar Shorthand.
Top-Down Grammar Design.

Example: Designing a Grammar for a Track Robot.
A Track Robot Grammar.
Checking for Left Recursion and Cycles.

Translating a Grammar to Code.
Translate Quoted Strings.
Translate Sequences.
Translate Alternations.
Translate Terminals.
Create a Subparser for Each Rule.
Option 1: Declare Each Subparser.
Option 2: Arrange Subparsers as Methods.
Add a Start Method.

Completing a Parser.
Control Pushing.
Design the Target.
Plug In Assemblers.


4. Testing a Parser.
Feature Testing.
Random Testing.
Ambiguity Testing.
Terminal Ambiguity.

Special Tokenizers and Targets.

5. Parsing Data Languages.
The Role of Data Languages.
A Data Language Example.
A Coffee Grammar.
A Tokenizing Problem.
Coffee Assemblers.
Coffee Assembler Code.

Translating the Coffee Grammar to Code.
Data Language Parser Summary.
Parsers with XML.
A Brief History of XML.
The Evolution of XML.
An XML Example.

Helpers.
ShowCoffeeXML.


6. Transforming a Grammar.
The Role of Grammar Transformation.
Ensuring Correct Associativity.
Eliminating Left Recursion.
An Algorithm.

Ensuring Proper Precedence.
Eliminating Parser Class Loops.

7. Parsing Arithmetic.
Building an Arithmetic Parser.
Conventional Symbols.
Conventional Precedence.
Conventional Associativity.

An Arithmetic Grammar.
Arithmetic Assemblers.
Assembler Code.

An Arithmetic Grammar Parser.

8. Parsing Regular Expressions.
The Role of Regular Expressions.
Building a Regular Expression Parser.
A Regular Expression Grammar.
Regular Expression Assemblers.
Assembler Code.

A Regular Expression Parser.

Brand Slider