https://github.com/indeyets/syck/issues/10
diff --git a/lib/gram.y b/lib/gram.y
index c32889a..d47add9 100644
a
|
b
|
|
9 | 9 | |
10 | 10 | %start doc |
11 | 11 | %pure-parser |
| 12 | %parse-param {void* parser} |
| 13 | %lex-param {void* parser} |
12 | 14 | |
13 | 15 | |
14 | 16 | %{ |
… |
… |
|
24 | 26 | |
25 | 27 | void apply_seq_in_map( SyckParser *parser, SyckNode *n ); |
26 | 28 | |
27 | | #define YYPARSE_PARAM parser |
28 | | #define YYLEX_PARAM parser |
29 | | |
30 | 29 | #define NULL_NODE(parser, node) \ |
31 | 30 | SyckNode *node = syck_new_str( "", scalar_plain ); \ |
32 | 31 | if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \ |
diff --git a/lib/syck.h b/lib/syck.h
index 6282129..fedce0e 100644
a
|
b
|
struct _syck_emitter_node { |
467 | 467 | /* |
468 | 468 | * Lexer prototypes |
469 | 469 | */ |
470 | | void syckerror( const char * ); |
| 470 | void syckerror( void *, const char * ); |
471 | 471 | int syckparse( void * ); |
472 | 472 | |
473 | 473 | #if defined(__cplusplus) |
diff --git a/lib/token.c b/lib/token.c
index 18f464a..8fbe7ab 100644
a
|
b
|
|
200 | 200 | { \ |
201 | 201 | if ( *indent == '\t' ) \ |
202 | 202 | { \ |
203 | | syckerror("TAB found in your indentation, please remove"); \ |
| 203 | syckerror(0, "TAB found in your indentation, please remove"); \ |
204 | 204 | return 0; \ |
205 | 205 | } \ |
206 | 206 | else if ( is_newline( indent++ ) ) \ |
… |
… |
|
266 | 266 | return sycklex_yaml_utf8( sycklval, parser ); |
267 | 267 | |
268 | 268 | case syck_yaml_utf16: |
269 | | syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" ); |
| 269 | syckerror(0, "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" ); |
270 | 270 | break; |
271 | 271 | |
272 | 272 | case syck_yaml_utf32: |
273 | | syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" ); |
| 273 | syckerror(0, "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" ); |
274 | 274 | break; |
275 | 275 | |
276 | 276 | case syck_bytecode_utf8: |
… |
… |
|
2768 | 2768 | } |
2769 | 2769 | |
2770 | 2770 | void |
2771 | | syckerror( const char *msg ) |
| 2771 | syckerror( void * parser, const char *msg ) |
2772 | 2772 | { |
2773 | 2773 | if ( syck_parser_ptr->error_handler == NULL ) |
2774 | 2774 | syck_parser_ptr->error_handler = syck_default_error_handler; |