1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
Syntax: bf(%tag-mismatches) tt(on|off)
This directive is only interpreted when polymorphic semantic values are
used. When tt(on) is specified (which is used by default) the tt(parse) member
of the generated parser dynamically checks that the tag used when calling a
semantic value's tt(get) member matches the actual tag of the semantic value.
If a mismatch is observed, then the parsing function aborts after displaying a
fatal error message. If this happens, and if the option/directive tt(debug)
was specified when bic() created the parser's parsing function, then the
program can be rerun, specifying tt(parser.setDebug(Parser::ACTIONCASES))
before calling the parsing function. As a result the case-entry numbers of the
tt(switch), defined in the parser's tt(executeAction) member, are inserted
into the standard output stream. The action case number reported just before
the program displays the fatal error message tells you in which of the
grammar's action block the error was encountered.
|