When a production has $$foo to explicity set precedence, the 'foo'
doesn't really need to be virtual, it just needs to actually
carry a precedence.
Signed-off-by: NeilBrown <neil@brown.name>
vs = sym_find(g, tk.txt);
if (vs->num == TK_newline)
p.line_like = 1;
- else if (vs->type != Virtual) {
- err = "symbol after $$ must be virtual";
+ else if (vs->precedence == 0) {
+ err = "symbol after $$ must have precedence";
goto abort;
} else {
p.precedence = vs->precedence;