Language implementation patterns: create your own domain-specific and general programming languages
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Raleigh, NC [u.a.]
Pragmatic Bookshelf
2011
|
Ausgabe: | P3.0 printing, Version: 2011-7-13 |
Schriftenreihe: | The pragmatic programmers
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XIX, 374 S. Ill., graph. Darst. |
ISBN: | 9781934356456 193435645X |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV040796784 | ||
003 | DE-604 | ||
005 | 00000000000000.0 | ||
007 | t | ||
008 | 130305s2011 ad|| |||| 00||| eng d | ||
020 | |a 9781934356456 |9 978-1-934356-45-6 | ||
020 | |a 193435645X |9 1-934356-45-X | ||
035 | |a (OCoLC)835330798 | ||
035 | |a (DE-599)BVBBV040796784 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-703 |a DE-384 | ||
084 | |a ST 230 |0 (DE-625)143617: |2 rvk | ||
100 | 1 | |a Parr, Terence |e Verfasser |0 (DE-588)139999906 |4 aut | |
245 | 1 | 0 | |a Language implementation patterns |b create your own domain-specific and general programming languages |c Terence Parr |
250 | |a P3.0 printing, Version: 2011-7-13 | ||
264 | 1 | |a Raleigh, NC [u.a.] |b Pragmatic Bookshelf |c 2011 | |
300 | |a XIX, 374 S. |b Ill., graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a The pragmatic programmers | |
650 | 0 | 7 | |a Implementierung |g Informatik |0 (DE-588)4026663-1 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Programmiersprache |0 (DE-588)4047409-4 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Domänenspezifische Programmiersprache |0 (DE-588)7585264-0 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Programmiersprache |0 (DE-588)4047409-4 |D s |
689 | 0 | 1 | |a Implementierung |g Informatik |0 (DE-588)4026663-1 |D s |
689 | 0 | |5 DE-604 | |
689 | 1 | 0 | |a Domänenspezifische Programmiersprache |0 (DE-588)7585264-0 |D s |
689 | 1 | |5 DE-604 | |
856 | 4 | 2 | |m Digitalisierung UB Bayreuth |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=025776968&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-025776968 |
Datensatz im Suchindex
_version_ | 1804150132649754624 |
---|---|
adam_text | (Ments
Acknowledgments
xi
Preface
xiii
What to Expect from This Book
.................. xiv
How This Book Is Organized
................... xv
What You ll Find in the Patterns
................. xvi
Who Should Read This Book
................... xvi
How to Read This Book
...................... xvii
Languages and Tools Used in This Book
............ xviii
I Getting Started with Parsing
1
1
Language Applications Cracked Open
3
1.1
The Big Picture
....................... 3
1.2
A Tour of the Patterns
................... 5
1.3
Dissecting a Few Applications
............... 9
1.4
Choosing Patterns and Assembling Applications
.... 17
2
Basic Parsing Patterns
21
2.1
Identifying Phrase Structure
............... 22
2.2
Building Recursive-Descent Parsers
........... 24
2.3
Parser Construction Using a Grammar DSL
...... 26
2.4
Tokenizing Sentences
.................... 27
P.
1.
Mapping Grammars to Recursive-Descent Recognizers
29
P.2.
LUD
Recursive-Descent Lexer
............... 33
P.3.
LUD
Recursive-Descent Parser
.............. 38
P.4.
Щк)
Recursive-Descent Parser
.............. 43
viii
► CONTENTS
3
Enhanced Parsing Patterns
49
3.1
Parsing with Arbitrary Lookahead
............ 50
3.2
Parsing like a Pack Rat
................... 52
3.3
Directing the Parse with Semantic Information
..... 52
P.5. Backtracking Parser
.................... 55
P.6. Memoizing Parser
...................... 62
P.7. Predicated Parser
...................... 68
II Analyzing Languages
71
4
Building Intermediate Form Trees
73
4.1
Why We Build Trees
.................... 75
4.2
Building Abstract Syntax Trees
.............. 77
4.3
Quick Introduction to ANTLR
............... 84
4.4
Constructing ASTs with ANTLR Grammars
....... 86
P.8. Parse Tree
.......................... 90
P.9. Homogeneous AST
..................... 94
P.
10.
Normalized Heterogeneous AST
.............. 96
P.
11.
Irregular Heterogeneous AST
............... 99
5
Walking and Rewriting Trees
101
5.1
Walking Trees and Visitation Order
........... 102
5.2
Encapsulating Node Visitation Code
........... 105
5.3
Automatically Generating Visitors from Grammars
. . 107
5.4
Decoupling Tree Traversal from Pattern Matching
... 110
P.
12.
Embedded Heterogeneous Tree Walker
......... 113
P.
13.
External Tree Visitor
.................... 116
P.
14.
Tree Grammar
........................ 119
P.
15.
Tree Pattern Matcher
.................... 123
6
Tracking and Identifying Program Symbols
131
6.1
Collecting Information About Program Entities
..... 132
6.2
Grouping Symbols into Scopes
.............. 134
6.3
Resolving Symbols
..................... 139
P.
16.
Symbol Table for Monolithic Scope
............ 141
P.
17.
Symbol Table for Nested Scopes
............. 146
7
Managing Symbol Tables for Data Aggregates
155
7.1
Building Scope Trees for Structs
............. 156
7.2
Building Scope Trees for Classes
............. 158
P.
18.
Symbol Table for Data Aggregates
............ 161
P.
19.
Symbol Table for Classes
................. 167
їх
8
Enforcing Static Typing Rules
181
P.
20.
Computing
Staue
Expression Types
........... 184
P.21. Automatic Type Promotion
................. 193
P.22. Enforcing Static Type Safety
................ 201
P.23. Enforcing Polymorphic Type Safety
............ 208
III Building Interpreters
217
9
Building High-Level Interpreters
219
9.1
Designing High-Level Interpreter Memory Systems
. . 220
9.2
Tracking Symbols in High-Level Interpreters
...... 222
9.3
Processing Instructions
.................. 224
P.24. Syntax-Directed Interpreter
................ 225
P.25. Tree-Based Interpreter
................... 230
10
Building
Bytecode
Interpreters
239
10.1
Programming
Bytecode
Interpreters
........... 241
10.2
Defining an Assembly Language Syntax
......... 243
10.3 Bytecode
Machine Architecture
.............. 245
10.4
Where to Go from Here
................... 250
P.26.
Bytecode
Assembler
.................... 252
P.27. Stack-Based
Bytecode
Interpreter
............ 259
P.28. Register-Based
Bytecode
Interpreter
........... 267
IV Translating and Generating Languages
277
11
Translating Computer Languages
279
11.1
Syntax-Directed Translation
................ 281
11.2
Rule-Based Translation
.................. 282
11.3
Model-Driven Translation
................. 284
11.4
Constructing a Nested Output Model
.......... 292
P.
29.
Syntax-Directed Translator
................ 296
P.30. Rule-Based Translator
................... 302
P.31. Target-Specific Generator Classes
............ 308
12
Generating DSLs with Templates
313
12.1
Getting Started with StringTemplate
........... 314
12.2
Characterizing StringTemplate
.............. 317
12.3
Generating Templates from a Simple Input Model
... 318
12.4
Reusing Templates with a Different Input Model
.... 321
CONTENTS
12.5
Using a Tree Grammar to
Create
Templates ...... 324
12.6
Applying Templates to Lists of Data
........... 331
12.7
Building Retargetable Translators
............ 337
13
Putting It All Together
349
13.1
Finding Patterns in Protein Structures
......... 349
13.2
Using a Script to Build
3D
Scenes
............ 350
13.3
Processing XML
....................... 351
13.4
Reading Generic Configuration Files
........... 353
13.5
Tweaking Source Code
................... 354
13.6
Adding a New Type to Java
................ 355
13.7
Pretty Printing Source Code
................ 356
13.8
Compiling to Machine Code
................ 357
A Bibliography
359
Index
361
|
any_adam_object | 1 |
author | Parr, Terence |
author_GND | (DE-588)139999906 |
author_facet | Parr, Terence |
author_role | aut |
author_sort | Parr, Terence |
author_variant | t p tp |
building | Verbundindex |
bvnumber | BV040796784 |
classification_rvk | ST 230 |
ctrlnum | (OCoLC)835330798 (DE-599)BVBBV040796784 |
discipline | Informatik |
edition | P3.0 printing, Version: 2011-7-13 |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01741nam a2200409 c 4500</leader><controlfield tag="001">BV040796784</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">00000000000000.0</controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">130305s2011 ad|| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781934356456</subfield><subfield code="9">978-1-934356-45-6</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">193435645X</subfield><subfield code="9">1-934356-45-X</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)835330798</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV040796784</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-703</subfield><subfield code="a">DE-384</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 230</subfield><subfield code="0">(DE-625)143617:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Parr, Terence</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)139999906</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Language implementation patterns</subfield><subfield code="b">create your own domain-specific and general programming languages</subfield><subfield code="c">Terence Parr</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">P3.0 printing, Version: 2011-7-13</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Raleigh, NC [u.a.]</subfield><subfield code="b">Pragmatic Bookshelf</subfield><subfield code="c">2011</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XIX, 374 S.</subfield><subfield code="b">Ill., graph. Darst.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">The pragmatic programmers</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Implementierung</subfield><subfield code="g">Informatik</subfield><subfield code="0">(DE-588)4026663-1</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Programmiersprache</subfield><subfield code="0">(DE-588)4047409-4</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Domänenspezifische Programmiersprache</subfield><subfield code="0">(DE-588)7585264-0</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Programmiersprache</subfield><subfield code="0">(DE-588)4047409-4</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">Implementierung</subfield><subfield code="g">Informatik</subfield><subfield code="0">(DE-588)4026663-1</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">Domänenspezifische Programmiersprache</subfield><subfield code="0">(DE-588)7585264-0</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Bayreuth</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=025776968&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-025776968</subfield></datafield></record></collection> |
id | DE-604.BV040796784 |
illustrated | Illustrated |
indexdate | 2024-07-10T00:34:04Z |
institution | BVB |
isbn | 9781934356456 193435645X |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-025776968 |
oclc_num | 835330798 |
open_access_boolean | |
owner | DE-703 DE-384 |
owner_facet | DE-703 DE-384 |
physical | XIX, 374 S. Ill., graph. Darst. |
publishDate | 2011 |
publishDateSearch | 2011 |
publishDateSort | 2011 |
publisher | Pragmatic Bookshelf |
record_format | marc |
series2 | The pragmatic programmers |
spelling | Parr, Terence Verfasser (DE-588)139999906 aut Language implementation patterns create your own domain-specific and general programming languages Terence Parr P3.0 printing, Version: 2011-7-13 Raleigh, NC [u.a.] Pragmatic Bookshelf 2011 XIX, 374 S. Ill., graph. Darst. txt rdacontent n rdamedia nc rdacarrier The pragmatic programmers Implementierung Informatik (DE-588)4026663-1 gnd rswk-swf Programmiersprache (DE-588)4047409-4 gnd rswk-swf Domänenspezifische Programmiersprache (DE-588)7585264-0 gnd rswk-swf Programmiersprache (DE-588)4047409-4 s Implementierung Informatik (DE-588)4026663-1 s DE-604 Domänenspezifische Programmiersprache (DE-588)7585264-0 s Digitalisierung UB Bayreuth application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=025776968&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Parr, Terence Language implementation patterns create your own domain-specific and general programming languages Implementierung Informatik (DE-588)4026663-1 gnd Programmiersprache (DE-588)4047409-4 gnd Domänenspezifische Programmiersprache (DE-588)7585264-0 gnd |
subject_GND | (DE-588)4026663-1 (DE-588)4047409-4 (DE-588)7585264-0 |
title | Language implementation patterns create your own domain-specific and general programming languages |
title_auth | Language implementation patterns create your own domain-specific and general programming languages |
title_exact_search | Language implementation patterns create your own domain-specific and general programming languages |
title_full | Language implementation patterns create your own domain-specific and general programming languages Terence Parr |
title_fullStr | Language implementation patterns create your own domain-specific and general programming languages Terence Parr |
title_full_unstemmed | Language implementation patterns create your own domain-specific and general programming languages Terence Parr |
title_short | Language implementation patterns |
title_sort | language implementation patterns create your own domain specific and general programming languages |
title_sub | create your own domain-specific and general programming languages |
topic | Implementierung Informatik (DE-588)4026663-1 gnd Programmiersprache (DE-588)4047409-4 gnd Domänenspezifische Programmiersprache (DE-588)7585264-0 gnd |
topic_facet | Implementierung Informatik Programmiersprache Domänenspezifische Programmiersprache |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=025776968&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT parrterence languageimplementationpatternscreateyourowndomainspecificandgeneralprogramminglanguages |