Revised to include rcsid of pattern file in binary opt
This commit is contained in:
parent
744bc6845d
commit
822b1c557c
3 changed files with 7 additions and 2 deletions
|
@ -42,6 +42,7 @@ byte nparam[N_EX_OPS];
|
||||||
bool nonumlab[N_EX_OPS];
|
bool nonumlab[N_EX_OPS];
|
||||||
bool onlyconst[N_EX_OPS];
|
bool onlyconst[N_EX_OPS];
|
||||||
int nerrors=0;
|
int nerrors=0;
|
||||||
|
char patid[128];
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%union {
|
%union {
|
||||||
|
@ -61,7 +62,7 @@ int nerrors=0;
|
||||||
%nonassoc NOT,COMP,UMINUS
|
%nonassoc NOT,COMP,UMINUS
|
||||||
%nonassoc '$'
|
%nonassoc '$'
|
||||||
|
|
||||||
%token SFIT,UFIT,NOTREG,PSIZE,WSIZE,DEFINED,SAMESIGN,ROM,ROTATE
|
%token SFIT,UFIT,NOTREG,PSIZE,WSIZE,DEFINED,SAMESIGN,ROM,ROTATE,STRING
|
||||||
%token <y_int> MNEM
|
%token <y_int> MNEM
|
||||||
%token <y_int> NUMBER
|
%token <y_int> NUMBER
|
||||||
%type <y_int> expr,argno,optexpr
|
%type <y_int> expr,argno,optexpr
|
||||||
|
@ -71,6 +72,7 @@ int nerrors=0;
|
||||||
%%
|
%%
|
||||||
patternlist
|
patternlist
|
||||||
: /* empty */
|
: /* empty */
|
||||||
|
| STRING '\n'
|
||||||
| patternlist '\n'
|
| patternlist '\n'
|
||||||
| patternlist pattern
|
| patternlist pattern
|
||||||
;
|
;
|
||||||
|
@ -297,6 +299,8 @@ printnodes() {
|
||||||
printf("/* %3d */\t%3d,%6u,%6u,\n",
|
printf("/* %3d */\t%3d,%6u,%6u,\n",
|
||||||
p-nodes,p->ex_operator,p->ex_lnode,p->ex_rnode);
|
p-nodes,p->ex_operator,p->ex_lnode,p->ex_rnode);
|
||||||
printf("};\n\niarg_t iargs[%d];\n",maxpatlen);
|
printf("};\n\niarg_t iargs[%d];\n",maxpatlen);
|
||||||
|
if (patid[0])
|
||||||
|
printf("static char rcsid[] = %s;\n",patid);
|
||||||
}
|
}
|
||||||
|
|
||||||
initio() {
|
initio() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Header$ */
|
"$Header$"
|
||||||
loc adi loc sbi $2==w && $4==w: loc $1-$3 adi w
|
loc adi loc sbi $2==w && $4==w: loc $1-$3 adi w
|
||||||
ldc adi ldc sbi $2==2*w && $4==2*w: ldc $1-$3 adi 2*w
|
ldc adi ldc sbi $2==2*w && $4==2*w: ldc $1-$3 adi 2*w
|
||||||
loc adi loc adi $2==w && $4==w: loc $1+$3 adi w
|
loc adi loc adi $2==w && $4==w: loc $1+$3 adi w
|
||||||
|
|
|
@ -24,6 +24,7 @@ static char rcsid2[] = "$Header$";
|
||||||
extern long atol();
|
extern long atol();
|
||||||
%}
|
%}
|
||||||
%%
|
%%
|
||||||
|
\"[^"]*\" { strncpy(patid,yytext,sizeof(patid)); return(STRING); }
|
||||||
notreg return(NOTREG);
|
notreg return(NOTREG);
|
||||||
sfit return(SFIT);
|
sfit return(SFIT);
|
||||||
ufit return(UFIT);
|
ufit return(UFIT);
|
||||||
|
|
Loading…
Reference in a new issue