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.
Basically, the skeleton.c file was modified to allow the following: #define YYLEX [self getToken:stream] #define YYPARSE - (int)parse:(FILE*)stream #define yyerror(_msg) [self warn:_msg]; Make sure these defs appear before your grammar. In the pre-grammar code one also needs to include the "@implementatin Foo", etc. Code following the grammar (ending "%%") now really follows the parse imlementation. I use the following make rule: .my.m: cyacc -d -o -x .m -b $* $*.my New Options ----------- x uses the next argument as the file extensions (default .c) o causes PRIVATE to be defined as "static" thus making the tables and such local to the module. The real curious can look at the modifications using rcsdiff on suspect files. (skeleton.c main.c output.cm defs.h) Sorry about the scant documentation. Please send questions to jjobe@mrj.com. Will try to get out an example soon. Enjoy, Jason
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.