[NEXT]
Gentle Handbook
Gentle
Applications
Concepts
Examples
Handbook
Support
Download
Friedrich Wilhelm Schröer
The GENTLE
Compiler Construction
System
R. Oldenbourg Verlag, Munich and Vienna, 1997
ISBN 3-486-24703-4
Download this book as PDF file
TABLE OF CONTENTS
Preface (2005)
Preface (1997)
GENTLE PRIMER
At a Glance
A Parser for Expressions
A Calculator
Abstract Syntax
Translating Concrete Syntax into Abstract Syntax
Traversal
Transformation
Code Generation
Elements of Specifications
Describing Data
Terms
Type Definitions
Using Terms in Expressions and Patterns
Numbers and Strings
Describing Computations
Invocations and Rules
Failure
Expressions and Patterns
Rule Bodies
Variables
Evaluation Strategy
Shallow Backtracking
Predicate Declarations
Conditions and Actions
Describing Syntax
Syntax Definitions
Nonterm Predicates
Token Predicates
Attributes
Actions in Grammar Rules
Rule Selection
Abstract Syntax
Source Coordinates
Using Types and Predicates Written in C
External Types
External Predicates
Handling Global Information
Handling Mutable Information
Control Structures
The Alternative Statement
Dataflow
The Predicate
where
Disjunctions
The Conditional Statement
Using Alternative and Conditional Statements
Smart Traversal
Default Rule
Broadcasted Parameter
Threaded Parameter
Optimal Rule Selection
Code Generation for Expressions
A Stack Computer
Unparsing
A Computer with an Accumulator
A Combined Stack and Accumulator Computer
Nondeterministic Unparsing
A Code-Generator Specification
Cost-Driven Rule Selection
Using Output Parameters
The Two Processing Phases
Well-formed Rules
Special Patterns and Expressions
Joker
Named Patterns
Type Prefixes
A Summary of Predefined Predicates
The Predicates
eq
,
ne
,
lt
,
le
,
ge
,
gt
The Predicate
print
The Predicate
where
The Predicate
@
Organizing Larger Projects
The Module Name
The Use Clause
The Export Clause
The Root Module
GETTING STARTED
Installation
A First Example
Generating a Compiler
LANGUAGE REFERENCE MANUAL
Introduction
Syntax and Vocabulary
Specifications
Types
Expressions
Patterns
Predicates
Context Variables
Context Tables
Members
Root Definition
Modules
Predicate Categories
Predefined Predicates
Syntax Summary
REFLEX REFERENCE MANUAL
Introduction
How To Describe a Token
How To Describe Layout and Comments
Usage
Output
LIBRARY REFERENCE MANUAL
Introduction
Module
main
Module
errmsg
Module
idents
Module
output
Module
strings
Implementing Types and Predicates in C
CASE STUDY
The Source Language
Summary of the Language
Notation, Terminology, and Vocabulary
Data Types
Declarations and Denotations of Variables
Expressions
Statements
Input and Output
Programs
The Target Machine
The ICode Machine
ICode Instructions
The Compiler
Overall Structure
Abstract Syntax
Concrete Syntax
Translating Procedures
Translating Statements
Translating Expressions
Translating Designators
Scope Handling
Auxiliary Predicates
Target Interface
References
[NEXT]