|Crenshaw's Tutorial email@example.com (Colin Doncaster) (2000-01-19)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (2000-01-21)|
|Re: Crenshaw's Tutorial email@example.com (Jack Crenshaw) (2000-02-05)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (Joachim Durchholz) (2000-02-10)|
|Re: Crenshaw's Tutorial email@example.com (2000-02-12)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (Alan Fargusson) (2000-02-15)|
|Re: Crenshaw's Tutorial email@example.com (Randall Hyde) (2000-02-15)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (Joachim Durchholz) (2000-02-17)|
|[2 later articles]|
|Date:||21 Jan 2000 00:42:29 -0500|
Colin Doncaster email@example.com
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,
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.
Return to the
Search the comp.compilers archives again.