BUGFIX:
- line number go wrong when directives appear. - a directives in a pair of {} make syntax error.
This commit is contained in:
parent
a37de8f33c
commit
32f9bdbadc
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.2 2001/02/04 05:19:14 takemura Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2001/03/03 12:51:44 takemura Exp $
|
||||
|
||||
S= ../../../..
|
||||
|
||||
|
@ -24,17 +24,17 @@ all: ${PROG} ${GENERATEDS}
|
|||
DEFFILE = $S/arch/hpc/conf/platid.def
|
||||
PLATIDGEN = $S/arch/hpc/hpc/platid_gen/${PROG}
|
||||
|
||||
${GENHDR}: ${DEFFILE}
|
||||
awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET}
|
||||
${PLATIDGEN} -header < ${DEFFILE} >> ${GENHDR}
|
||||
${MASK_H}: ${DEFFILE}
|
||||
awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET}
|
||||
${PLATIDGEN} -mask_h < ${DEFFILE} >> ${MASK_H}
|
||||
${MASK_C}: ${DEFFILE}
|
||||
awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET}
|
||||
${PLATIDGEN} -mask_c < ${DEFFILE} >> ${MASK_C}
|
||||
${NAME_C}: ${DEFFILE}
|
||||
awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET}
|
||||
${PLATIDGEN} -name_c < ${DEFFILE} >> ${NAME_C}
|
||||
${GENHDR}: ${DEFFILE} ${PROG}
|
||||
awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} || rm ${.TARGET}
|
||||
${PLATIDGEN} -header < ${DEFFILE} >> ${GENHDR} || rm ${.TARGET}
|
||||
${MASK_H}: ${DEFFILE} ${PROG}
|
||||
awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} || rm ${.TARGET}
|
||||
${PLATIDGEN} -mask_h < ${DEFFILE} >> ${MASK_H} || rm ${.TARGET}
|
||||
${MASK_C}: ${DEFFILE} ${PROG}
|
||||
awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} || rm ${.TARGET}
|
||||
${PLATIDGEN} -mask_c < ${DEFFILE} >> ${MASK_C} || rm ${.TARGET}
|
||||
${NAME_C}: ${DEFFILE} ${PROG}
|
||||
awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} || rm ${.TARGET}
|
||||
${PLATIDGEN} -name_c < ${DEFFILE} >> ${NAME_C} || rm ${.TARGET}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%{
|
||||
/* $NetBSD: gram.y,v 1.2 2001/02/04 05:19:15 takemura Exp $ */
|
||||
/* $NetBSD: gram.y,v 1.3 2001/03/03 12:51:44 takemura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999
|
||||
|
@ -101,7 +101,8 @@ sub_list:
|
|||
sub_item:
|
||||
sym '=' sym { $$ = new_node(N_MODIFIER, 0, $1, $3, NULL); }|
|
||||
ent { $$ = $1; } |
|
||||
'{' sub_list '}' { $$ = $2; };
|
||||
'{' sub_list '}' { $$ = $2; } |
|
||||
DIRECTIVE { $$ = new_node(N_DIRECTIVE, 0, $1, NULL, NULL); };
|
||||
|
||||
ent : sym name_opt {
|
||||
$2->ptr1 = $1;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%{
|
||||
/* $NetBSD: scan.l,v 1.2 2001/02/04 05:19:15 takemura Exp $ */
|
||||
/* $NetBSD: scan.l,v 1.3 2001/03/03 12:51:44 takemura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999
|
||||
|
@ -49,7 +49,7 @@ void getcomment __P((void));
|
|||
%}
|
||||
|
||||
%%
|
||||
#[^\n]*\n { yylval.str = strdup(yytext); return DIRECTIVE; }
|
||||
#[^\n]*\n { yylval.str = strdup(yytext); yyline++; return DIRECTIVE; }
|
||||
\"([^"]|\\\")*\" { yylval.str = getstr(yytext); return NAME; }
|
||||
[a-zA-Z][0-9a-zA-Z]* { yylval.str = strdup(yytext); return FSYM; }
|
||||
[a-zA-Z][_0-9a-zA-Z]* { yylval.str = strdup(yytext); return MOD; }
|
||||
|
|
Loading…
Reference in New Issue