ABSTRACT SYNTAX TREE. To master the more powerful .NET parser it was necessary to adapt the type definition from the abstract syntax tree (AST). As already mentioned in the previous section, the parser adds an explicit interface member implementation as a private feature to the current type. I extended the class CW_FEATURE with the attribute is_public. When is_public returns false the feature is treated as private. In the GUI application only public types are listed in the assembly tree. An important feature is the attribute overloaded_name that returns the overloaded Eiffel name (name of Eiffel feature when more than one feature in the class has the same name). The attribute is attached to CW_FEATURE. The classes CW_FEATURE_LIST and CW_CREATION_PROCEDURE_LIST handle the assignment of overloaded_name to every feature in the AST. The class CW_TYPE has a new attribute is_by_reference. If a method parameter in the original .NET method is specified with the out or ref keyword, the type of the parameter is a reference type and is_by_reference is set to true. A method can consist of the following kinds of formal parameters: value parameters, reference parameters, output parameters, and parameter arrays. The XML generator stores the structure of the AST in an XML file. In an iterative use the wizard parsed the XML file instead of the .NET assembly to get the internal representation of the Eiffel classes. The structure of the XML file is defined by a document type definition (DTD). This DTD defines the legal building blocks of an XML document. Various tools verify the structure of an XML document against a DTD. Table 23 shows the DTD, changes are marked with a yellow border. <?xml version="1.0" encoding="utf-8"?> <!ELEMENT cw_ast (cw_type+)> <!ELEMENT cw_type (interfaces?, cw_creation_procedures?, cw_attributes?, cw_procedures?, cw_functions?, cw_invariants?)?> <!ELEMENT cw_creation_procedures (cw_creation_procedure)*> <!ELEMENT cw_attributes (cw_attribute)*> <!ELEMENT cw_procedures (cw_procedure)*> <!ELEMENT cw_functions (cw_function)*> <!ELEMENT cw_preconditions (cw_precondition)*> <!ELEMENT cw_postconditions (cw_postcondition)*> <!ELEMENT cw_invariants (cw_invariant)*> <!ELEMENT interfaces (interface)*> <!ELEMENT cw_arguments (cw_argument)*> <!ELEMENT cw_type dotnet_name CDATA #REQUIRED eiffel_name CDATA #REQUIRED namespace CDATA #REQUIRED is_deferred (yes | no) #REQUIRED is_expanded (yes | no) #REQUIRED is_enum (yes | no) #REQUIRED is_interface (yes | no) #REQUIRED > <!ELEMENT cw_creation_procedure (cw_arguments?, cw_preconditions?, cw_postconditions?)?> <!ELEMENT cw_creation_procedure dotnet_name CDATA #REQUIRED eiffel_name CDATA #REQUIRED > <!ELEMENT cw_attribute (type+, cw_preconditions?, cw_postconditions?)?> <!ELEMENT cw_attribute dotnet_name CDATA #REQUIRED eiffel_name CDATA #REQUIRED is_constant (yes | no) #REQUIRED value CDATA #REQUIRED is_static (yes | no) #REQUIRED > <!ELEMENT cw_procedure (cw_arguments?, cw_preconditions?, cw_postconditions?)> <!ELEMENT cw_procedure dotnet_name CDATA #REQUIRED eiffel_name CDATA #REQUIRED is_deferred (yes | no) #REQUIRED is_static (yes | no) #REQUIRED > <!ELEMENT cw_function (cw_arguments?, type+, cw_preconditions?, cw_postconditions?)> <!ATTLIST cw_function dotnet_name CDATA #REQUIRED eiffel_name CDATA #REQUIRED is_deferred (yes | no) #REQUIRED is_static (yes | no) #REQUIRED overloaded_name CDATA #REQUIRED is_public (yes | no) #REQUIRED overloaded_name CDATA #REQUIRED is_public (yes | no) #REQUIRED overloaded_name CDATA #REQUIRED overloaded_name CDATA #REQUIRED is_property (yes | no) #REQUIRED > <!ELEMENT cw_argument (type+)> <!ATTLIST cw_argument dotnet_name CDATA #REQUIRED eiffel_name CDATA #REQUIRED > <!ELEMENT cw_invariant EMPTY> <!ATTLIST cw_invariant tag CDATA #IMPLIED expression CDATA #REQUIRED > <!ELEMENT cw_precondition EMPTY> <!ATTLIST cw_precondition tag CDATA #IMPLIED expression CDATA #REQUIRED > <!ELEMENT cw_postcondition EMPTY> <!ATTLIST cw_postcondition tag CDATA #IMPLIED expression CDATA #REQUIRED > <!ELEMENT interface EMPTY> <!ATTLIST interface dotnet_name CDATA #REQUIRED eiffel_name CDATA #REQUIRED to_string(yes | no) #REQUIRED equals (yes | no) #REQUIRED get_hash_code (yes | no #REQUIRED > <!ELEMENT type EMPTY> <!ATTLIST type dotnet_name CDATA #REQUIRED eiffel_name CDATA #REQUIRED is_array (yes | no) #REQUIRED > is_by_ref (yes | no) #REQUIRED is_public (yes | no) #REQUIRED
Appears in 3 contracts
Sources: Master Thesis, Master Thesis, Master Thesis