Hi,

I have a rule like this,

  output: output_variant NEWLINE {
    *gdbmi_output = $1;
  };

  output: error NEWLINE {
    yyerrok;
  };

  output_variant: OPEN_PAREN variable CLOSED_PAREN {
    $$ = gdbmi_output_alloc();
    $$->kind = GDBMI_OUTPUT_PROMPT;
    free($2);
  }

Where OPEN_PAREN is (, variable is [a-zA-Z]+ and CLOSED_PAREN is ).
I want ONLY "gdb" to be allowed in this variable context.

Is there a way to force the syntax error in the action in such a way
that bison then bubbles up the error into the above 'output' error rule?

Thanks,
Bob Rossi

_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to