Yes, It's the bison parameter mismatch... Is It possible to get a new version from upstream (assuming it works on current testing)?
Alternatively, there's a patch appended... (I believe it's a bit prettier)
Description: Fix pointer mixup this changes the function prototypes for parser and lexer and error to use separate pointers for scanner and lexer. (Closes: #771677) It's still missing a declaration... I did not find the flex-generated headers.. Bug-Debian: http://bugs.debian.org/771677 --- --- urjtag-0.10+r2007.orig/src/bsdl/bsdl.c +++ urjtag-0.10+r2007/src/bsdl/bsdl.c @@ -73,6 +73,7 @@ urj_bsdl_read_file (urj_chain_t *chain, urj_bsdl_globs_t *globs = &(chain->bsdl); FILE *BSDL_File; urj_vhdl_parser_priv_t *vhdl_parser_priv; + void * scanner; urj_bsdl_jtag_ctrl_t jtag_ctrl; int Compile_Errors = 1; int result = 0; @@ -127,8 +128,9 @@ urj_bsdl_read_file (urj_chain_t *chain, if ((vhdl_parser_priv = urj_vhdl_parser_init (BSDL_File, &jtag_ctrl))) { vhdl_parser_priv->jtag_ctrl->idcode = NULL; + scanner=vhdl_parser_priv->scanner; - urj_vhdl_parse (vhdl_parser_priv); + urj_vhdl_parse (vhdl_parser_priv,scanner); Compile_Errors = urj_vhdl_flex_get_compile_errors (vhdl_parser_priv->scanner); --- urjtag-0.10+r2007.orig/src/bsdl/bsdl_bison.y +++ urjtag-0.10+r2007/src/bsdl/bsdl_bison.y @@ -118,8 +118,8 @@ LEGAL NOTICES: %pure-parser -%parse-param {urj_bsdl_parser_priv_t *priv_data} -%lex-param {urj_bsdl_parser_priv_t *priv_data} +%parse-param {urj_bsdl_parser_priv_t *priv_data} {void * scanner} +%lex-param {void *scanner} %defines %name-prefix "urj_bsdl_" @@ -142,8 +142,8 @@ LEGAL NOTICES: #include "dmalloc.h" #endif -#define YYLEX_PARAM priv_data->scanner -int yylex (YYSTYPE *, void *); +/*#define YYLEX_PARAM priv_data->scanner*/ +/*int yylex (YYSTYPE *, void *);*/ #if 1 #define ERROR_LIMIT 0 @@ -181,7 +181,7 @@ static void ci_set_cell_spec_disable (ur static void ci_set_cell_spec (urj_bsdl_parser_priv_t *, int, char *); static void ci_append_cell_info (urj_bsdl_parser_priv_t *, int); -void yyerror (urj_bsdl_parser_priv_t *, const char *); +void yyerror (urj_bsdl_parser_priv_t *, void *scanner, const char *); %} %union { @@ -915,7 +915,7 @@ Give_Up_And_Quit (urj_bsdl_parser_priv_t /*----------------------------------------------------------------------*/ void -yyerror (urj_bsdl_parser_priv_t *priv_data, const char *error_string) +yyerror (urj_bsdl_parser_priv_t *priv_data, void * scanner, const char *error_string) { } --- urjtag-0.10+r2007.orig/src/bsdl/bsdl_parser.h +++ urjtag-0.10+r2007/src/bsdl/bsdl_parser.h @@ -41,7 +41,7 @@ void urj_bsdl_flex_stop_buffer (void *); /* BSDL parser declarations */ urj_bsdl_parser_priv_t *urj_bsdl_parser_init (urj_bsdl_jtag_ctrl_t *); void urj_bsdl_parser_deinit (urj_bsdl_parser_priv_t *); -int urj_bsdl_parse (urj_bsdl_parser_priv_t *); +int urj_bsdl_parse (urj_bsdl_parser_priv_t *,void *); /* BSDL semantic functions */ int urj_bsdl_process_elements (urj_bsdl_jtag_ctrl_t *, const char *); --- urjtag-0.10+r2007.orig/src/bsdl/bsdl_sem.c +++ urjtag-0.10+r2007/src/bsdl/bsdl_sem.c @@ -548,6 +548,7 @@ static int parse_vhdl_elem (urj_bsdl_parser_priv_t *priv, urj_vhdl_elem_t *elem) { char *buf; + void * scanner; size_t buf_len; size_t name_string_len; size_t elem_string_len; @@ -580,7 +581,8 @@ parse_vhdl_elem (urj_bsdl_parser_priv_t /* buffer is prepared for string parsing */ urj_bsdl_flex_switch_buffer (priv->scanner, buf, elem->line); - urj_bsdl_parse (priv); + scanner=priv->scanner; + urj_bsdl_parse (priv,scanner); free (buf); --- urjtag-0.10+r2007.orig/src/bsdl/vhdl_bison.y +++ urjtag-0.10+r2007/src/bsdl/vhdl_bison.y @@ -118,8 +118,8 @@ LEGAL NOTICES: %pure-parser -%parse-param {urj_vhdl_parser_priv_t *priv_data} -%lex-param {urj_vhdl_parser_priv_t *priv_data} +%parse-param {urj_vhdl_parser_priv_t *priv_data} {void * scanner} +%lex-param {void *scanner} %defines %name-prefix "urj_vhdl_" @@ -144,8 +144,8 @@ LEGAL NOTICES: #include "dmalloc.h" #endif -#define YYLEX_PARAM priv_data->scanner -int yylex (YYSTYPE *, void *); +//#define YYLEX_PARAM priv_data->scanner +//int yylex (YYSTYPE *, void *); #if 1 #define ERROR_LIMIT 15 @@ -183,7 +183,7 @@ static void set_attr_string (urj_vhdl_pa //static void set_attr_real (urj_vhdl_parser_priv_t *, char *, char *); //static void set_attr_const (urj_vhdl_parser_priv_t *, char *, char *); -void yyerror (urj_vhdl_parser_priv_t *, const char *); +void yyerror (urj_vhdl_parser_priv_t *, void *, const char *); %} %union @@ -690,7 +690,7 @@ Give_Up_And_Quit (urj_vhdl_parser_priv_t /*----------------------------------------------------------------------*/ void -yyerror (urj_vhdl_parser_priv_t *priv_data, const char *error_string) +yyerror (urj_vhdl_parser_priv_t *priv_data, void * scanner, const char *error_string) { } --- urjtag-0.10+r2007.orig/src/bsdl/vhdl_parser.h +++ urjtag-0.10+r2007/src/bsdl/vhdl_parser.h @@ -39,6 +39,6 @@ int urj_vhdl_flex_get_lineno (void *); urj_vhdl_parser_priv_t *urj_vhdl_parser_init (FILE *, urj_bsdl_jtag_ctrl_t *); void urj_vhdl_parser_deinit (urj_vhdl_parser_priv_t *); -int urj_vhdl_parse (urj_vhdl_parser_priv_t *); +int urj_vhdl_parse (urj_vhdl_parser_priv_t *,void *); #endif /* URJ_VHDL_PARSER_H */