Both of these mean the same thing: the product must end
in a 2-d visible way
Signed-off-by: NeilBrown <neil@brown.name>
| Open SimpleStatements } ${ $0 = $<2; }$
| : SimpleStatements $$NEWLINE ${ $0 = $<2; }$
| : StatementBlock ${ $0 = $<2; }$
- StatementBlock -> Statementlist $$NEWLINE ${ $0 = $<1; }$
+ StatementBlock -> Statementlist $$OUT ${ $0 = $<1; }$
SimpleStatements -> SimpleStatements ; SimpleStatement ${
{
vs = sym_find(g, tk.txt);
if (vs->num == TK_newline)
p.line_like = 1;
+ else if (vs->num == TK_out)
+ p.line_like = 2;
else if (vs->precedence == 0) {
err = "symbol after $$ must have precedence";
goto abort;
printf(" [%d%s]", s->precedence,
assoc_names[s->assoc]);
}
- if (pr->line_like)
+ if (pr->line_like == 1)
printf(" $$NEWLINE");
+ else if (pr->line_like)
+ printf(" $$OUT");
printf("\n");
}