The manual clearly says:
YYSETSTATE (s)
[...]
The parameter to YYSETSTATE is a signed integer that uniquely identifies
the specific instance of YYFILL (n) that is about to be called.
[...]
The problem is, I'm calling my YYSETSTATE defined macro from a bison parser. How can I begin a state without knowing the integer
UI? In other words, how can I get the identifier of a state I want to begin.
On lexer:
<MY_STATE>{NAME} {
return FN_NAME;
}
On parser:
expr: { push_state( ? ) } /* what's the identifier of MY_STATE? */
'(' FN_NAME VALUE VALUE ')' { compile_expr($2, $3, $4); }
;