Capture preprocessor-output lines and EOLs
This commit is contained in:
parent
47bb3f5219
commit
7107699bc5
@ -6,6 +6,8 @@
|
||||
#include "parser.h"
|
||||
#include "parser.tab.h"
|
||||
|
||||
#define YY_USER_ACTION yylloc->first_column += yyleng;
|
||||
|
||||
%}
|
||||
|
||||
%x str
|
||||
@ -114,4 +116,13 @@ sizeof return TOK_SIZEOF;
|
||||
|
||||
[a-zA-Z_][a-zA-Z_0-9]* return TOK_IDENTIFIER;
|
||||
|
||||
^[ ]*#[ ]+[0-9]+[ ]+\".+\".*$ {
|
||||
}
|
||||
\n {
|
||||
yylloc->first_line++;
|
||||
yylloc->first_column = 0;
|
||||
yylloc->last_line++;
|
||||
yylloc->last_column = 0;
|
||||
}
|
||||
|
||||
%%
|
||||
|
Loading…
x
Reference in New Issue
Block a user