X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=blobdiff_plain;f=csrc%2Fparsergen.mdc;h=76fec3a70a779cefe4589a9d79e861a61acd726e;hp=679fab6996de66a9fe267d914c654812f74771f3;hb=ca00beb39b9d02578c1f0b556a2c2f70f28cf6e7;hpb=f24b54a97b9955aa5761b22aa64d5418e23e80f2 diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index 679fab6..76fec3a 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -499,6 +499,8 @@ Now we have all the bits we need to parse a full production. 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; @@ -1651,8 +1653,10 @@ it up a bit. First the items, with production number and associativity. 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"); }