home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / ada / 2390 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.7 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!sdd.hp.com!elroy.jpl.nasa.gov!ames!pacbell.com!network.ucsd.edu!mvb.saic.com!ast.saic.com!agnew
  2. From: agnew@ast.saic.com (Robert Allen Agnew)
  3. Newsgroups: comp.lang.ada
  4. Subject: Re: Need new idea to get around sunada 1.0 error
  5. Message-ID: <1992Aug20.144730.5463@ast.saic.com>
  6. Date: 20 Aug 92 14:47:30 GMT
  7. References: <1992Aug19.185609.10211@src.honeywell.com>
  8. Sender: news@ast.saic.com
  9. Organization: SAIC
  10. Lines: 32
  11.  
  12. In article <1992Aug19.185609.10211@src.honeywell.com> tap@src.honeywell.com (Thomas A Peterson) writes:
  13. >I am using ayacc to develop a parser and have ran into a problem with
  14. >the Sun Ada 1.0 compiler returning an internal assertion error.
  15. >
  16. >socrates: ada -O0 parser.a
  17. >internal: assertion error at file lreg.c, line 174
  18. >cg_ret: 1
  19. >socrates:
  20. >
  21. >Parser.a contains a large case statement that is apparently larger
  22. >than what the compiler can handle. I have talked to a Verdix employee
  23. >about the problem and he told me to break up the case statement into
  24. >smaller case statements but this has not helped.
  25. >
  26. >The case statement has 462 case statement alternatives each of which
  27. >contains about 3 statements. I have tried three approaches to get
  28. >around the problem so far but each still resulted in the same failure.
  29. >
  30. >Has anyone else experienced this problem and found a way around it?
  31. >
  32. >Any suggestions would be very much appreciated.
  33. >
  34. >Thanks, Tom
  35.  
  36.  
  37. Here's the way I've solved it. It's not efficient, but as I was bootstrapping,
  38. I didn't care! Replace the case statement with two or more procedure calls,
  39. each of which contains a smaller case statement. Extra work at compile time,
  40. but it works in most cases as procedures are compiled with fresh table
  41. allocations in most compilers.
  42.  
  43. agnew@actd.saic.com
  44.