[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNU-COBOL] Let's go!



First, a train of thought and some resolutions.
Then, please read and respond to the attachments.

Basically I'm ready to work and finding the right tool be damned.
We've been fooling around waffling, what tool should we use to make our lives
easier, when our "lives" have been totally devoid of content anyway!  No tool
is going to make this project write itself.

I take full responsibility for this mess!

I have a strong desire now to see something useful... *anything* useful.  We
will only get a product out if we actually start creating something.

That being said, I have made the following decisions based on the last 6
months of waffling and other assorted input (sorry if I don't remember who
suggested it, or I'd give you credit.)

1.  Write the grammar in bison.  
	It's not beautiful, but it's standard (which we desire) and it works.
2.  Write a custom scanner.
	We will use the standard flex entry points (like yylex) so that
	bison won't be picky.  This is primarily because writing a scanner
	is more fun than fighting with flex.  And if it's fun, stuff gets done.
3.  C-libraries.
	The problem with this area in the past has been extremely vague 
	descriptions of what we want the libraries to do.  ("Make an IO library
	that does fixed width reading and writing.")

	*NOTE* I ENCOURAGE COBOL PEOPLE to help write an interface for this
	library.  Just make a list of the kinds of writing and reading for
	sequential files that you "normally" do in COBOL.
4.  Make a skeleton.
	It was suggested to me that it would be very useful to get a minimal
	functioning skeleton process and slowly add to that.  For example,
	the very bare bones thing I'm thinking of would process:
		ID DIVISION.
		Program-id. blah.

		PROCEDURE DIVISION.
		display "Hello, world!".
		Stop run.
	and produce:
		#include <stdio.h>
		int main() {
			printf("Hello, world.\n");
			return 0;
		}
	I know we had code to do this and more in PCCTS, but I want this same
	stuff in flex/bison.

	I think we can get this dispatched very quickly and move on to more
	interesting things.
5.  Design is dynamic.  
	I have a very general overview of what major sticking points may occur,
	but this time around I'd like to make something that works and enhance
	it or make it better later.  Do the simplest thing that could possibly
	work. :)

I will have a fast link (ok, fast down, only 90Kbps up, sorry. :) next friday
assuming the phone company is on time and on target.  I will be able to host
anonymous CVS, a moo, etc, for this project.  I know there is, in theory,
Anon CVS on acm.cs.umr.edu, but I don't want to rely on something that might
go away soon, since none of us are at school anymore.  (sorry, fischer. :)

For the time being, I will put nightly tarballs on the website (not linked to
for the public to get at yet) at http://www.gnu.org/software/cobol/tmp


REMEMBER!!  This is learning process!  None of us are professional compiler
writers (as far as I can remember).  This is not our full time job.  We're
here to have fun and make something useful (at least, I hope that's why
everybody's involved).  And to be famous! :)

We will only learn by plunging ahead and making mistakes and learning from 
them, we're not going to be able to anticipate all of our problems from where
we sit now.

Let's go, and let's have fun!  Woo Hoo!
laura
-- 
.. Laura Tweedy .. tweedy@umr.edu ..
Grammar pieces, pick one, or I'll assign you one.

ID DIVISION - handled before we get to the parser proper.

ENV DIVISION - not highest priority
	configuration section and special names

DATA DIVISION - 
	working storage section (assume simple pics)
	pics

PROC DIVISION - grouped by what I think is important, suggest changes, if
		you want to
	accept, display, if, stop run
	add, subtract, multiply, divide (minimal at first, no on error, etc)
	perform
I want volunteers to find or write equivalent structures in C for COBOL data
structures.  If you have to make a struct to contain all of the information
COBOL needs, do it.

I want people who know COBOL to take examples of assignments and give their
meaning.  Like MOVE "abc" TO tmp. where tmp is PIC 9.  What does that do?
MOVE "abc" TO tmp. where tmp is PIC X.  What does that do?  Boundary cases
and what the behaviour is.  Some of this may be defined in the standard, but
I want a real human's wording, not that of a committee.

Okay, I need to know the following about everybody who plans to contribute:

Do you...

know C?

know flex? (enough to write a lexer with an example .l file)

know bison/BNF? (as with flex)

know COBOL?

have a copy of the standard?