mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 16:01:31 +02:00
b2/: rename "again" to "continue"
This commit is contained in:
parent
bb809b0d6c
commit
107280b6d5
4
b2/SUBST
4
b2/SUBST
@ -8,7 +8,7 @@ BAR=x /* BAR= wouldn't be syntactically correct. We need a non-empty value */
|
||||
FOO=(*)(?) {
|
||||
BAR=$BAR$2
|
||||
FOO=$1
|
||||
again FOO
|
||||
continue FOO
|
||||
}
|
||||
BAR=x(*) { $=$1 } /* remove the "x" */
|
||||
|
||||
@ -18,7 +18,7 @@ REF=R[0-9]* {
|
||||
TOL <= 5%
|
||||
FN=*% { TOL<=$$ }
|
||||
break REF
|
||||
// end break again ignore
|
||||
// end break continue ignore
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -609,8 +609,8 @@ block:
|
||||
{
|
||||
if (!strcmp($1, "break"))
|
||||
$$ = subst_break($2);
|
||||
else if (!strcmp($1, "again"))
|
||||
$$ = subst_again($2);
|
||||
else if (!strcmp($1, "continue"))
|
||||
$$ = subst_continue($2);
|
||||
else
|
||||
yyerrorf("unknown keyword \"%s\"", $1);
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ static const struct subst *recurse_sub(const struct subst *sub,
|
||||
if (jump) {
|
||||
if (jump != sub)
|
||||
return jump;
|
||||
if (*cause == st_again)
|
||||
if (*cause == st_continue)
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@ -222,7 +222,7 @@ static const struct subst *recurse_sub(const struct subst *sub,
|
||||
case st_ignore:
|
||||
return &jump_ignore;
|
||||
case st_break:
|
||||
case st_again:
|
||||
case st_continue:
|
||||
*cause = sub->type;
|
||||
return sub->u.jump;
|
||||
default:
|
||||
|
11
b2/subst.c
11
b2/subst.c
@ -262,11 +262,11 @@ struct subst *subst_break(const char *block)
|
||||
}
|
||||
|
||||
|
||||
struct subst *subst_again(const char *block)
|
||||
struct subst *subst_continue(const char *block)
|
||||
{
|
||||
struct subst *sub;
|
||||
|
||||
sub = alloc_subst(st_again);
|
||||
sub = alloc_subst(st_continue);
|
||||
sub->u.tmp = block;
|
||||
return sub;
|
||||
}
|
||||
@ -372,7 +372,7 @@ static void recurse_fin(struct subst *sub, const struct parent *parent)
|
||||
break;
|
||||
case st_break:
|
||||
/* fall through */
|
||||
case st_again:
|
||||
case st_continue:
|
||||
sub->u.jump = resolve_jump(sub->u.tmp, parent);
|
||||
break;
|
||||
default:
|
||||
@ -445,8 +445,9 @@ static void recurse_dump(FILE *file, const struct subst *sub, int level)
|
||||
case st_break:
|
||||
fprintf(file, "break %s\n", sub->u.jump->u.match.src);
|
||||
break;
|
||||
case st_again:
|
||||
fprintf(file, "again %s\n", sub->u.jump->u.match.src);
|
||||
case st_continue:
|
||||
fprintf(file, "continue %s\n",
|
||||
sub->u.jump->u.match.src);
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
|
@ -45,7 +45,7 @@ enum subst_type {
|
||||
st_end, /* end the substitutions, accepting the part */
|
||||
st_ignore, /* ignore the part */
|
||||
st_break, /* jump to an outer block */
|
||||
st_again, /* repeat an outer block */
|
||||
st_continue, /* repeat an outer block */
|
||||
};
|
||||
|
||||
struct subst {
|
||||
@ -78,7 +78,7 @@ struct subst *subst_assign(const char *dst, enum relop op, const char *pat);
|
||||
struct subst *subst_end(void);
|
||||
struct subst *subst_ignore(void);
|
||||
struct subst *subst_break(const char *block);
|
||||
struct subst *subst_again(const char *block);
|
||||
struct subst *subst_continue(const char *block);
|
||||
|
||||
void subst_finalize(struct subst *sub);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user