mkeeter / antimony

CAD from a parallel universe
2.1k stars 159 forks source link

Fix call to yy_find_shift_action() #215

Closed hzeller closed 4 years ago

hzeller commented 4 years ago

In %syntax_error, the call to yy_find_shift_action() passes the parser as first argument, however, the generated function prototype for this function in v2syntax.lemon.cpp is:

static YYACTIONTYPE yy_find_shift_action(
  YYCODETYPE iLookAhead,    /* The look-ahead token */
  YYACTIONTYPE stateno      /* Current state number */
);

... so the first parameter should actually be a YYCODETYPE.

Fixed by passing the correct variable (yymajor).

Not sure why this compiled before, did this function change in lemon ?

Signed-off-by: Henner Zeller h.zeller@acm.org

mkeeter commented 4 years ago

It turns out this breaks on my version of lemon – I'm not sure what they were thinking, changing the signature of a core function!

Anyways, I deleted the whole block in 8c05224f90a542640e297a0cd6d5fbffabe26c90, which should fix it 😄