| 61 | |
| 62 | |
| 63 | void yyerror( char const * s ) |
| 64 | { |
| 65 | /* We use yylval instead of incp to access the error location information as |
| 66 | * the incp pointer will already be reset to 0 in case the error occurred at |
| 67 | * EOF. |
| 68 | * |
| 69 | * The two may differ only if ran into an unexpected EOF or we get an error |
| 70 | * while reading a lexical token spanning multiple lines, e.g. a multi-line |
| 71 | * string literal or action body, in which case yylval location information |
| 72 | * will hold the information about where the token started while incp will |
| 73 | * hold the information about where reading it broke. |
| 74 | */ |
| 75 | printf( "%s:%d: %s at %s\n", object_str( yylval.file ), yylval.line, s, |
| 76 | symdump( &yylval ) ); |
| 77 | ++anyerrors; |
| 78 | } |
| 79 | |
| 80 | |
| 81 | int yyanyerrors() |
no test coverage detected