Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Cobol Misc > Re: New Cobol c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 13 Topic 91 of 183
Post > Topic >>

Re: New Cobol compiler written in Cobol

by "William M. Klein" <wmklein@[EMAIL PROTECTED] > Jan 28, 2005 at 09:13 PM

"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
 




 13 Posts in Topic:
New Cobol compiler written in Cobol
Paul Robinson <paul@[E  2005-01-28 14:54:40 
Re: New Cobol compiler written in Cobol
Donald Tees <donald_te  2005-01-28 10:16:35 
Re: New Cobol compiler written in Cobol
"JerryMouse" &l  2005-01-28 11:11:05 
Re: New Cobol compiler written in Cobol
Paul Robinson <paul@[E  2005-01-28 17:38:41 
Re: New Cobol compiler written in Cobol
"Chuck Stevens"  2005-01-28 12:01:17 
Re: New Cobol compiler written in Cobol
"William M. Klein&qu  2005-01-28 20:53:33 
Re: New Cobol compiler written in Cobol
"William M. Klein&qu  2005-01-28 21:13:30 
Re: New Cobol compiler written in Cobol
Joe Zitzelberger <joe_  2005-01-28 18:04:31 
Re: New Cobol compiler written in Cobol
"steve.t" <s  2005-01-29 21:44:50 
Re: New Cobol compiler written in Cobol
"JerryMouse" &l  2005-02-01 19:39:37 
Re: New Cobol compiler written in Cobol
David Flick <df@[EMAIL  2005-01-31 12:46:04 
Re: New Cobol compiler written in Cobol
"Richard" <r  2005-01-31 11:01:03 
Re: New Cobol compiler written in Cobol
"Richard" <r  2005-02-01 17:50:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 1:53:09 CDT 2008.