diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-28 15:24:30 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-28 15:24:30 +0000 |
commit | 859a7936e18aa9299f8446f92249b2d0197146fa (patch) | |
tree | 0f661fe3828c26398d0557c135e2e5d395620609 /pbx/ael/ael.flex | |
parent | 5a2411d0df529ab64f60fd4b3d61515910ad9ebe (diff) |
fix a bug in computing line numbers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23151 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/ael/ael.flex')
-rw-r--r-- | pbx/ael/ael.flex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pbx/ael/ael.flex b/pbx/ael/ael.flex index 0a063b8b7..ffd9cdef0 100644 --- a/pbx/ael/ael.flex +++ b/pbx/ael/ael.flex @@ -78,7 +78,7 @@ static int commaout = 0; * current line, column and filename, updated as we read the input. */ static int my_lineno = 1; /* current line in the source */ -static int my_col = 0; /* current column in the source */ +static int my_col = 1; /* current column in the source */ char *my_file = 0; /* used also in the bison code */ char *prev_word; /* XXX document it */ @@ -155,7 +155,7 @@ static void pbcwhere(const char *text, int *line, int *col ) #define STORE_END do { \ pbcwhere(yytext, &my_lineno, &my_col); \ yylloc->last_line = my_lineno; \ - yylloc->last_column = my_col; \ + yylloc->last_column = my_col - 1; \ } while (0) #else #define STORE_POS @@ -253,7 +253,7 @@ includes { STORE_POS; return KW_INCLUDES;} <paren>{NOPARENS}[\(\[\{] { char c = yytext[yyleng-1]; - STORE_START; + // STORE_START; if (c == '(') parencount++; pbcpush(c); @@ -293,11 +293,11 @@ includes { STORE_POS; return KW_INCLUDES;} return word; } - STORE_END; parencount--; if( parencount >= 0){ yymore(); } else { + STORE_END; yylval->str = strdup(yytext); if(yyleng > 1 ) *(yylval->str+yyleng-1)=0; |