AST_ROUNTRIP_ITERATOR.process_object_test_as question

17 views
Skip to first unread message

Jimmy Johnson

unread,
May 14, 2015, 10:28:12 PM5/14/15
to eiffelst...@googlegroups.com
In this procedure from AST_ROUNTRIP_ITERATOR what is the construct represented by the else?  Can you give an example?

Thanks,
jjj

process_object_test_as (l_as: OBJECT_TEST_AS)
do
if l_as.is_attached_keyword then
safe_process (l_as.attached_keyword (match_list))
safe_process (l_as.type)
l_as.expression.process (Current)
safe_process (l_as.as_keyword (match_list))
safe_process (l_as.name)
else
safe_process (l_as.lcurly_symbol (match_list))
safe_process (l_as.name)
safe_process (l_as.type)
l_as.expression.process (Current)
end
end


Emmanuel Stapf

unread,
May 15, 2015, 5:14:03 AM5/15/15
to eiffelst...@googlegroups.com

This is to support the old syntax of the object test which looked like:

 

if {a: X} expr then
end

 

instead of now

 

if attached expr as a then
end

 

Manu

 

--
For more messaging options, visit this group at http://forum.eiffel.com.
Information on the Eiffelstudio project: http://dev.eiffel.com.

Jimmy Johnson

unread,
May 17, 2015, 8:30:40 PM5/17/15
to eiffelst...@googlegroups.com, ma...@eiffel.com
Thanks.  For my project I can ignore that part.

My program reads an ecf file, modifies the path names and locations and writes the new files to the new locations.  It then modifies the eiffel files in the directors and writes those to the new locations.  When I try to compile I get:
     "Missing basic class."     for ANY, BOOLEAN, ... TYPE, ISE_EXCEPTION_MANAGER.

When I add the original "base-safe' library to the modified project I get:
     "Cluster contains conflicting declaration for basic class."

I'm sure I've missed something in my modification of the base-safe.ecf file.  It is below.  Would you mind taking a look.  You can see the modifications.  I've added "pp_" to all the paths.

Thanks,
jjj

<?xml version="1.0"  encoding="ISO-8859-1"?><system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="base" uuid="2A93AF70-EF5E-4124-B6E6-58F8EA62EC72" library_target="base">
<description>Eiffel Base</description>
<target name="base">
<description>FreeELKS: Library of reusable components for Eiffel.
Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt).</description>
<root all_classes="true"></root>
<file_rule>
<exclude>/.svn$</exclude>
</file_rule>
<option warning="true" void_safety="all" namespace="EiffelSoftware.Library">
</option>
<setting name="dotnet_naming_convention" value="true"></setting>
<mapping old_name="REAL" new_name="REAL_32"></mapping>
<mapping old_name="STRING" new_name="STRING_8"></mapping>
<mapping old_name="REAL_REF" new_name="REAL_32_REF"></mapping>
<mapping old_name="INTEGER_REF" new_name="INTEGER_32_REF"></mapping>
<mapping old_name="INTEGER" new_name="INTEGER_32"></mapping>
<mapping old_name="WIDE_CHARACTER" new_name="CHARACTER_32"></mapping>
<mapping old_name="WIDE_CHARACTER_REF" new_name="CHARACTER_32_REF"></mapping>
<mapping old_name="NATURAL" new_name="NATURAL_32"></mapping>
<mapping old_name="DOUBLE_REF" new_name="REAL_64_REF"></mapping>
<mapping old_name="CHARACTER" new_name="CHARACTER_8"></mapping>
<mapping old_name="CHARACTER_REF" new_name="CHARACTER_8_REF"></mapping>
<mapping old_name="DOUBLE" new_name="REAL_64"></mapping>
<assembly name="eiffelsoftware_runtime" location="$ISE_EIFFEL\studio\spec\$ISE_PLATFORM\lib\EiffelSoftware.Runtime.dll"></assembly>
<assembly name="mscorlib" location="$ISE_DOTNET_FRAMEWORK\mscorlib.dll">
<renaming old_name="INTERFACE_TYPE_ATTRIBUTE" new_name="SYSTEM_INTERFACE_TYPE_ATTRIBUTE"></renaming>
<renaming old_name="ENCODING" new_name="SYSTEM_ENCODING"></renaming>
<renaming old_name="THREAD_STATE" new_name="SYSTEM_THREAD_STATE"></renaming>
<renaming old_name="TIMER" new_name="SYSTEM_TIMER"></renaming>
<renaming old_name="WEAK_REFERENCE" new_name="SYSTEM_WEAK_REFERENCE"></renaming>
</assembly>
<assembly name="system_" location="$ISE_DOTNET_FRAMEWORK\System.dll" prefix="SYSTEM_DLL_"></assembly>
<assembly name="system_xml" location="$ISE_DOTNET_FRAMEWORK\System.Xml.dll" prefix="XML_"></assembly>
<cluster name="pp_elks" location="pp_elks" recursive="true">
<option namespace="Base">
</option>
<file_rule>
<exclude>/pp_structures/pp_cursors/pp_linked_cursor_tree_cursor.e$</exclude>
<exclude>/pp_structures/pp_cursor_tree/pp_linked_cursor_tree.e$</exclude>
<exclude>/pp_structures/pp_cursors/pp_two_way_cursor_tree_cursor.e$</exclude>
<exclude>/pp_structures/pp_cursors/pp_compact_tree_cursor.e$</exclude>
<exclude>/pp_structures/pp_cursor_tree/pp_compact_cursor_tree.e$</exclude>
<exclude>/pp_structures/pp_cursor_tree/pp_two_way_cursor_tree.e$</exclude>
</file_rule>
<file_rule>
<exclude>/pp_kernel/pp_console.e$</exclude>
<exclude>/pp_kernel/pp_directory.e$</exclude>
<exclude>/pp_kernel/pp_directory_name.e$</exclude>
<exclude>/pp_kernel/pp_disposable.e$</exclude>
<exclude>/pp_kernel/pp_exceptions.e$</exclude>
<exclude>/pp_kernel/pp_exceptions/pp_exception.e$</exclude>
<exclude>/pp_kernel/pp_exceptions/pp_operating_system_failure.e$</exclude>
<exclude>/pp_kernel/pp_exceptions/pp_operating_system_signal_failure.e$</exclude>
<exclude>/pp_kernel/pp_exceptions/pp_void_target.e$</exclude>
<exclude>/pp_kernel/pp_file.e$</exclude>
<exclude>/pp_kernel/pp_file_name.e$</exclude>
<exclude>/pp_kernel/pp_function.e$</exclude>
<exclude>/pp_kernel/pp_gc_info.e$</exclude>
<exclude>/pp_kernel/pp_ise_runtime.e$</exclude>
<exclude>/pp_kernel/pp_mem_info.e$</exclude>
<exclude>/pp_kernel/pp_memory.e$</exclude>
<exclude>/pp_kernel/pp_native_array.e$</exclude>
<exclude>/pp_kernel/pp_path_name.e$</exclude>
<exclude>/pp_kernel/pp_plain_text_file.e$</exclude>
<exclude>/pp_kernel/pp_pointer.e$</exclude>
<exclude>/pp_kernel/pp_pointer_ref.e$</exclude>
<exclude>/pp_kernel/pp_procedure.e$</exclude>
<exclude>/pp_kernel/pp_raw_file.e$</exclude>
<exclude>/pp_kernel/pp_real_32_ref.e$</exclude>
<exclude>/pp_kernel/pp_real_64_ref.e$</exclude>
<exclude>/pp_kernel/pp_routine.e$</exclude>
<exclude>/pp_kernel/pp_special.e$</exclude>
<exclude>/pp_kernel/pp_storable.e$</exclude>
<exclude>/pp_kernel/pp_stream.e$</exclude>
<exclude>/pp_kernel/pp_string/pp_system_string.e$</exclude>
<exclude>/pp_kernel/pp_string/pp_system_string_factory.e$</exclude>
<exclude>/pp_kernel/pp_type.e$</exclude>
<exclude>/pp_kernel/pp_tuple.e$</exclude>
<exclude>/pp_kernel/pp_file_info.e$</exclude>
<exclude>/pp_kernel/pp_unix_signals.e$</exclude>
<exclude>/pp_support/pp_class_name_translations.e$</exclude>
<exclude>/pp_support/pp_double_math.e$</exclude>
<exclude>/pp_support/pp_execution_environment.e$</exclude>
<exclude>/pp_support/pp_object_graph_marker.e$</exclude>
<exclude>/pp_support/pp_reflector.e$</exclude>
<exclude>/pp_support/pp_reflected_object.e$</exclude>
<exclude>/pp_support/pp_reflected_reference_object.e$</exclude>
<exclude>/pp_support/pp_reflected_copy_semantics_object.e$</exclude>
<exclude>/pp_support/pp_managed_pointer.e$</exclude>
<exclude>/pp_support/pp_mismatch_information.e$</exclude>
<exclude>/pp_support/pp_operating_environment.e$</exclude>
<exclude>/pp_support/pp_single_math.e$</exclude>
<condition>
<dotnet value="true"></dotnet>
</condition>
</file_rule>
</cluster>
<cluster name="pp_ise" location="pp_ise" recursive="true">
<option namespace="Base">
</option>
<file_rule>
<exclude>/pp_dotnet$</exclude>
<condition>
<dotnet value="false"></dotnet>
</condition>
</file_rule>
<file_rule>
<exclude>/pp_kernel/pp_exceptions/pp_ise_exception_manager.e$</exclude>
<exclude>/pp_kernel/pp_exceptions/pp_io_failure.e$</exclude>
<exclude>/pp_kernel/pp_execution_environment_32.e$</exclude>
<exclude>/pp_classic$</exclude>
<condition>
<dotnet value="true"></dotnet>
</condition>
</file_rule>
<file_rule>
<exclude>/pp_runtime$</exclude>
</file_rule>
<cluster name="pp_debug" location="pp_ise/pp_runtime/pp_debug/pp_api" recursive="true">
<file_rule>
<exclude>/pp_dotnet$</exclude>
<condition>
<dotnet value="false"></dotnet>
</condition>
</file_rule>
<file_rule>
<exclude>/pp_classic$</exclude>
<condition>
<dotnet value="true"></dotnet>
</condition>
</file_rule>
</cluster>
<cluster name="pp_debug_implementation" location="pp_ise/pp_runtime/pp_debug/pp_implementation" recursive="true" hidden="true">
<condition>
<build value="workbench"></build>
</condition>
<file_rule>
<exclude>/pp_dotnet$</exclude>
<condition>
<dotnet value="false"></dotnet>
</condition>
</file_rule>
<file_rule>
<exclude>/pp_classic$</exclude>
<condition>
<dotnet value="true"></dotnet>
</condition>
</file_rule>
</cluster>
<cluster name="pp_scoop" location="pp_ise/pp_runtime/pp_scoop" recursive="true" hidden="true">
<condition>
<concurrency value="scoop"></concurrency>
</condition>
<file_rule>
<exclude>/pp_dotnet$</exclude>
<condition>
<dotnet value="false"></dotnet>
</condition>
</file_rule>
<file_rule>
<exclude>/pp_classic$</exclude>
<condition>
<dotnet value="true"></dotnet>
</condition>
</file_rule>
</cluster>
</cluster>
</target>
<target name="base_dotnet" extends="base">
<setting name="msil_generation" value="true"></setting>
</target>
<target name="base_scoop" extends="base">
<setting name="concurrency" value="scoop"></setting>
</target>

</system>

Emmanuel Stapf

unread,
May 21, 2015, 5:51:55 PM5/21/15
to Jimmy Johnson, eiffelst...@googlegroups.com

Hi

 

No need to post twice the same message.

 

As for the issue, my guess is that you have renamed the classes as well? If this is not the case, can you provide a project (ECF + classes) and send it to http://support.eiffel.com for us to review?

 

Thanks,

Manu

Jimmy Johnson

unread,
Jun 7, 2015, 10:23:53 PM6/7/15
to eiffelst...@googlegroups.com, ma...@eiffel.com, jjj...@g.uky.edu
I found out that the compiler does not recognize some classes (e.g. ANY) if the file was renamed.  (The class was not renamed.)  So this problem has been overcome.

jjj

...
Reply all
Reply to author
Forward
0 new messages