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

gnubol: Re: GNU Project Cobol Compiler



At 11:17 PM 26/04/00, Matthew Vanecek wrote:

>David Essex wrote:
>> 
>> On 26/04/00, Matthew Vanecek wrote:
>> > ...
>> >For Lex and Yacc, I understand the syntax and structure.
>> >Still working on techniques. Trying to make a MySQL SQL
>> >preprocessor towards that end.
>> 
>> Is MySQL released under the GPL license ? Last time I checked it was not.
>
>No, unfortunately not.  It's license is kind of weird and twisted.  But
>I'm familiar with the product.  Actually what I had in mind was a
>wrapper layer which could interface with a variety of database driver
>modules--Postgresql, MySQL, Oracle, whatever.  But I am familiar with
>the MySQL API, so it was a logical place to begin

Yes, that is the way I was thinking of doing it. BTW, have you considered
using one of the ODBC projects as that wrapper layer ?


>> There are several free SQL Lex/Yacc parsers available which could be used
>> as a starting point for an embedded SQL preprocessor.
>> 
>> The one I was looking at, was written by Leroy Cain. It does not do
>> anything other than parse SQL code. It is available on the net, but I
>> forgot were.
>
>Yeah, I'm sure there are.  This project is more for my personal
>aggrandizement, however, rather than for mass consumption--although that
>may come in the future.

Regarding the actual code generation. On I*M mainframes, they use a SQL
pre-processor, which comments all SQL statements from the COBOL source and
generates some extra code. The modified COBOL program and the extra code
are then compiled to create the executable.

I was thinking of a similar solution. Use a pre-processor, which comments
all SQL statements from the COBOL source and generates C code. The SQL
statements in the procedure division would be replaced by sub-program calls
to the generated C code. Anyway that is the basic idea.

Is this a similar approach you were planning to take ? 



David


--
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.