You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A #define directive in the .tab.cpp file will replace yyerror with - for example - YBerror. However, a token named YBerror has been introduced already in the .tab.hpp file in the enumeration YBtokentype with the value 255. Under Linux this token will not be generated. Hence, there is no conflict in the Linux case. If no API prefix is used, the token features the name "YYerror". The #define will not be present and there is no conflict with the yyerror function thanks to case sensitivity.
There is a workaround which consists in undefining yyerror at the proper moment. In certain applications this will work. In other cases linker issues will arise as each parser creates the same yyerror symbol. The attached example illustrates the problem.
A #define directive in the .tab.cpp file will replace yyerror with - for example - YBerror. However, a token named YBerror has been introduced already in the .tab.hpp file in the enumeration YBtokentype with the value 255. Under Linux this token will not be generated. Hence, there is no conflict in the Linux case. If no API prefix is used, the token features the name "YYerror". The #define will not be present and there is no conflict with the yyerror function thanks to case sensitivity.
There is a workaround which consists in undefining yyerror at the proper moment. In certain applications this will work. In other cases linker issues will arise as each parser creates the same yyerror symbol. The attached example illustrates the problem.
API Prefix Problem.zip
The text was updated successfully, but these errors were encountered: