diff options
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -75,8 +75,8 @@ int yylex_destroy(void) #endif /* Missing prototypes not generated by flex. */ -int yyget_column(void *); -void yyset_column (int column_no , yyscan_t yyscanner); +int yyget_column(yyscan_t); +void yyset_column (int column_no, yyscan_t yyscanner); void yyerror(scanner_t *scanner, parser_t *parser, const char *s) { @@ -103,7 +103,7 @@ void yyerrorf(scanner_t *scanner, val fmt, ...) parser->errors++; } -static void yyerrprepf(void *scanner, val fmt, ...) +static void yyerrprepf(scanner_t *scanner, val fmt, ...) { parser_t *parser = yyget_extra(scanner); @@ -689,13 +689,13 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} } <SPECIAL,QSPECIAL,NESTED,BRACED>{UANYN} { - yyerrprepf(yyscanner, lit("bad character in directive: '~a'"), + yyerrprepf(yyg, lit("bad character in directive: '~a'"), string_utf8(yytext), nao); return ERRTOK; } <SPECIAL,QSPECIAL,NESTED,BRACED>. { - yyerrprepf(yyscanner, lit("non-UTF-8 byte in directive: '\\x~02x'"), + yyerrprepf(yyg, lit("non-UTF-8 byte in directive: '\\x~02x'"), num((unsigned char) yytext[0]), nao); return ERRTOK; } @@ -727,7 +727,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} <REGEX>\n { yyextra->lineno++; - yyerrprepf(yyscanner, lit("newline in regex"), nao); + yyerrprepf(yyg, lit("newline in regex"), nao); return ERRTOK; } @@ -752,7 +752,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} } <REGEX>[\\] { - yyerrprepf(yyscanner, lit("dangling backslash in regex"), nao); + yyerrprepf(yyg, lit("dangling backslash in regex"), nao); return ERRTOK; } @@ -764,7 +764,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} } <REGEX>. { - yyerrprepf(yyscanner, lit("non-UTF-8 byte in regex: '\\x~02x'"), + yyerrprepf(yyg, lit("non-UTF-8 byte in regex: '\\x~02x'"), num((unsigned char) yytext[0]), nao); return ERRTOK; } @@ -857,21 +857,21 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} } <STRLIT>\n { - yyerrprepf(yyscanner, lit("newline in string literal"), nao); + yyerrprepf(yyg, lit("newline in string literal"), nao); yyextra->lineno++; yylval->chr = yytext[0]; return ERRTOK; } <CHRLIT>\n { - yyerrprepf(yyscanner, lit("newline in character literal"), nao); + yyerrprepf(yyg, lit("newline in character literal"), nao); yyextra->lineno++; yylval->chr = yytext[0]; return ERRTOK; } <QSILIT>\n { - yyerrprepf(yyscanner, lit("newline in string quasiliteral"), nao); + yyerrprepf(yyg, lit("newline in string quasiliteral"), nao); yyextra->lineno++; yylval->chr = yytext[0]; return ERRTOK; @@ -898,7 +898,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} } <STRLIT,CHRLIT,QSILIT,WLIT,QWLIT>. { - yyerrprepf(yyscanner, lit("non-UTF-8 byte in literal: '\\x~02x'"), + yyerrprepf(yyg, lit("non-UTF-8 byte in literal: '\\x~02x'"), num((unsigned char) yytext[0]), nao); return ERRTOK; } |