diff options
author | David Hobley <davidh@sharpblue.org> | 2010-10-04 16:31:26 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-10-04 16:31:26 +0200 |
commit | 3f9bf0a9aeb91b1211a5659044ab1eb22da9be7c (patch) | |
tree | bb92f70d2dfd972eff58d70b81a08a5217e5f553 /l10ntools/source/cfglex.l | |
parent | 44e3fb767feaad3eee464d7d8ae16ce708ec974c (diff) |
More of OD style's comments removal
Diffstat (limited to 'l10ntools/source/cfglex.l')
-rw-r--r-- | l10ntools/source/cfglex.l | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l index 3fc3aa5b965c..a6f6b366a8d5 100644 --- a/l10ntools/source/cfglex.l +++ b/l10ntools/source/cfglex.l @@ -30,6 +30,9 @@ #pragma warning(push, 1) #endif +int yycolumn = 1; +#define YY_USER_ACTION yycolumn += yyleng; + /* external functions (C++ code, declared as extren "C" */ extern int WorkOnTokenSet( int, char* ); extern int InitCfgExport( char * , char *); @@ -116,6 +119,7 @@ int bText=0; } .|\n { + yycolumn = 1; if ( bText == 1 ) WorkOnTokenSet( CFG_TEXTCHAR, yytext ); else @@ -138,7 +142,7 @@ void YYWarning( char *s ) { /* write warning to stderr */ fprintf( stderr, - "Warning: \"%s\" in line %d: \"%s\"\n", s, yylineno, yytext ); + "Warning: \"%s\" in line %d, column %d: \"%s\"\n", s, yylineno, yycolumn, yytext ); } /*****************************************************************************/ @@ -151,7 +155,7 @@ void yyerror ( char *s ) { /* write error to stderr */ fprintf( stderr, - "Error: \"%s\" in line %d: \"%s\"\n", s, yylineno, yytext ); + "Error: \"%s\" in line %d, column %d: \"%s\"\n", s, yylineno, yycolumn, yytext ); SetError(); } |