> On 24 Oct 2014, at 15:10, Bob Rossi wrote:
>
> 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();
>
Hi Bob,
use the macro YYERROR;
It's documented here:
https://www.gnu.org/software/bison/manual/html_node/GLR-Semantic-Actions.html#YYERROR
Yours,
Alex
On 10/24/2014 03:10 PM, Bob Rossi wrote:
> Hi,
>
> I have a rule like this,
>
> output: output_variant NEWLINE {
> *gdbmi_output = $1;
>
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