More on PCCTS

parrt@ecn.purdue.edu (Terence J Parr)
Thu, 30 Apr 1992 18:00:40 GMT

          From comp.compilers

Related articles
More on PCCTS parrt@ecn.purdue.edu (1992-04-30)
| List of all articles for this month |
Newsgroups: comp.compilers
From: parrt@ecn.purdue.edu (Terence J Parr)
Keywords: tools
Organization: Compilers Central
Date: Thu, 30 Apr 1992 18:00:40 GMT

A recent newsgroup posting introduced the Purdue Compiler
Construction Tool Set (PCCTS) version 1.00. We posted from our mail
server account: pccts@ecn.purdue.edu, which handles requests for the
software. We neglected to leave an email address for personal
communications and questions. In addition, a user posted a series of
questions reqarding PCCTS.


shite@sinkhole.unf.edu (Stephen Hite) writes:


> I just picked up the PCCTS 1.0 package at en.ecn.purdue.ecu (in
> carp/PCCTS) and am currently in the midst of absorbing its syntax and
> capabilities. Two things that I'd like it to be able to do are:
>
> 1. Usable with C++ code.


For the moment, you can compile PCCTS-generated parsers with the C
compiler and then link to your C++ code. This shouldn't be too hard
except that you must remember to define as "C" (in your C++ file) all
PCCTS symbols that you need to reference from C++.


> The authors did not leave a private e-mail address so I'm posting here
> in hopes one of them will respond to this.


The authors of the system are:


          Terence J. Parr parrt@ecn.purdue.edu
          Henry G. Dietz hankd@ecn.purdue.edu
          William E. Cohen cohenw@ecn.purdue.edu


> I like the EBNF notation and the features it provides appears (on
> first impression) to make writing compilers/interpreters easier than
> using YACC/LEX. The PCCTS documentation discusses the advantages of
> using a top-down parser generator approach but I noticed they did not
> mention its disadvantages (or rather the strengths of bottom-up
> parsing that PCCTS will lack). Are there any?


Although there is no strict ordering between LL and LALR (there are LL
grammars that are not LALR--suprise), LALR is considered stronger. This
recognition strength is tempered by the fact that action placement among
the productions of an LALR grammar can cause ambiguities. Any YACC
programmer can testify to this. PCCTS' weakness is that you sometimes
have to be more clever when describing languages (LL(k) grammars have more
constraints than LALR(1) grammars). PCCTS' usefulness comes from its:


o Integration of lexical and syntactic analysis
o Extended BNF notation
o Action placement cannot introduce ambiguities
o Rule defs which may define parameters, return values and local vars
o Generation of human-readable, "dbx-able" LL(k) parsers
o Automatic and explicit mechanisms for constructing trees
o Automatic error recovery ability and error reporting facility


> P.S. The grammar descriptions (.g files) for ANTLR and DLG are
> missing from the source code distribution (Why?).


For the moment, PCCTS 1.00 is written in PCCTS beta; hence, the antlr.g
and dlg_p.g files were not included because most people do not have the
beta release software.


In the near future,


o PCCTS will have an option to generate C++ parsers
o PCCTS to be written in the latest version of itself
o PCCTS will include an integrated code-generator generator to support
          code-generation and other intermediate-form translations
o PCCTS will allow parsing to be a function of semantics (via predicate
          actions) as well as syntactics.
o PCCTS will include more example grammars and some real compilers
--


Post a followup to this message

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