summaryrefslogtreecommitdiff
path: root/pbx/ael/ael.flex
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2006-04-27 11:43:34 +0000
committerLuigi Rizzo <rizzo@icir.org>2006-04-27 11:43:34 +0000
commit5591294c5e648ea322c43cc6b573426f995220b7 (patch)
tree1ef049b9ef9852dcefca9969566322392a70e374 /pbx/ael/ael.flex
parent98d769c7c07d25dd229623f8eb3b4443c9015487 (diff)
more dup removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/ael/ael.flex')
-rw-r--r--pbx/ael/ael.flex63
1 files changed, 8 insertions, 55 deletions
diff --git a/pbx/ael/ael.flex b/pbx/ael/ael.flex
index 51c994dfe..e56b1b738 100644
--- a/pbx/ael/ael.flex
+++ b/pbx/ael/ael.flex
@@ -277,29 +277,14 @@ includes { STORE_POS; return KW_INCLUDES;}
}
}
-<argg>{NOARGG}\} {
- /*printf("ARGG:%s\n",yytext);*/
- yylloc->first_line = my_lineno;
- yylloc->first_column=my_col;
- if ( pbcpop('}') ) { /* error */
- pbcwhere(yytext, &my_lineno, &my_col);
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '}' in expression!\n", my_file, my_lineno, my_col);
- BEGIN(0);
- yylloc->last_line = my_lineno;
- yylloc->last_column = my_col;
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
-
-<argg>{NOARGG}\] {
+<argg>{NOARGG}[\]\}] {
+ char c = yytext[yyleng-1];
/*printf("ARGG:%s\n",yytext);*/
yylloc->first_line = my_lineno;
yylloc->first_column=my_col;
- if ( pbcpop(']') ) { /* error */
+ if ( pbcpop(c) ) { /* error */
pbcwhere(yytext, &my_lineno, &my_col);
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ']' in expression!\n", my_file, my_lineno, my_col);
+ ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0);
yylloc->last_line = my_lineno;
yylloc->last_column = my_col;
@@ -311,7 +296,6 @@ includes { STORE_POS; return KW_INCLUDES;}
-
<semic>{NOSEMIC}[\(\[\{] {
char c = yytext[yyleng-1];
/*printf("SEMIC:%s\n",yytext);*/
@@ -321,13 +305,14 @@ includes { STORE_POS; return KW_INCLUDES;}
pbcpush(c);
}
-<semic>{NOSEMIC}\] {
+<semic>{NOSEMIC}[\)\]\}] {
+ char c = yytext[yyleng-1];
/*printf("SEMIC:%s\n",yytext);*/
yylloc->first_line = my_lineno;
yylloc->first_column=my_col;
- if ( pbcpop(']') ) { /* error */
+ if ( pbcpop(c) ) { /* error */
pbcwhere(yytext, &my_lineno, &my_col);
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ']' in expression!\n", my_file, my_lineno, my_col);
+ ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0);
yylloc->last_line = my_lineno;
yylloc->last_column= my_col;
@@ -337,38 +322,6 @@ includes { STORE_POS; return KW_INCLUDES;}
yymore();
}
-<semic>{NOSEMIC}\} {
- /*printf("SEMIC:%s\n",yytext);*/
- yylloc->first_line = my_lineno;
- yylloc->first_column=my_col;
- if ( pbcpop('}') ) { /* error */
- pbcwhere(yytext, &my_lineno, &my_col);
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '}' in expression!\n", my_file, my_lineno, my_col);
- BEGIN(0);
- yylloc->last_line = my_lineno;
- yylloc->last_column=my_col;
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
-
-<semic>{NOSEMIC}\) {
- /*printf("SEMIC:%s\n",yytext);*/
- yylloc->first_line = my_lineno;
- yylloc->first_column=my_col;
- if ( pbcpop(')') ) { /* error */
- pbcwhere(yytext, &my_lineno, &my_col);
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
- BEGIN(0);
- yylloc->last_line = my_lineno;
- yylloc->last_column=my_col;
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
-
<semic>{NOSEMIC}; {
yylloc->first_line = my_lineno;
yylloc->first_column=my_col;