Port to FreeBSD. (Sorry there's no man page yet.)

This commit is contained in:
Garrett Wollman 1995-01-19 22:27:58 +00:00
parent 9d9cb31cdb
commit 3665217fb4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5724
2 changed files with 44 additions and 30 deletions

16
usr.bin/mk_cmds/Makefile Normal file
View file

@ -0,0 +1,16 @@
# $Id$
PROG= mk_cmds
#
# NB: ct.c must come before cmd_tbl.c so that y.tab.h will be generated.
#
SRCS= mk_cmds.c options.c utils.c ct.c cmd_tbl.c
CFLAGS+= -I. -I${.CURDIR}/../../lib/libss -DIN_MK_CMDS
LFLAGS= -l
CLEANFILES+= y.tab.c y.tab.h lex.yy.c cmd_tbl.c ct.c
NOMAN= # XXX
LDADD+= -ll
DPADD+= ${LIBL}
.include <bsd.prog.mk>

View file

@ -1,40 +1,12 @@
N [0-9]
PC [^\"]
AN [A-Z_a-z0-9]
%%
command_table return l_command_table();
request return l_request();
unimplemented return l_unimplemented();
end return l_end();
[\t\n ] ;
\"{PC}*\" return l_quoted_string();
{AN}* return l_string();
#.*\n ;
. return (*yytext);
%%
%{
/*
* User-subroutines section.
*
* Have to put all this stuff here so that the include file
* from YACC output can be included, since LEX doesn't allow
* an include file before the code it generates for the above
* rules.
*
* Copyright 1987, 1988 by MIT Student Information Processing Board.
*
* For copyright info, see copyright.h.
*/
#include <string.h>
#include "ct.tab.h"
#include "y.tab.h"
#include "copyright.h"
extern char *last_token, *ds();
@ -79,3 +51,29 @@ static l_string()
last_token = ds(yylval.dynstr);
return STRING;
}
%}
N [0-9]
PC [^\"]
AN [A-Z_a-z0-9]
%%
command_table return l_command_table();
request return l_request();
unimplemented return l_unimplemented();
end return l_end();
[\t\n ] ;
\"{PC}*\" return l_quoted_string();
{AN}* return l_string();
#.*\n ;
. return (*yytext);
%%