1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2025-04-21 12:27:27 +03:00

b2/: add "ignore" keyword for substitution rules

This allows us to decide in the project-specific rules how to indicate
DNP/NC/DNS/... parts. In the original BOOM, F1 == NC was hard-coded.
This commit is contained in:
Werner Almesberger
2012-05-21 23:17:33 -03:00
parent 2014e6053e
commit d2171eba47
7 changed files with 40 additions and 16 deletions

View File

@@ -245,6 +245,12 @@ struct subst *subst_end(void)
}
struct subst *subst_ignore(void)
{
return alloc_subst(st_ignore);
}
struct subst *subst_break(const char *block)
{
struct subst *sub;
@@ -357,6 +363,8 @@ static void recurse_fin(struct subst *sub, const struct parent *parent)
break;
case st_end:
break;
case st_ignore:
break;
case st_break:
case st_again:
sub->u.jump = resolve_jump(sub->u.tmp, parent);
@@ -425,6 +433,9 @@ static void recurse_dump(FILE *file, const struct subst *sub, int level)
case st_end:
fprintf(file, "end\n");
break;
case st_ignore:
fprintf(file, "ignore\n");
break;
case st_break:
fprintf(file, "break %s\n", sub->u.jump->u.match.src);
break;