"Paul Robinson" <paul@[EMAIL PROTECTED]
> wrote in message
news:BMuKd.9$iD.7@[EMAIL PROTECTED]
> JerryMouse wrote:
>> Paul Robinson wrote:
>>
<snip
>
> Maybe I'm missing something - or deluding myself - but I think that
seems
> extremely high. 800,000 lines of code seems to indicate an application
that
> is far too complex or possibly much of the code is generated by other
programs
> from specifications instead of written to handle compilation of one or
more
> Cobol source program files. Or maybe I'm just a little bit brighter than
I
> thought I was.
You might (probably) could create an '85 Standard intermediate level
compiler
(not including code generation) in COBOL (with extensions - so you
couldn't
compile itself) in under 800,000 lines. HOWEVER, if you go for a full
high-level '85 Standard compiler (no optional modules) with just the "most
common" extensions, then I think it would certainly take that many lines
(at
least).
I assume that your goal would be to make the compiler such that it could
compile
itself. To do so, I would say that you need many/most of the extensions
(to the
'85 Standard) added for "C-ification" in the '02 Standard. This includes
such
things as:
Pointers (possibly procedure-pointers and function-pointers)
"true binary" (no truncation according to picture clause)
Bit-manipulation
Possibly "call-conventions" (to interact with operating system
routines)
If you include the '89 Standard Intrinsic Functions, there are things that
I
have (yet) to figure out how they could be done in COBOL (even with the
'02
Standard), e.g.
Compute Which-Item = Function Ord-Max (table1 (all) table2 (all))
where the elementary items in table1 and table2 are NOT the same data
definition
and either or both are ODOs.
As far as "common" extensions, the history of COBOL and the influence of
IBM (in
the past at least) makes me think that you should look at their current
extensions listed at:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR20/APPENDIX1.1
I would say that MOST (at least of the non-OO stuff) is available in many
of the
PC/Linux/Unix compilers available today, e.g. Micro Focus, Realia, and
Fujitsu -
and to a lesser extent AcuCOBOL and RM.
The X/Open extensions (such as LINE SEQUENTIAL and concatenation of
literals)
are medium common too (and used). I would not personally go with Screen
Section/Accept/Display *UNLESS* you are targeting a "UNIX" type
environment.
Personally, I would go (at least initially) with someone ELSE's indexed
file
system (e.g. BTrieve) and someone else's SQL (even if this would cost the
user
more).
Internationalization is a BIGGIE in the '02 Standard (including LOCALE
sup****t
as well as PIC N and various other stuff). Unless you get funding from
somewhere requiring it, I wouldn't do it in a first release.
Unless you decide to create your compiler using OO, I would not put in
the OO
sup****t initially. This certainly should be a goal to be "real world"
product,
but I just don't see it being what the typical $100 COBOL programmer
wants. (I
could be mistaken on this - and this forum probably won't agree - but it
my
perception.)
Have you looked at Kobol? I don't *think* it has been all that
successful, so
you would need to figure out what you had to offer that they don't. This,
of
course assumes you are thinking of doing this as a "business" not as a
hobby or
"gift to the community".
***
Finally, Although I don't think I could help too much with writing the
compiler,
I would be happy to create test cases for you.
--
Bill Klein
wmklein <at> ix.netcom.com


|