[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnubol: Parse This
Randall Bart wrote:
>
> At 03:28 PM 11/13/99 , Tim Josling wrote:
> >At present the only case for backtracking I have run across is the
> >reference modification/array ambiguity.
>
> A real problem is distinguishing reference modification from an arithmetic
> expression.
True. Added to my test case file.
>
> In my opinion the compiler should crash if it runs out of memory, or a
> resource like a file does not exist. No other limitations.
>
> IMNSHO, a compiler should only "crash" due to system problems beyond it's
> control (corrupted code file, other program corrupting memory, etc). For
> anything else, the compiler should gracefully end with a descriptive error
> message, eg, "Fatal error: Reserved word file is missing".
Definitely a message first - one that means something to the user.
Whether to crash (abort();) or not is controversial. It is nice to have
a core dump.
>
> >IBM's
> >mainframe compiler has an undocumented limit on the number of forward
> >procedure references. These limits can cost people a lot of money.
>
> How big is the limit, and is the error message informative or
> cryptic?
This was a pathological case I guess. I wrote a program that took a huge
DB2 lookup table and converted it into COBOL. It ran 100 times faster,
even compared to preloading the DB2 table into an in-memory lookup
table. The generated program was from distant memory 50,000 - 100,000
lines of code and very dense in forward references - most paragraphs has
only 1 or two lines of executable code, and there were no comments or
blank lines. We had to reorder the paragraphs into reverse order. Later
we had to split it in two because of the 1mb working storage limitation.
Very expensive.
The message was informative, but there was no fix to be had.
Tim Josling
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.