| Interface | Description |
|---|---|
| Compare |
| Class | Description |
|---|---|
| Ag |
Attribute grammar, supports >=0 synthesized and inherited attributes.
|
| AgBuffer |
Attribute grammar, supports >=0 synthesized and inherited attributes.
|
| Alternative | |
| Attribute |
An attribute is the type of an attribute instance.
|
| AttributeOccurrence | |
| Attribution |
Attribute function call.
|
| AttributionBuffer |
Attribution function call buffer.
|
| BuiltIn |
Predefined functions usefull for attribution.
|
| Layout |
Helper to translate SemanticsBuffer into Semantics
TODO: merge this functionality into SemanticsBuffer?
|
| Merger |
Stupid data container for CopyBuffer
|
| Node |
Node of the syntax tree.
|
| NodeFactory | |
| Oag |
Ordered attribute grammar.
|
| OagBuilder |
Build visit sequence for ordered attribute grammar.
|
| Occurrence | |
| Partition |
Helper class for OagBuilder
|
| Pusher |
Attribute grammar, supports >=0 synthesized and inherited attributes.
|
| State |
Attribute grammar, supports >=0 synthesized and inherited attributes.
|
| Type |
Type of an attribute.
|
| Visits |
Build visit sequence for ordered attribute grammar.
|
| Exception | Description |
|---|---|
| IllegalLiteral |
Thrown by BuiltIn functions.
|
| SemanticError |
Data types for attribute grammars.
The semantics package defines the Analyser class that can be considered the main class of Mork. An Analyser reads a streams into objects which includes scanning, parsing and attribution.
TODO
o global attribute optimization
o 'global' variable for attribute that occur at most once.
o support different threads for scanning, parsing and attribution?
Attribution might run when scanning blocks on slow input.
o how to get the size of the parsed file
o would be useful to add statistics to Java examples
o do I need an explicit EOF?
o special Variable of the start symbol?
o position variable for arbitrary symbols?
o optimize computation of scanner attributes
o compute position in error situations only
o optimizations
o "parse into abstract syntax"
o compute attributes as early as possible -- and free memory
o improved semantic errors support
o recovery
o compute as may attributes as possible
o declare exception
o the user should have to declare checked exception thrown by
functions
o declare a replace object (or replace function) instead of throwing
an exception
o re-declare unchecked -> checked exception translation,
e.g. IllegalArgumentException -> xyz
o ordered attribute grammars
o sufficiently powerfull
o tests cyclic dependencies at compile-time
o semantics currently implements a kind of AG buffer that can be modified.
An OAG would be a reasonable, efficient and powerfull finalization.
o caveats
o semantic error recovery:
o record failed attributes, i.e. attributes whose computation
failed
o skip calls, that need failed attribute as arguments
o second-level AG functions: use a second OAG
o optimization
o position computation for semantic errors
o remove local copy rules (as generated by the translation section)
o warn about unused attributes
Copyright © 1998–2017 1&1. All rights reserved.