aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mktemp
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1999-10-27 17:51:37 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1999-10-27 17:51:37 +0000
commitc3584b3b4eefd14cfcc5a82a641a016031ff88be (patch)
treee45e4006625eb522b52507d20820cbe1a130a9dc /usr.bin/mktemp
parent6877f580defcd4ab57997719d49896285f6c9310 (diff)
downloadsrc-c3584b3b4eefd14cfcc5a82a641a016031ff88be.tar.gz
src-c3584b3b4eefd14cfcc5a82a641a016031ff88be.zip
Allow a user specified parameter to 'yyparse()', in a manner similar to
that used by bison. The names are consistent with the bison implementation but this one also allows the type of the parameter to be specified. For a desired prototype of: int yyparse __P((struct yyresult *)); and compile like this: yacc -dv grammar.y cc -c -DYYPARSE_PARAM_TYPE="struct yyresult *" \ -DYYPARSE_PARAM="parm" y.tab.c and use like this: ${ #include "usrtypes.h" #include "usrproto.h" }$ %token NUMBER %% goal : NUMBER { parm->value = yylval; } ; If YYPARSE_PARAM_TYPE isn't specified then "void *" is the default type. If YYPARSE_PARAM is not specified then the generated code behaves exactly as traditional byacc. PR: 13562 Submitted by: W Gerald Hicks <wghicks@bellsouth.net>
Notes
Notes: svn path=/head/; revision=52569
Diffstat (limited to 'usr.bin/mktemp')
0 files changed, 0 insertions, 0 deletions