#include <stdlib.h>
#include <string.h>
#include "config.h"
+#include "parser.h"
+#include "scanner.h"
+
+int yyerror(YYLTYPE *location, void* scanner, const char* msg);
#define YYERROR_VERBOSE 1
/* Check lineno. */
if( $1 != @1.first_line || $1 != testget_lineno(scanner))
{
- yyerror("Parse failed: Line numbers do not match.");
+ yyerror(0, 0, "Parse failed: Line numbers do not match.");
YYABORT;
}
%%
-int yyerror(void* scanner, char* msg) {
+int yyerror(YYLTYPE *location, void* scanner, const char* msg) {
+ (void)location;
(void)scanner;
fprintf(stderr,"%s\n",msg);
return 0;
#include <stdlib.h>
#include <string.h>
#include "config.h"
+#include "parser.h"
+#include "scanner.h"
#define YYERROR_VERBOSE 1
+int yyerror(void* scanner, const char* msg);
/* A dummy function. A check against seg-faults in yylval->str. */
int process_text(char* s) {
endtag: LTSLASH TAGNAME GT { process_text($2);free($2);} ;
%%
-int yyerror(void* scanner, char* msg) {
+int yyerror(void* scanner, const char* msg) {
(void)scanner;
fprintf(stderr,"%s\n",msg);
return 0;