home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume19
/
wacco
/
part01
/
README
< prev
Wrap
Text File
|
1991-05-19
|
3KB
|
61 lines
$Header: README,v 1.7 91/05/17 16:29:53 hmgr Exp $
Copyright (c) 1991 by Parag Patel. All Rights Reserved.
You can do what you wish with this as long as
(1) you do not claim it or any part of it as yours and
(2) you do not remove or alter my copyright in any file.
This software is provided "AS IS" without any implied or express warranty
as to its performance or to the results that may be obtained by using this
software. It is completely unsupported. You're on your own.
This is version 1.1 of Wacco, basically an LL(1) parser generator.
Why Another Compiler COmpiler? Why not?!?
Wacco generates recursive-descent C++ code from an input file. The
wacco file.w looks a lot like a yacc(1) input file, but with a lot more
syntactic sugar added. Since it the parser generated recurses, you can
do attribute-driven parsing easily and even pass information into rules
which could alter the parse.
I wrote wacco to give me a platform for experiment with various error
recovery schemes. A fairly cheesy first/follow set scheme is currently
implemented. Wacco turned out to be useful in its own right and I never
did get around to serious experimenting.
Wacco is written in itself. The file "wacco.w" describes its own format
and was used to manually generate "parse.C" and "toks.h". (The original
bootstrap version no longer exists. Wacco has evolved considerably from
a much simpler version to the current implementation, so the old code
would be useless anyway.) The files "parse.C" and "toks.h" are always
shipped since there's no other way to build a working wacco.
The file "wacco.doc" describes the wacco file format in a tty-readable
form. "Wacco.doc.iw" is the much prettier IslandWrite version of the
document. "Wacco.doc.ps" is the Postscript output from IslandWrite.
Wacco.1 describes only the command-line options.
There are few comments and lots of ugly non-OO code throughout wacco.
It had evolved from a straight C implementation and I never got around
to cleaning it up. Sorry.
Wacco should port and run easily on most C++ systems. It does need C++
2.0 of some flavor. It's been successfully built on HP-UX s300 and s800
systems, Sparc, and 4.3BSD running on HP hardware. You may need to
tweak some -D defines in the Makefile. If sizeof(long) is NOT 32 bits,
you may have to perform major surgery on bitset.h and bitset.C.
All you should need to do is modify CFLAGS in the Makefile, then type
"make". The Makefile should come setup for HP-UX systems. Type "make
tst" to build a simple test program using "tgram.w". The files to
be installed wherever you prefer are "wacco" and "wacco.1".
The code is somewhat commented. Feel free to hack away, add new
features, or fix my screwups. If you make mods you feel are useful, or
fix some bug, please send me the cdiffs so I can make them available to
others too.
-- Parag Patel <parag@sde.hp.com>