Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!think!samsung!usc!wuarchive!mailrus!ames!uhccux!munnari.oz.au!goanna!pnm From: pnm@goanna.oz.au (Paul Big-Ears Menon) Newsgroups: comp.lang.eiffel Subject: Eiffel Problems, Problems, Problems Keywords: Problems Message-ID: <2983@goanna.oz.au> Date: 14 Mar 90 22:47:55 GMT Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 117 hi, I am having a few problems with Eiffel, and as it appears - some of them relate to the compiler/code generator (I won't bore you with MY probs). Four problems... ********************** Problem 1 Eiffel's behaviour changes dramatically when using the Garbage Collector. ie, it bombs. For instance, using the default checking options & optimse, I get the lex example working fine. I add Garbage Collection into my .eiffel file and BAM! this results.. ////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ godzilla 32% eiffel_scan.garbage eiffel_l^R eiffel_scan.garbage eiffel_scan.e Warning: some tokens can be recognized by "div" and by ~('a'..'z') *(~('a'..'z') |'_'|'0'..'9'). The second one has priority. Warning: some tokens can be recognized by "mod" and by ~('a'..'z') *(~('a'..'z') |'_'|'0'..'9'). The second one has priority. Scanning file ` System execution failed. Below is the sequence of recorded exceptions: -------------------------------------------------------------------------------- Object Class Routine Nature of exception Effect -------------------------------------------------------------------------------- 100C68A0 STD_FILES putstring External event: Segmentation violation. Fail 100263F8 EIFFEL_SCAN create External event: Segmentation violation. Fail -------------------------------------------------------------------------------- 100263F8 EIFFEL_SCAN create External event: Segmentation violation. Fail -------------------------------------------------------------------------------- 4.6u 1.0s 0:08 65% godzilla 33% /////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Is the Garbage collector doing something crazy? Has someone got this to work with Garbage Collection on? Can GC be trusted? Are the garbage collectors on strike? ******************************** Problem 2. I think it was to do with the lex example, I've had to change string.e in the kernel lib, otherwise the program would go off the deep end (of file), it wasn't picking up the EOF token. //////////////////////\\\\\\\\\\\\\\\\\\\\\\\ item_code (i: INTEGER): INTEGER is -- Ascii code of character at position i require index_large_enough: i > 0 ; index_small_enough: i <= count external give_code: INTEGER language "C"; toc: INTEGER language "C" do Result := give_code (i, toc (area)); -- -- RMIT FIX (ok! hack) 19/12/89 -- if Result > 127 then Result := -1 end -- if end; -- item_code //////////////////////\\\\\\\\\\\\\\\\\\\\\\\ My questions are, * should the hack be here... (string.e) or in the C file (toc/give_code1)? * Is the hack valid? ie what about the char codes twixt 128 and 254? Note: the C external "toc" appears in problems 1 and 2. ****************** Problem 3 When trying to find the source of these errors (err.. and others), I used the debugging (viewing) facilities provided. Please correct me if I'm missing something, but do I have to recompile my program *everytime* I insert a new "breakpoint", or delete an unwanted one? If so, this is not a very productive tool, in fact it's quite painful! ****************** Problem 4 The tester - et. How do I "Create" an object which takes arguments? Or will this disappear with "Create's" change of status in the near future? *********************** We have Eiffel v 2.2B running on Personal Irises. Note: We did have a few other probs with 2.2A - these were rectified in the next version. Any help will be treasured, Thankyou, Paul Menon, Dept of Computer Science, Royal Melbourne Institute of Technology, 124 Latrobe Street, Melbourne 3001, Victoria, Australia. PH: +61 3 660 3209 pnm@goanna.cs.rmit.OZ.AU