Building Parsers With Java (Paperback)
Steven John Metsker
- 出版商: Addison Wesley
- 出版日期: 2001-04-05
- 售價: $1,800
- 貴賓價: 9.5 折 $1,710
- 語言: 英文
- 頁數: 371
- 裝訂: Paperback
- ISBN: 0201719622
- ISBN-13: 9780201719628
-
相關分類:
Java 程式語言
立即出貨(限量) (庫存=6)
買這商品的人也買了...
-
$725Java Server and Servlets: Building Portable Web Applications (Paperback)
-
$480$379 -
$675Java Look and Feel Design Guidelines: Advanced Topics (Paperback)
-
$825Applied Java Patterns (Paperback)
-
$1,710$1,625 -
$1,274Computer Architecture: A Quantitative Approach, 3/e(精裝本)
-
$1,029Operating System Concepts, 6/e (Windows XP Update)
-
$420$336 -
$560$504 -
$399CCNA Self-Study: CCNA Basics (CCNAB) (Hardcover)
-
$590$466 -
$720$569 -
$750$675 -
$480$379 -
$399Advanced Java Game Programming (Paperback)
-
$580$452 -
$580$458 -
$650$507 -
$680$537 -
$850$723 -
$480$379 -
$1,368$1,296 -
$1,860$1,767 -
$530$419 -
$580$551
相關主題
商品描述
Description
Compiler Construction, Java-Intermediate Programming.
Features
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.
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.
What Is a Language?
The Organization of This Book.
2. The Elements of a Parser.
What Is a Parser?
Parser Collaborations.
Assemblies.
The Parser Hierarchy.
Terminal Parsers.
Composite Parsers.
Assemblers.
Parser Collaborations.
Assemblies.
The Assembly Class Interfaces.
Token and Character Assemblies.
Tokenizing.
Default and Custom Tokenization.
Assembly Appearance.
Assembly Summary.
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.
Word Terminals.
Num Terminals.
Literals.
Caseless Literals.
Symbols.
Quoted Strings.
Composite Parsers.
Repetition.
Alternation and Sequence.
Composing a Parser.
The Empty Parser.
Parser Summary.
Alternation and Sequence.
Composing a Parser.
The Empty Parser.
Parser Summary.
Assemblers.
Parsers Use Assemblers.
Assemblers Work On Assemblies.
Elements Above.
Assemblers Work On Assemblies.
Elements Above.
3. Building a Parser.
Design Overview.
Deciding to Tokenize.
Designing Assemblers.
Grammars: A Shorthand for Parsers.
Example: Designing a Grammar for a Track Robot.
Translating a Grammar to Code.
Completing a Parser.
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.
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.
Top-Down Grammar Design.
Example: Designing a Grammar for a Track Robot.
A Track Robot Grammar.
Checking for Left Recursion and Cycles.
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.
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.
Design the Target.
Plug In Assemblers.
4. Testing a Parser.
Feature Testing.
Random Testing.
Special Tokenizers and Targets.
Random Testing.
Ambiguity Testing.
Terminal Ambiguity.
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.
Translating the Coffee Grammar to Code.
Data Language Parser Summary.
Parsers with XML.
Helpers.
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.
The Evolution of XML.
An XML Example.
Helpers.
ShowCoffeeXML.
6. Transforming a Grammar.
The Role of Grammar Transformation.
Ensuring Correct Associativity.
Eliminating Left Recursion.
Ensuring Proper Precedence.
Eliminating Parser Class Loops.
Ensuring Correct Associativity.
Eliminating Left Recursion.
An Algorithm.
Ensuring Proper Precedence.
Eliminating Parser Class Loops.
7. Parsing Arithmetic.
Building an Arithmetic Parser.
An Arithmetic Grammar.
Arithmetic Assemblers.
An Arithmetic Grammar Parser.
Conventional Symbols.
Conventional Precedence.
Conventional Associativity.
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.
A Regular Expression Parser.
Building a Regular Expression Parser.
A Regular Expression Grammar.
Regular Expression Assemblers.
Assembler Code.
A Regular Expression Parser.
9. Advanced Tokenizing.
The Role of a Tokenizer.
Acquiring a Tokenizer.
Tokenizers in Standard Java.
A Token Class.
A Tokenizer Class.
Tokenizer Lookup Tables.
Tokenizer States.
Setting a Tokenizer's Source.
Customizing a Tokenizer.
The TokenStringSource Utility.
Token Strings.
Acquiring a Tokenizer.
Tokenizers in Standard Java.
A Token Class.
A Tokenizer Class.
Tokenizer Lookup Tables.
Tokenizer States.
QuoteState.
NumberState.
SlashState.
SymbolState.
WhitespaceState.
WordState.
NumberState.
SlashState.
SymbolState.
WhitespaceState.
WordState.
Setting a Tokenizer's Source.
Customizing a Tokenizer.
The TokenStringSource Utility.
Customizing a State.
Changing Which State the Tokenizer Enters.
Adding a State.
Changing Which State the Tokenizer Enters.
Adding a State.
Token Strings.
10. Matching Mechanics.
Introduction.
Parser Matching.
Repetition Matching.
Collection Parsers.
Sequence Matching.
Alternation Matching.
Empty Matching.
Terminal Matching.
Parser Matching Utilities.
Parser Matching.
Repetition Matching.
Collection Parsers.
Sequence Matching.
Alternation Matching.
Empty Matching.
Terminal Matching.
Token Terminals.
Character Terminals.
Terminals Summary.
Character Terminals.
Terminals Summary.
Parser Matching Utilities.
11. Extending the Parser Toolkit.
The Role of New Types of Parsers.
New Terminals.
New Token Types.
New Parser Features.
New Terminals.
New Token Types.
New Parser Features.
An Error-Handling Parser.
Tracks in Action.
Tracks in Action.
12. Engines.
Engines versus Interpreters.
The Role of Engines.
Building Blocks.
Unification.
Facts.
Programs and Queries.
Proofs.
Rules.
Additional Features of the Engine.
The Role of Engines.
Building Blocks.
Structures.
Variables.
Variables.
Unification.
Facts.
Programs and Queries.
Proofs.
Backtracking.
Rules.
Additional Features of the Engine.
Comparisons.
Arithmetic.
Evaluation.
Not.
Anonymous Variables.
Lists.
Arithmetic.
Evaluation.
Not.
Anonymous Variables.
Lists.
13. Logic Programming.
The Role of Logic Languages.
Building Blocks.
A Logikus Interactive Development Environment.
Unification.
Comparisons.
Rules, Axioms, and Programs.
Proofs.
Additional Features of Logikus.
Lists.
List Applications.
Modeling Transitive and Symmetric Relations.
Example Applications.
Building Blocks.
Structures.
Variables.
Variables.
A Logikus Interactive Development Environment.
Unification.
Comparisons.
Rules, Axioms, and Programs.
Proofs.
Variable Scope.
Variable Joins.
Backtracking.
Looping and Halting.
Gateways.
Variable Joins.
Backtracking.
Looping and Halting.
Gateways.
Additional Features of Logikus.
Comments.
Evaluations.
Negation.
Not Dangerous.
Anonymous Variables.
Evaluations.
Negation.
Not Dangerous.
Anonymous Variables.
Lists.
Dot Notation.
List Applications.
Member.
Prefix.
Suffix.
Permutation.
Prefix.
Suffix.
Permutation.
Modeling Transitive and Symmetric Relations.
Symmetric Relations.
Example Applications.
An Authorization Program.
Epidemic.
Generate and Test.
Generate and Test in Java.
Altitude Bands.
Epidemic.
Generate and Test.
Generate and Test in Java.
Altitude Bands.
14. Parsing a Logic Language.
Building a Logic Language Environment.
A Logikus Grammar.
Logikus Assemblers.
The Logikus Interactive Development Environment.
A Logikus Grammar.
Comments in Logikus.
Logikus Programs.
Logikus Programs.
Logikus Assemblers.
The Logikus Interactive Development Environment.
A Facade for Logikus.
15. Parsing a Query Language.
The Role of Query Languages.
A Sample Database.
Jaql.
Building a Query Language Environment.
Translating User Queries to Engine Queries.
A Query Builder.
A Speller.
Jaql Grammar.
Creating the Jaql Parser.
Jaql Assemblers.
The Jaql User Environment.
A Sample Database.
Facts, Objects, and Rows.
Jaql.
Jaql Syntax.
Jaql Joins.
Jaql Expressions.
Jaql Joins.
Jaql Expressions.
Building a Query Language Environment.
Translating User Queries to Engine Queries.
Natural Joins.
Where Clauses.
Projection.
Where Clauses.
Projection.
A Query Builder.
A Speller.
Jaql Grammar.
Creating the Jaql Parser.
Jaql Assemblers.
The Jaql User Environment.
Exception Handling.
Tracks.
Handling Abject Failure.
Tracks.
Handling Abject Failure.
16. Parsing an Imperative Language.
The Role of Imperative Languages.
Sling.
Sling Programming.
Sling Commands.
Building Runtime Functions.
Sling Functions.
Sling Target.
A Sling Grammar.
Sling Assemblers.
A Sling Parser.
Sling.
Sling Programming.
A Basic Sling.
Adding Slings.
Plotting Time.
Line Effects.
Adding Lines.
Cartesian Plots.
Cartesians as Points.
Polar Plots.
For Loops.
Sliders.
A Composite Example.
More Plots.
The Elements of Sling>
Building the Sling Environment.
Building Commands.
A Command Example.
AssignmentCommand.
CommandSequence.
ForCommand.
IfCommand.
NullCommand.
PrintlnCommand.
ReadCommand.
WhileCommand.
Commands Summary.
Adding Slings.
Plotting Time.
Line Effects.
Adding Lines.
Cartesian Plots.
Cartesians as Points.
Polar Plots.
For Loops.
Sliders.
A Composite Example.
More Plots.
The Elements of Sling>
Building the Sling Environment.
Building Commands.
A Command Example.
AssignmentCommand.
CommandSequence.
ForCommand.
IfCommand.
NullCommand.
PrintlnCommand.
ReadCommand.
WhileCommand.
Commands Summary.
Sling Commands.
AddFunctionCommand.
AssignFunctionCommand.
AssignFunctionCommand.
Building Runtime Functions.
Function Wrapping.
Umbrella Types.
Runtime Functions in Sling.
Execution Phases.
Prototyping.
Function Evaluation.
Umbrella Types.
Runtime Functions in Sling.
Execution Phases.
Prototyping.
Function Evaluation.
Sling Functions.
SlingFunction.
Abs, Ceil, Cos, Floor, Sin, and Tan.
Arithmetic.
Cartesian.
Point.
Polar.
Random.
Scale.
Sling.
Slider.
T.
Variable.
Abs, Ceil, Cos, Floor, Sin, and Tan.
Arithmetic.
Cartesian.
Point.
Polar.
Random.
Scale.
Sling.
Slider.
T.
Variable.
Sling Target.
A Sling Grammar.
Sling Assemblers.
AssignmentAssembler.
ForAssembler.
FunctionAssembler.
NegativeAssembler.
NumAssembler.
PiAssembler.
PlotAssembler.
ScaleAssembler.
SliderAssembler.
VariableAssembler.
ForAssembler.
FunctionAssembler.
NegativeAssembler.
NumAssembler.
PiAssembler.
PlotAssembler.
ScaleAssembler.
SliderAssembler.
VariableAssembler.
A Sling Parser.
Reserved Words.
Assembler Placement.
Assembler Placement.
17. Directions.
Get Started.
Keep Going.
Get the Most Out of This Book.
Other Essential Reading.
Other Essential Reading.
Keep Going.
Create New Languages for Your Colleagues.
Create New Languages for Children.
Explore Languages as Human Interfaces.
Improve Languages as Receptacles for Human Thought.
Choose Your Own Direction.
Create New Languages for Children.
Explore Languages as Human Interfaces.
Improve Languages as Receptacles for Human Thought.
Choose Your Own Direction.
Appendix A: UML Twice Distilled.
Classes.
Class Relationships.
Interfaces.
Objects.
Class Relationships.
Interfaces.
Objects.
References.
Index.
商品描述(中文翻譯)
描述
適用課程
特點
目錄
1. 簡介
2. 解析器的元素
3. 建立解析器
4. 測試解析器