a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
56 lines
2.5 KiB
Plaintext
56 lines
2.5 KiB
Plaintext
This version of Berkeley Yacc was taken from the BSD-Lite CD and targeted
|
|
to Java by
|
|
|
|
axel.schreiner@informatik.uni-osnabrueck.de
|
|
|
|
Makefile -> makefile removed Berkeleyisms, call it jay
|
|
defs.h eliminate -dlpr options, %union, output_file, #ident
|
|
eliminate sekeleton.c references
|
|
error.c eliminate %union
|
|
main.c eliminate -dlpr options, %union, output_file
|
|
output.c eliminate -dlpr options, %union, output_file
|
|
fix #define, short, -t/yyDebug
|
|
respell YYERRCODE, YYTABLESIZE, YYFINAL, YYMAXTOKEN
|
|
output trailer last
|
|
switch to filter behaviour
|
|
reader.c eliminate output_file, #ident
|
|
#line -> // line, pass //
|
|
yyvsp[] -> yyVals[yyTop], yyval -> yyVal
|
|
skeleton.c -> skeleton Java skeleton
|
|
test removed
|
|
yacc.1 -> jay.1 adapted
|
|
yyfix.* removed
|
|
|
|
Types: there is a significant difference. yacc uses %union to cast the value
|
|
stack and <tag> to select alternatives. This works for l- and r-values alike.
|
|
jay uses Object as the value stack and <tag> to set a class. l-values must not
|
|
be cast. $n should not be assigned to, but $$ usually is. $n is referenced,
|
|
but $$ usually is not. Consequently jay casts $n and $<tag>$ but not $<>n
|
|
and $$. This makes assignment to $n references to $$ kludgily possible.
|
|
As another kludge, to prevent 'untyped' messages and to avoid unnecessary
|
|
casts, casts to "Object" are not emitted.
|
|
-------------------------------------------------------------------------------
|
|
Berkeley Yacc is an LALR(1) parser generator. Berkeley Yacc has been made
|
|
as compatible as possible with AT&T Yacc. Berkeley Yacc can accept any input
|
|
specification that conforms to the AT&T Yacc documentation. Specifications
|
|
that take advantage of undocumented features of AT&T Yacc will probably be
|
|
rejected.
|
|
|
|
Berkeley Yacc is distributed with no warranty whatever. The code is certain
|
|
to contain errors. Neither the author nor any contributor takes responsibility
|
|
for any consequences of its use.
|
|
|
|
Berkeley Yacc is in the public domain. The data structures and algorithms
|
|
used in Berkeley Yacc are all either taken from documents available to the
|
|
general public or are inventions of the author. Anyone may freely distribute
|
|
source or binary forms of Berkeley Yacc whether unchanged or modified.
|
|
Distributers may charge whatever fees they can obtain for Berkeley Yacc.
|
|
Programs generated by Berkeley Yacc may be distributed freely.
|
|
|
|
Please report bugs to
|
|
|
|
robert.corbett@eng.Sun.COM
|
|
|
|
Include a small example if possible. Please include the banner string from
|
|
skeleton.c with the bug report. Do not expect rapid responses.
|