[plug] Writing a language?
Russell Steicke
r.steicke at bom.gov.au
Mon Jun 16 11:26:41 WST 2003
On Mon, Jun 16, 2003 at 01:36:49AM -0000, Simon Scott wrote:
> Hi all
>
> Just wondering if anyone here has any experience in writing languages?
A couple of points to add to what others have said...
The GNU yacc program is called bison, so look for that in info on your
linux box. You may also have byacc (Berkeley YACC) installed, they're
basically the same.
The lex/yacc combination will bend your mind at first, but it's pretty
powerful.
If you're after texts about this, search for "dragon book". I forget
the exact name of that book ("Compilers: principles and tools" or some
such, by Aho and someone else) but it's the classic text on parsing.
Another one I can recommend is "Compiler Design In C" by Alan Holub,
which gets into the nuts and bolts, but you come out the other end
really knowing how it works.
Of course, you could hand-code a recursive descent parser if the
language is not too complicated. A web search should point to lots of
info about this.
--
Russell Steicke
-- Fortune says:
We ARE as gods and might as well get good at it.
-- Whole Earth Catalog
More information about the plug
mailing list