Re: Crenshaw's Tutorial (RKRayhawk)
21 Jan 2000 00:42:29 -0500

          From comp.compilers

Related articles
Crenshaw's Tutorial (Colin Doncaster) (2000-01-19)
Re: Crenshaw's Tutorial (2000-01-21)
Re: Crenshaw's Tutorial (Jack Crenshaw) (2000-02-05)
Re: Crenshaw's Tutorial (Joachim Durchholz) (2000-02-10)
Re: Crenshaw's Tutorial (2000-02-12)
Re: Crenshaw's Tutorial (Alan Fargusson) (2000-02-15)
Re: Crenshaw's Tutorial (Randall Hyde) (2000-02-15)
Re: Crenshaw's Tutorial (Joachim Durchholz) (2000-02-17)
[2 later articles]
| List of all articles for this month |

From: (RKRayhawk)
Newsgroups: comp.compilers
Date: 21 Jan 2000 00:42:29 -0500
Organization: AOL
References: 00-01-073
Keywords: parse, practice

Colin Doncaster
Date: 19 Jan 2000 01:12:28 -0500

asks (in contrast to )
  a full C method of implementing a compiler
<< build compilers with
lexx and bison - what is the biggest difference, would using lexx and
bison prohibit certain features within a compiler/language (ie, OO
support, recursion, functions)?

Several basic differences. First if you use the tools, you do not have
to re-invent the wheel. This saves you time in coding, and lots of
time in testing. Furthermore, atleast for beginners and intermediate
programmers; use of the tools tends to keep you on a conventionalized
development path that will make your syntax rules and your tool fairly
easy for a large audience to recognize.

Use of the tools gets you quickly past syntax (sometimes) and into the
semantics where the real work usually needs to be done.

Some of the tools are conceived in an earlier age and create a few
inconveniences when used in object oriented development environments
for the compiler development. Getting automatic constructors and
destructors to engage can be (only slightly) inconvenient with bison,
for example.

The classic tools should not have any constructs that inherently
limits your ability to project an object oriented language
(syntax). Particularly, doing it yourself in raw code like C or C++
does not really make the process of developing an object oriented
language (syntax) per se any more smooth.

But to the extent that you become convinced that an object orientation
is sutable for the internal algorithms of your compiler itself, it is
possible to harness the tools to such facilities, just like any other
set of C routines.

In general the advantage of the tools is that they allow you to focus
on the overall design of your compiler, and get to the semantics and
the runtime issues forthwith.

So the impact is on the efficiency of you as a worker. The tools give
you a boost and impose few conceptual limiations. For this same reason
it is advisable for beginners and intermediate workers to seek out
detailed examples of error processing, symbol tables and usually also
Abstract Syntax Tree (AST) logic; and not develop these from scratch.

Its your time. Getting the basic components off the shelf helps you
stay focused on your own language, which is where you want to be.

Best Wishes
Robert Rayhawk

Post a followup to this message

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