Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Cobol AS/400 hard
Hi all,
because it's very hard to find a complete grammar definition for Cobol
AS/400, I wonder if there is a way for describing a grammar (BNF,
EBNF,...) that tokenize only some specific rules and ignore all the
rest.
Many Thanks
Matteo.

Report this thread to moderator Post Follow-up to this message
Old Post
matteo
07-23-04 01:55 PM


Re: Cobol AS/400 hard
"matteo" <matteom@avanade.com> wrote in message
news:3d89db82.0407230340.45d8eb09@posting.google.com...
> because it's very hard to find a complete grammar definition for Cobol
> AS/400, I wonder if there is a way for describing a grammar (BNF,
> EBNF,...) that tokenize only some specific rules and ignore all the
> rest.

This is called "Island Parsing"  Check out comp.compilers.

The down side to island parsing is
a)  you still have to define
much of the complete languages (e.g., mostly you have
to lex everything, you still have to worry about COPYLIBs
and COPY REPLACING, etc.),
b) often you discover after you get the "islands" of interest
to parse, that to do the job you want done, you have
to go back and expand the islands.  Eventually you
end up with most of the full grammar anway.
c) If you need to know what a name means, then
you pretty much have to do the full grammar,
and you have to have the symbol table.
Most interesting analyses require C anyway.
So we don't see this as really a big win.

However, we've found it pretty effective to take a clean base grammar (e.g.,
ANSI COBOL 85),
and add the differences as defined by reference manuals.

Also in the not-for-free category, too, is our tool,
the DMS Software Reengineering Toolkit.
It has very strong parsers for many languages, including ANSI and VS II
COBOL,
with full symbol table construction.

Lastly, there's lots of tool work needed beyond parsing.
DMS provides means to define analyzers and source-to-source transformers
of the code.

--
Ira D. Baxter, Ph.D., CTO   512-250-1018
Semantic Designs, Inc.      www.semdesigns.com





Report this thread to moderator Post Follow-up to this message
Old Post
Ira Baxter
07-24-04 08:55 PM


Re: Cobol AS/400 hard
Check www.corporola.com. There is a BNF definition for COBOL 74/85 for COBOL
to Java translation.
I think It will cover AS/400.

Thomas

"matteo" <matteom@avanade.com> wrote in message
news:3d89db82.0407230340.45d8eb09@posting.google.com...
> Hi all,
> because it's very hard to find a complete grammar definition for Cobol
> AS/400, I wonder if there is a way for describing a grammar (BNF,
> EBNF,...) that tokenize only some specific rules and ignore all the
> rest.
> Many Thanks
> Matteo.



Report this thread to moderator Post Follow-up to this message
Old Post
Thomas A. Li
07-26-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:07 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.