COBOL85 Grammar from Autom Software ...

Paul Mann <autom@earthlink.net>
6 Jan 1998 22:42:03 -0500

          From comp.compilers

Related articles
More Cobol grammars mkgardne@rtsl3.cs.uiuc.edu (Mark K. Gardner) (1998-01-05)
COBOL85 Grammar from Autom Software ... autom@earthlink.net (Paul Mann) (1998-01-06)
| List of all articles for this month |

From: Paul Mann <autom@earthlink.net>
Newsgroups: comp.compilers
Date: 6 Jan 1998 22:42:03 -0500
Organization: EarthLink Network, Inc.
References: 98-01-018
Keywords: Cobol, parse

I searched the Comp.Compiler archives and learned that Cobol85 still
seems to be a problem for parser generators and grammar developers. I
have solved both of these problems.


(1) LRGen 5.0 can handle Cobol85 (3 seconds to generate compressed
matrix parser tables on a pentium 200 machine). It can even handle
much larger grammars.


(2) Cobol85 is about LALR(2) maybe LALR(3) depending on how you deal
with the 'IS' 'ARE' and ',' (commas). By implementing a 3 level
recognizer, I was able to make the phrase structure grammar (level 3)
LALR(1). I had a Lexical grammar (level 1) for the tokens and a
SuperLex grammar (level 2) for the phrases, (FILE IS SEQUENTIAL, FILE
SEQUENTIAL, SEQUENTIAL, etc.) I spelled out all possible combinations
in the SuperLex grammar and in the phrase structure grammar I used the
complete phrase (FILE_IS_SEQUENTIAL, etc.) This worked out very well.
One more thing, I ignored 'IS', 'ARE', and ',' (commas) -- they never
got to level 2.


The grammars are currently in a password protected directory, because
I wanted to know if anybody was accessing my website. I'm kind of new
to the idea of just giving stuff away to unknowns who don't even email
me. I'll probably, be nice and give you the password, if you email
me. Introduce yourself, get me a job, or something.


I was planning to go after the Year-2000 problem with Cobol85, but
it's more involved than just grammar issues, so I guess you can have
the grammars. If you get rich off this stuff, could you send my a few
hundred dollars??


Paul Mann
autom@earthlink.net
http://www.earthlink.net/~autom










--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.