Ticket #37543: patch-bison-2.6.diff

File patch-bison-2.6.diff, 2.1 KB (added by ryandesign (Ryan Carsten Schmidt), 12 years ago)
  • lib/gram.y

    https://github.com/indeyets/syck/issues/10
    
    diff --git a/lib/gram.y b/lib/gram.y
    index c32889a..d47add9 100644
    a b  
    99
    1010%start doc
    1111%pure-parser
     12%parse-param {void* parser}
     13%lex-param {void* parser}
    1214
    1315
    1416%{
     
    2426
    2527void apply_seq_in_map( SyckParser *parser, SyckNode *n );
    2628
    27 #define YYPARSE_PARAM   parser
    28 #define YYLEX_PARAM     parser
    29 
    3029#define NULL_NODE(parser, node) \
    3130        SyckNode *node = syck_new_str( "", scalar_plain ); \
    3231        if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
  • lib/syck.h

    diff --git a/lib/syck.h b/lib/syck.h
    index 6282129..fedce0e 100644
    a b struct _syck_emitter_node { 
    467467/*
    468468 * Lexer prototypes
    469469 */
    470 void syckerror( const char * );
     470void syckerror( void *, const char * );
    471471int syckparse( void * );
    472472
    473473#if defined(__cplusplus)
  • lib/token.c

    diff --git a/lib/token.c b/lib/token.c
    index 18f464a..8fbe7ab 100644
    a b  
    200200    { \
    201201        if ( *indent == '\t' ) \
    202202        { \
    203             syckerror("TAB found in your indentation, please remove"); \
     203            syckerror(0, "TAB found in your indentation, please remove"); \
    204204            return 0; \
    205205        } \
    206206        else if ( is_newline( indent++ ) ) \
     
    266266        return sycklex_yaml_utf8( sycklval, parser );
    267267
    268268        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!" );
    270270        break;
    271271
    272272        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!" );
    274274        break;
    275275
    276276        case syck_bytecode_utf8:
     
    27682768}
    27692769
    27702770void
    2771 syckerror( const char *msg )
     2771syckerror( void * parser, const char *msg )
    27722772{
    27732773    if ( syck_parser_ptr->error_handler == NULL )
    27742774        syck_parser_ptr->error_handler = syck_default_error_handler;