README
1 BTYACC -- backtracking yacc
2 ===========================
3
4BTYACC was created by Chris Dodd using ideas from many
5places and lots of code from the Berkeley Yacc
6distribution, which is a public domain yacc clone put
7together by the good folks at Berkeley. This code is
8distributed with NO WARRANTEE and is public domain.
9It is certain to contain bugs, which you should
10report to: cdodd@acm.org
11
12Vadim Maslov of Siber Systems <vadik@siber.com>
13considerably modified BTYACC to make it suitable
14for production environment.
15
16Several people have suggested bug fixes that
17were incorporated into BtYacc.
18
19See the README.BYACC files for more about
20Berkeley Yacc and other sources of info.
21
22btyacc is backwards compatible with the POSIX yacc specification in
23IEEE 1003.2. A copy of the relevant specification may be available at
24ftp://ftp.fi.netbsd.org/ftp/pub/doc/posix/p1003.2/d11.2/a.3
25
26http://www.siber.com/btyacc/ is the current home of BtYacc.
27It is provided courtesy of Siber Systems http://www.siber.com/.
28
29 Building BtYacc
30 ---------------
31 by Chris Dodd and Vadim Maslov
32
33We used GCC and GNU make to compile BtYacc both on UNIX and
34WIN32 paltforms. You are welcome to try different
35combinations of makes and compilers. Most likely it will
36work, but it may require Makefile changes.
37
38There is no config script.
39Just type "make" and it should compile.
40
41AWK. If you want to change file btyaccpa.ske (backtracking
42parser skeleton), you will need awk to compile it into
43skeleton.c file. We used GNU AWK (gawk) version 3.0.
44
45It is known that using older versions of gawk
46may create problems in compilation, because older awks
47have problems with backslashes at the end of a line.
48
49For MSDOS, there a "makefile.dos" that should do the trick.
50Note: makefile.dos was not tested for a long time.
51
52There are also Visual Studio 2013 project files provided by
53zothrosko.
54
55The result of compilation should be a single executable called
56"btyacc" which you can install anywhere you like;
57it does not require any other files in the distribution to run.
58
59
60 Legal Stuff
61 -----------
62 by Chris Dodd and Vadim Maslov
63
64In English: BtYacc is freeware. BtYacc is distributed with
65no warranty whatsoever. The author and any other contributors
66take no responsibility for any and all consequences of its use.
67
68In Legalese: LIMITATION OF LIABILITY. NEITHER SIBER SYSTEMS
69NOR ANY OF ITS LICENSORS NOR ANY BTYACC CONTRIBUTOR SHALL BE
70LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL
71DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR
72DATA USE, CAUSED BY BTYACC AND INCURRED BY CUSTOMER OR ANY
73THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN
74IF SIBER SYSTEMS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
75DAMAGES.
76
README.BYACC
1 Berkeley Yacc is an LALR(1) parser generator. Berkeley Yacc has been made
2as compatible as possible with AT&T Yacc. Berkeley Yacc can accept any input
3specification that conforms to the AT&T Yacc documentation. Specifications
4that take advantage of undocumented features of AT&T Yacc will probably be
5rejected.
6
7 Berkeley Yacc is distributed with no warranty whatever. The code is certain
8to contain errors. Neither the author nor any contributor takes responsibility
9for any consequences of its use.
10
11 Berkeley Yacc is in the public domain. The data structures and algorithms
12used in Berkeley Yacc are all either taken from documents available to the
13general public or are inventions of the author. Anyone may freely distribute
14source or binary forms of Berkeley Yacc whether unchanged or modified.
15Distributers may charge whatever fees they can obtain for Berkeley Yacc.
16Programs generated by Berkeley Yacc may be distributed freely.
17
18 Please report bugs to
19
20 corbett@berkeley.edu
21
22Include a small example if possible. Please include the banner string from
23skeleton.c with the bug report. Do not expect rapid responses.
24
25------------------------------------------------------------------------------
26
27 ACKNOWLEDGEMENTS
28 ================
29
30 Berkeley Yacc owes much to the unflagging efforts of Keith Bostic.
31His badgering kept me working on it long after I was ready to quit.
32
33 Berkeley Yacc is based on the excellent algorithm for computing LALR(1)
34lookaheads developed by Tom Pennello and Frank DeRemer. The algorithm is
35described in their almost impenetrable article in TOPLAS 4,4.
36
37 Finally, much of the credit for the latest version must go to those
38who pointed out deficiencies of my earlier releases. Among the most
39prolific contributors were
40
41 Benson I. Margulies
42 Dave Gentzel
43 Antoine Verheijen
44 Peter S. Housel
45 Dale Smith
46 Ozan Yigit
47 John Campbell
48 Bill Sommerfeld
49 Paul Hilfinger
50 Gary Bridgewater
51 Dave Bakken
52 Dan Lanciani
53 Richard Sargent
54 Parag Patel
55
56------------------------------------------------------------------------------
57
58The initial idea for BTYACC came to me after reading the paper
59 "Parsing Non-LR(k) Grammars with Yacc"
60 Gary H. Merrill
61 _Software Prctice and Experience_ Vol. 23(8), 829-850
62 (August 1993)
63this paper talks about the basic idea of using a trial parse to resolve
64conflicts in the grammar.
65
66Patches to make things work on MSDOS are courtesy of Pasquale Foggia
67