bisonc++ - How to get the installed version of GNU Bison -


i'm upgrading bison 1.875 bison 3.0.4 , want backward compatible.

  • the function call yyparse(void *) works in 1.875, not in 3.0.4
  • the function call yyparse() works in 3.04, not in 1.875

bison outputs cpp file, line #define yybison_version "3.0.2" used strcmp determine if actual version up-to-date , decide function call use:

int ret = 0; if(bisonversioncheck < 0) {     ret = yyparse(void *); } else {     ret = yyparse(); } 

but, see, determined run-time, compiler complains function-call can't with.

i have macro can use, can use preprocessor directives select right function call. can't find macro in bison documentation.

  • do know "__bison_version"look-a-like-macro?
  • anyone idea right function-call based on bison-version?

ret = yyparse(void *) not syntactically correct c, regardless of bison version. perhaps not meant type.

it's not clear me why yyparse() doesn't work in 1.875 code. perhaps define macro yyparse_param somewhere, in order add void* argument yyparse. in old versions of bison, change calling convention yyparse think ignored modern versions. see declaration ℅parse-param replacement, if needed (although question seems imply argument yyparse not used).


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -