Package eu.bandm.tools.umod
Class Reducer
java.lang.Object
eu.bandm.tools.tdom.runtime.BaseVisitor
eu.bandm.tools.umod.absy.Visitor
eu.bandm.tools.umod.Reducer
- All Implemented Interfaces:
PCDataVisitor
public final class Reducer
extends eu.bandm.tools.umod.absy.Visitor
ATTENTION:
umod.g reserved words (like "TOPLEVEL") are excluded from being used as class identifiers ONLY by the umod.g lexer (viaIDENT_UPPER options { testLiterals = true ; } . Therefore
one will get rather obscure syntax errors when trying to use them
as (class definition) identifier.
In conntrast: java reservered words (like "class") are excluded explicitly and lead to an explicit error message.
umod.g reserved words (like "TOPLEVEL") are excluded from being used as class identifiers ONLY by the umod.g lexer (via
In conntrast: java reservered words (like "class") are excluded explicitly and lead to an explicit error message.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected UMod.FieldDef
(package private) List<UMod.ClassDef>
protected UMod.Forest
(package private) String
protected LocationMap<NoDocumentIdentifier,
XMLDocumentIdentifier> (package private) List<UMod.IfaceDef>
protected boolean
<!ELEMENT toplevelclass (classdecl)>
<!ELEMENT classextension (classdecl)>
protected eu.bandm.tools.umod.absy.Element_singletype
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>>
protected final Integer
static final Pattern
static final String
protected UMod.Type
(package private) boolean
(package private) boolean
(package private) boolean
(package private) String
(package private) int
(package private) boolean
(package private) boolean
(package private) boolean
Fields inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
validating
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
copylocation
(TypedElement<?, ?> el, UMod.Item it) protected UMod.ClassDef
find_subclass
(UMod.ClassDef sup, String name) protected UMod.FieldDef
protected String
ident_PCData
(eu.bandm.tools.umod.absy.Element_ident el) <!ELEMENT extdecl (sourceonly?, ident, extinstantiation) >
<!ELEMENT extinstantiation (absoluteref, extinstantiation*) >
//A < B, C<D> >
<!ELEMENT ident (ident_lower | ident_upper)
protected Location<NoDocumentIdentifier>
intoString
(int start, int length) protected UMod.ClassDef
protected void
protected void
static UMod.Forest
reduce
(UMod.Forest in_forest, eu.bandm.tools.umod.absy.Document_modeltree el, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg0) protected void
storeDocumentation
(UMod.Item target, eu.bandm.tools.umod.absy.Element_doctext doc) protected void
synterror
(Location<XMLDocumentIdentifier> loc, String txt) void
visit
(eu.bandm.tools.umod.absy.Element_algebraic e0) void
visit
(eu.bandm.tools.umod.absy.Element_classdecl e0) void
visit
(eu.bandm.tools.umod.absy.Element_classextension e0) void
visit
(eu.bandm.tools.umod.absy.Element_classleveljava e0) void
visit
(eu.bandm.tools.umod.absy.Element_cross e0) void
visit
(eu.bandm.tools.umod.absy.Element_enumdef e0) <!ELEMENT enumdef (ident_upper, doctext?, enumitems) >
<!ELEMENT enumitem (ident, doctext?) >
void
visit
(eu.bandm.tools.umod.absy.Element_extdecl el) void
visit
(eu.bandm.tools.umod.absy.Element_extendexternal e0) void
visit
(eu.bandm.tools.umod.absy.Element_fielddef e0) <!ELEMENT fielddef (ident_lower, abstractfield?, type, initvalue?, pragmas?, doctext?) >
void
visit
(eu.bandm.tools.umod.absy.Element_fielddocu e0) <!ELEMENT fielddocu (ident_lower, doctext) >
void
visit
(eu.bandm.tools.umod.absy.Element_fieldref e0) <!ELEMENT fieldref (ident_lower, pragmas)>
void
visit
(eu.bandm.tools.umod.absy.Element_formatdef e0) void
visit
(eu.bandm.tools.umod.absy.Element_ident_upper e0) void
visit
(eu.bandm.tools.umod.absy.Element_iface e0) void
visit
(eu.bandm.tools.umod.absy.Element_impllist e0) void
visit
(eu.bandm.tools.umod.absy.Element_indent e0) void
visit
(eu.bandm.tools.umod.absy.Element_interfaces e0) void
visit
(eu.bandm.tools.umod.absy.Element_j_abstract e0) void
visit
(eu.bandm.tools.umod.absy.Element_mapto e0) void
visit
(eu.bandm.tools.umod.absy.Element_modeltree e0) Toplevel reducer.void
visit
(eu.bandm.tools.umod.absy.Element_ordered e0) void
visit
(eu.bandm.tools.umod.absy.Element_plus e0) void
visit
(eu.bandm.tools.umod.absy.Element_relto e0) void
visit
(eu.bandm.tools.umod.absy.Element_singletype e0) void
visit
(eu.bandm.tools.umod.absy.Element_toplevelclass e0) void
visit
(eu.bandm.tools.umod.absy.Element_topleveljava e0) <!ELEMENT tostring (javablock)>
<!ELEMENT classleveljava (javablock)>
<!ELEMENT topleveljava (javablock)>
<!ELEMENT javablock (#PCDATA)>
void
visit
(eu.bandm.tools.umod.absy.Element_tostring e0) void
visit
(eu.bandm.tools.umod.absy.Element_type el) <!ELEMENT type (type_opt, ((cross, type_opt) | (mapto, type_opt))*) >
void
visit
(eu.bandm.tools.umod.absy.Element_type_atom.Choice_1_Alt_2 e0) <!ELEMENT type_atom (type_builtin | (t_power, type) | (t_seq, type) | (t_map, type, type) | typeref) >
void
visit
(eu.bandm.tools.umod.absy.Element_type_atom.Choice_1_Alt_3 e0) void
visit
(eu.bandm.tools.umod.absy.Element_type_atom.Choice_1_Alt_4 e0) void
visit
(eu.bandm.tools.umod.absy.Element_type_atom.Choice_1_Alt_5 e0) void
visit
(eu.bandm.tools.umod.absy.Element_type_opt e0) void
visit
(eu.bandm.tools.umod.absy.Element_typedef e0) void
visit
(eu.bandm.tools.umod.absy.Element_typeref e0) void
visit
(eu.bandm.tools.umod.absy.Element_visitordecl e0) Methods inherited from class eu.bandm.tools.umod.absy.Visitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
Methods inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
visit
-
Field Details
-
predefinedTypes
-
curforest
-
msg
-
curmodname
String curmodname -
ifacestack
List<UMod.IfaceDef> ifacestack -
classstack
List<UMod.ClassDef> classstack -
visitnum
int visitnum -
visitnam
String visitnam -
visitmult
boolean visitmult -
visitrew
boolean visitrew -
visitrew_multi
boolean visitrew_multi -
visitcorew
boolean visitcorew -
visitprinter
boolean visitprinter -
visitbrowser
boolean visitbrowser -
iscontinuation
protected boolean iscontinuation<!ELEMENT toplevelclass (classdecl)>
<!ELEMENT classextension (classdecl)>
<!ELEMENT classdecl (indent*, ident_upper, j_abstract?, algebraic?, ordered? ("EXTENDS" t_ext)? impllist?, (fielddef | fieldref | tostring | formatdef | classleveljava | topleveljava)*)
-
NULLPOSITION
-
formatloc
-
typeresult
-
actfield
-
STRING_lrcode_separator
- See Also:
-
PATTERN_lrcode
-
lastType
protected eu.bandm.tools.umod.absy.Element_singletype lastType
-
-
Constructor Details
-
Reducer
public Reducer()
-
-
Method Details
-
lastinstack
-
copylocation
-
synterror
-
putDef
-
reduce
public static UMod.Forest reduce(@Opt UMod.Forest in_forest, eu.bandm.tools.umod.absy.Document_modeltree el, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg0) -
visit
public void visit(eu.bandm.tools.umod.absy.Element_modeltree e0) Toplevel reducer.<!ELEMENT modeltree (ident_upper, doctext?, modlines)>
<!ELEMENT modlines (visitordecl | extdecl | toplevelclass | classextension | typedef | interfaces | enumdef)+ >
- Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
storeDocumentation
-
ident_PCData
<!ELEMENT extdecl (sourceonly?, ident, extinstantiation) >
<!ELEMENT extinstantiation (absoluteref, extinstantiation*) >
//A < B, C<D> >
<!ELEMENT ident (ident_lower | ident_upper)
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_extdecl el) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_visitordecl e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_typedef e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_enumdef e0) <!ELEMENT enumdef (ident_upper, doctext?, enumitems) >
<!ELEMENT enumitem (ident, doctext?) >
- Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_interfaces e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_iface e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_indent e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_ident_upper e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_toplevelclass e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_classextension e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
find_subclass
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_classdecl e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
patchPragmas
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_impllist e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_extendexternal e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_j_abstract e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_algebraic e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_ordered e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_topleveljava e0) <!ELEMENT tostring (javablock)>
<!ELEMENT classleveljava (javablock)>
<!ELEMENT topleveljava (javablock)>
<!ELEMENT javablock (#PCDATA)>
- Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_classleveljava e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_tostring e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
intoString
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_formatdef e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_fielddocu e0) <!ELEMENT fielddocu (ident_lower, doctext) >
- Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_fielddef e0) <!ELEMENT fielddef (ident_lower, abstractfield?, type, initvalue?, pragmas?, doctext?) >
- Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
findfield
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_fieldref e0) <!ELEMENT fieldref (ident_lower, pragmas)>
- Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_type el) <!ELEMENT type (type_opt, ((cross, type_opt) | (mapto, type_opt))*) >
- Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_singletype e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_type_opt e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_cross e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_mapto e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_relto e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_plus e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_type_atom.Choice_1_Alt_2 e0) <!ELEMENT type_atom (type_builtin | (t_power, type) | (t_seq, type) | (t_map, type, type) | typeref) >
- Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_type_atom.Choice_1_Alt_3 e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_type_atom.Choice_1_Alt_4 e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_type_atom.Choice_1_Alt_5 e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-
visit
public void visit(eu.bandm.tools.umod.absy.Element_typeref e0) - Overrides:
visit
in classeu.bandm.tools.umod.absy.Visitor
-