Domain Specific Languages By: Martin Fowler Publisher: Addison-Wesley Professional Pub. Date: September 24, 2010 Print ISBN-10: 0-321-71294-3 Print ISBN-13: 978-0-321-71294-3 Web ISBN-10: 0-13-210754-6 Web ISBN-13: 978-0-13-210754-9 Pages in Print Edition: 640 Slots: 1 Add to Favorites ® Rating: [0 Ratings] Subscriber Rating: [2 Ratings] My Rating: Popular Tags:
Table of Contents Preface xix
Part I: Narratives 1 Chapter 1: An Introductory Example 3 Gothic Security 3 The State Machine Model 5 Programming Miss Grant’s Controller 9 Languages and Semantic Model 16 Using Code Generation 19 Using Language Workbenches 22 Visualization 24
Chapter 2: Using Domain-Specific Languages 27 Defining Domain-Specific Languages 27 Why Use a DSL? 33 Problems with DSLs 36 Wider Language Processing 39 DSL Lifecycle 40 What Makes a Good DSL Design? 42
Chapter 3: Implementing DSLs 43 Architecture of DSL Processing 43 The Workings of a Parser 47 Grammars, Syntax, and Semantics 49 Parsing Data 50 Macros 52 Chapter 4: Implementing an Internal DSL 67 Fluent mand-Query APIs 68 The Need for a Parsing Layer 71 Using Functions 72 Literal Collections 77 Using Grammars to Choose Internal Elements 79 Closures 80 Parse Tree Manipulation 82 Annotation 84 Literal Extension 85 Reducing the Syntactic Noise 85 Dynamic Reception 86 Providing Some Type Checking 87
Chapter 5: Implementing an External DSL 89 Syntactic Analysis Strategy 89 Output Production Strategy 92 Parsing Concepts 94 Mixing-in Another Language 100 XML DSLs 101
Chapter 6: Choosing between Internal and External DSLs 105 Learning Curve 105 Cost of Building 106 Programmer Familiarity 107 Communication with Domain Experts 108 Mixing In the Host Language 108 Strong Expressiveness Boundary 109 Runtime Configuration 110 Sliding into Generality 110 Composing DSLs 111 Summi