Prof A Olowofoyeku (The African Chief) wrote:
I can't remember whether we have discussed this one before, but would it be possible for GPC to ignore some of the Delphi commands for exception handling - i.e., the "Try", "Except", "Finally" ... "End" blocks (perhaps with a warning that they are ignored/unsupported)?
You mean to treat: try Statements except on ex1 do EH1 on ex2 do EH2 else EHE finally FS end
as begin Statements; FS end
At first glance looks easy. However, we do not want to make `try', `except', `on', `finally' into reserved words. Since for most Pascal instructions prepending identifier to the instruction turns the instruction into illegal code we should be able to parse `try' blocks reserving any words. Still, there are some nasty cases (at least user defined operators cause a problem).
On the other hand we would like do things properly. I would feel guilty putting into the compiler code which just ignores some important aspect of source programs.