Jeff Kesselman jeffk at tenetwork.com
Thu Apr 10 23:21:45 New Zealand Standard Time 1997

At 07:42 PM 4/10/97 +0100, you wrote:
>Whilst we're on the subject of compilers and all that sort of mish mash
>which goes over my head, anyone ever looked at PCCTS?  It's some sort of
>C++ compiler making tool and it's free (free and c++ being the operative
>words for me).

Yes, Its what i wrote Kelvin-C in. I **LOVE** PCCTS.

I've had compielr theory classes and, while Ive done alot in YACC and LEX
(also free) alot of thinasg annoyed me about them. The same things annoyed
the auothor of PCCTS who set out to write a "better" (in our opinion) one...

SOme of the comparative features:

YACC -LALR. very pwoerful but rather obtuse and impossible to generate
automatic (tool egenrated) useuful syntactic error messages beyond "sytnatx
error at..."
ANTLR (The PCCTS equivelent) - LL(K).  What EVERY language I know if is. (,
C++, Psacal, JAVA, etc ad nauseum) Less pwoerful but still fine for
virtually all practical languages, can generate automatic syntax erro
message(like the old Turbo Pascal "Error at luine # column #, found <foo>
expected <token list>")

LEX - hanbd written token list, manaul connection to YACCC through defined
TOKEN #defines.
DLG (PCCTS equiuielent) - AUTOMATIC generation of DLG scripts from your
ANTLR grammer.

YACC input -- a slightly bizzare from of BNF 
PCCTS -- a very standard form of EBNF.

YACC Output -- Obtuse and impossible to read table driven C.
ANTLR output -- Easy to read classic recursive descent parsers in either C
or C++.

There are many more really neat PCCTS features I wont go into.

In general I think its man ytimes the tool YACC and LEX are, and i used to
swerar by em.  Note that NO compielr generator will let you build a
compielr though without soem udnerstanding of compiler theory. Its not
difficult once you understand some absic concept.s I personally like
"Crafting a Compiler" by Fsicher and LeBlanc Jr. (ISBN 0-8053-3201-4)  The
author of PCCTS also has a book coming otu specificly on his tools called
"Language translation with PCCTS and C++". I have it on order...

Jeff Kesselman -- Compiler Jock and Junkie

>  |				"With my naked eyes I saw the falling"
>_O_O_  Ling - Freshwater fish	 rain coming down on."

More information about the MUD-Dev mailing list