home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / ada / 2384 < prev    next >
Encoding:
Text File  |  1992-08-19  |  2.0 KB  |  68 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!caen!sol.ctr.columbia.edu!src.honeywell.com!tap
  3. From: tap@src.honeywell.com (Thomas A Peterson)
  4. Subject: Need new idea to get around sunada 1.0 error
  5. Message-ID: <1992Aug19.185609.10211@src.honeywell.com>
  6. Sender: news@src.honeywell.com (News interface)
  7. Nntp-Posting-Host: socrates.src.honeywell.com
  8. Organization: Honeywell Systems & Research Center
  9. Date: Wed, 19 Aug 1992 18:56:09 GMT
  10. Lines: 56
  11.  
  12. I am using ayacc to develop a parser and have ran into a problem with
  13. the Sun Ada 1.0 compiler returning an internal assertion error.
  14.  
  15. socrates: ada -O0 parser.a
  16. internal: assertion error at file lreg.c, line 174
  17. cg_ret: 1
  18. socrates:
  19.  
  20. Parser.a contains a large case statement that is apparently larger
  21. than what the compiler can handle. I have talked to a Verdix employee
  22. about the problem and he told me to break up the case statement into
  23. smaller case statements but this has not helped.
  24.  
  25. The case statement has 462 case statement alternatives each of which
  26. contains about 3 statements. I have tried three approaches to get
  27. around the problem so far but each still resulted in the same failure.
  28.  
  29. Has anyone else experienced this problem and found a way around it?
  30.  
  31.  1. Broke the single case statement down into about 90 smaller case
  32.     statements, like the following chunk of code.
  33.  
  34.     case x is
  35.     when 1 => statement1;
  36.     when 2 => statement2;
  37.     when 3 => statement3;
  38.     when 4 => statement4;
  39.     when 5 => statement5;
  40.     when others => null;
  41.     end case;
  42.     ...
  43.  
  44.  2. Broke the single case statement down into 461 separate 'if
  45.     statements', like the following chunk of code.
  46.  
  47.     if x = 1 then
  48.       statement1;
  49.     end if;
  50.     if x = 2 then
  51.       statement2;
  52.     end if;
  53.     ...
  54.  
  55.  3. Broke the single case statement down into one 'if then elsif
  56.     statement', like the following chunk of code.
  57.  
  58.     if x = 1 then
  59.       statement1;
  60.     elsif x = 2 then
  61.       statement2;
  62.     ...
  63.     end if;
  64.  
  65. Any suggestions would be very much appreciated.
  66.  
  67. Thanks, Tom
  68.