Permalink
Browse files

Replace deprecated YY*_PARAM

  • Loading branch information...
1 parent 305f418 commit 2cd21a6bceb7cea6920aadb6ff43fe46a9585820 @xhochy xhochy committed Sep 20, 2012
Showing with 7 additions and 8 deletions.
  1. +2 −3 lib/gram.y
  2. +1 −1 lib/syck.h
  3. +4 −4 lib/token.c
View
@@ -9,6 +9,8 @@
%start doc
%pure-parser
+%parse-param {void* parser}
+%lex-param {void* parser}
%{
@@ -24,9 +26,6 @@
void apply_seq_in_map( SyckParser *parser, SyckNode *n );
-#define YYPARSE_PARAM parser
-#define YYLEX_PARAM parser
-
#define NULL_NODE(parser, node) \
SyckNode *node = syck_new_str( "", scalar_plain ); \
if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
View
@@ -467,7 +467,7 @@ long syck_seq_count( SyckNode * );
/*
* Lexer prototypes
*/
-void syckerror( const char * );
+void syckerror( void *, const char * );
int syckparse( void * );
#if defined(__cplusplus)
View
@@ -200,7 +200,7 @@
{ \
if ( *indent == '\t' ) \
{ \
- syckerror("TAB found in your indentation, please remove"); \
+ syckerror(0, "TAB found in your indentation, please remove"); \
return 0; \
} \
else if ( is_newline( indent++ ) ) \
@@ -266,11 +266,11 @@ sycklex( YYSTYPE *sycklval, SyckParser *parser )
return sycklex_yaml_utf8( sycklval, parser );
case syck_yaml_utf16:
- syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
+ syckerror(0, "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
break;
case syck_yaml_utf32:
- syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
+ syckerror(0, "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
break;
case syck_bytecode_utf8:
@@ -2768,7 +2768,7 @@ syckwrap()
}
void
-syckerror( const char *msg )
+syckerror( void * parser, const char *msg )
{
if ( syck_parser_ptr->error_handler == NULL )
syck_parser_ptr->error_handler = syck_default_error_handler;

0 comments on commit 2cd21a6

Please sign in to comment.