From: Eric B. <er...@be...> - 2018-01-22 02:35:46
|
On 12/21/2017 22:45, Berend de Boer wrote: > For a long time I haven't been able to compile xplain2sql with > gobo. The error messages do not really indicate what to do to fix the > problem. > > Here's the output: > > xplain2sql/src# geant compile_ge > Parser contains 1 shift/reduce conflict and 3 reduce/reduce conflicts. > > [CATCALL] class SQL_GENERATOR_TSQL65 (ANY,95,8): type 'STRING_8' of > actual argument #1 does not conform to type 'UC_STRING' of formal > argument in feature `is_equal' in class 'UC_STRING' [...] > The location of the error is irrelevant it seems, it complaints about > the ANY class. But I can't find the actual problem. Catcall errors detected through dynamic type set analysis are not easy to report because they depend on several factors. From the errors, I can see that in class SQL_GENERATOR_TSQL65 (or one of its ancestors) you are calling `equal (x, y)' where `x' might be attached to an object of type UC_STRING and `y' may be attached to an object of type STRING. I can see that you make many of such calls in class SQL_GENERATOR. I suggest that you replace these calls by `STRING_.same_string (x, y)' where `STRING_' is inherited from KL_IMPORTED_STRING_ROUTINES. Note that the catcall errors reported by 'gec' are just potential catcalls. If you can compile without such errors you are guaranteed that no catcall will occur at runtime. But even if you get such errors, it does not mean that catcall will occur at runtime. So, alternatively you can use the compilation option --catcall=no when compiling with 'gec'. It will not report catcall errors at compile time, but will raise an exception if one occurs at runtime. (I didn't check, but this option might only be support on the command-line, not through Xace. We might be able to configure it in eiffel.eant though, with some variable instead of hard-coding 'catcall="error"'.) > I have been unable to enable catcalls in ISE Eiffel, I don't think > there is an option for that in system.xace. The catcall detection mechanism in ISE Eiffel is different than the one in Gobo. It's not based of dynamic type set analysis but on the use of keywords when declaring Eiffel entities in the class text. It makes error messages easier to understand, but it will reject more code that with Gobo and it requires to edit nearly all classes to add these keywords (same kind of effort at the one to convert a non-void-safe library to void-safety). -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |