Building Parsers With Java™
Home > Computing and Information Technology > Computer programming / software engineering > Web programming > Building Parsers With Java™
Building Parsers With Java™

Building Parsers With Java™

|
     0     
5
4
3
2
1




Out of Stock


Notify me when this book is in stock
About the Book

No programming language can solve every problem, but Java can be extended to solve a far wider range of problems through the use of parsers -- "mini-languages" that bridge the gap between humans and computers, and offer targeted solutions for specific problem domains. In Building Parsers with Java™, Steven John Metsker presents the first complete, start-to-finish guide to building parsers with Java. Metsker first explains what a parser is, introduces the building blocks of applied parsers, shows how to compose new parsers from existing ones; and walks step-by-step through designing, coding, and testing a working parser. Next, he presents in-depth coverage of creating Java-based parsers for a wide range of problem domains. You'll learn how to create parsers that can read elements of a data language; how to transform a grammar, ensuring the correct behavior of operators in a language; how to build arithmetic and regular expression parsers, and more. Metsker shows how to extend existing parser toolkits, and introduces a logic engine that can be used in a wide range of parsers, including both logic and query languages.

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. 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. QuoteState. 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. Token Strings. 10. Matching Mechanics. Introduction. Parser Matching. Repetition Matching. Collection Parsers. Sequence Matching. Alternation Matching. Empty Matching. Terminal Matching. Token Terminals. 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. An Error-Handling Parser. Tracks in Action. 12. Engines. Engines versus Interpreters. The Role of Engines. Building Blocks. Structures. Variables. Unification. Facts. Programs and Queries. Proofs. Backtracking. Rules. Additional Features of the Engine. Comparisons. Arithmetic. Evaluation. Not. Anonymous Variables. Lists. 13. Logic Programming. The Role of Logic Languages. Building Blocks. Structures. Variables. A Logikus Interactive Development Environment. Unification. Comparisons. Rules, Axioms, and Programs. Proofs. Variable Scope. Variable Joins. Backtracking. Looping and Halting. Gateways. Additional Features of Logikus. Comments. Evaluations. Negation. Not Dangerous. Anonymous Variables. Lists. Dot Notation. List Applications. Member. 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. 14. Parsing a Logic Language. Building a Logic Language Environment. A Logikus Grammar. Comments in Logikus. 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. Facts, Objects, and Rows. Jaql. Jaql Syntax. Jaql Joins. Jaql Expressions. Building a Query Language Environment. Translating User Queries to Engine Queries. Natural Joins. 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. 16. Parsing an Imperative Language. The Role of Imperative Languages. 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. Sling Commands. AddFunctionCommand. AssignFunctionCommand. Building Runtime Functions. Function Wrapping. 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. Sling Target. A Sling Grammar. Sling Assemblers. AssignmentAssembler. ForAssembler. FunctionAssembler. NegativeAssembler. NumAssembler. PiAssembler. PlotAssembler. ScaleAssembler. SliderAssembler. VariableAssembler. A Sling Parser. Reserved Words. Assembler Placement. 17. Directions. Get Started. Get the Most Out of This Book. 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. Appendix A: UML Twice Distilled. Classes. Class Relationships. Interfaces. Objects. References. Index.


Best Sellers


Product Details
  • ISBN-13: 9780201719628
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Height: 188 mm
  • No of Pages: 408
  • Weight: 653 gr
  • ISBN-10: 0201719622
  • Publisher Date: 20 Apr 2001
  • Binding: SA
  • Language: English
  • Spine Width: 18 mm
  • Width: 234 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Building Parsers With Java™
Pearson Education (US) -
Building Parsers With Java™
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Building Parsers With Java™

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!