do { \
yylloc->source = 0; \
yylloc->first_column = yycolumn + 1; \
- yylloc->first_line = yylineno + 1; \
+ yylloc->first_line = yylineno; \
yycolumn += yyleng; \
} while(0);
%}
* Simply pass them through to the main compiler's lexer/parser. */
{HASH}(extension|version|pragma).*\n {
yylval->str = xtalloc_strdup (yyextra, yytext);
+ yylineno++;
+ yycolumn = 0;
return OTHER;
}
* We use the lexing_if flag to avoid skipping any part of an
* if conditional expression. */
[^\n]+/\n {
+ /* Since this rule always matches, YY_USER_ACTION gets called for it,
+ * wrongly incrementing yycolumn. We undo that effect here. */
+ yycolumn -= yyleng;
if (yyextra->lexing_if ||
yyextra->skip_stack == NULL ||
yyextra->skip_stack->type == SKIP_NO_SKIP)