Related articles |
---|
Tools for building a Cobol compiler vadik@cs.umd.edu (1995-02-17) |
Newsgroups: | comp.lang.cobol,comp.compilers |
From: | vadik@cs.umd.edu (Vadim Maslov) |
Keywords: | Cobol, yacc, tools |
Organization: | U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 |
References: | <792615719snz@minfo.demon.co.uk> <3hvsql$ll2@gnat.cs.nyu.edu> |
Date: | Fri, 17 Feb 1995 02:20:52 GMT |
Robert Dewar <dewar@cs.nyu.edu> wrote:
>THe kind of problems that Vadim cites in using YACC to compile COBOL are
>typical of the steps you go through making a YACC grammar for any real
>language. COBOL is neither particularly more difficult, not particularly
>more easy than other languages to parse using tools of this type. Similarly
>it is simple enough to use Lexx to do the lexical analysis.
>
>Why of course anyone in this day and age would use such antiquated tools
>as Yacc and Lex to implement anything approaching a real compiler is beyond
>me. It makes sense as a student excercise, but if you are seriously building
>a compiler, there are far better tools available (and of course the lexer
>and parser are entirely trivial parts of the compiler in any case).
Well, I have some reasons:
- YACC is verified, reliable, and it's everywhere.
- YACC never was slow, or took enormous amount of memory.
- YACC is free.
- I know YACC.
Speaking of LEX, I prefer not to use it in a serious project. It tends to
build huge tables, be somewhat slow, and more importantly, many things
cannot be expressed in LEX easily.
However, we all understand that these pro-YACC arguments are somewhat
weak, since a lot more expressive power is neede to parse the real
languages like COBOL. So I would like to ask you guys: what are these 'far
better tools'? And where can I get them?
I guess GMD cocktail will be mentioned. While I heard of several such
tools, it's always difficult to tell from announcement/promo if the tool
works and if it has enough power. So it would be good to hear about
real-life experiences with such tools.
Vadim Maslov
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.