Skip to content
Snippets Groups Projects
Commit 5591294c authored by Luigi Rizzo's avatar Luigi Rizzo
Browse files

more dup removal


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 98d769c7
No related branches found
No related tags found
No related merge requests found
...@@ -277,29 +277,14 @@ includes { STORE_POS; return KW_INCLUDES;} ...@@ -277,29 +277,14 @@ includes { STORE_POS; return KW_INCLUDES;}
} }
} }
<argg>{NOARGG}\} { <argg>{NOARGG}[\]\}] {
/*printf("ARGG:%s\n",yytext);*/ char c = yytext[yyleng-1];
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}\] {
/*printf("ARGG:%s\n",yytext);*/ /*printf("ARGG:%s\n",yytext);*/
yylloc->first_line = my_lineno; yylloc->first_line = my_lineno;
yylloc->first_column=my_col; yylloc->first_column=my_col;
if ( pbcpop(']') ) { /* error */ if ( pbcpop(c) ) { /* error */
pbcwhere(yytext, &my_lineno, &my_col); 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); BEGIN(0);
yylloc->last_line = my_lineno; yylloc->last_line = my_lineno;
yylloc->last_column = my_col; yylloc->last_column = my_col;
...@@ -311,7 +296,6 @@ includes { STORE_POS; return KW_INCLUDES;} ...@@ -311,7 +296,6 @@ includes { STORE_POS; return KW_INCLUDES;}
<semic>{NOSEMIC}[\(\[\{] { <semic>{NOSEMIC}[\(\[\{] {
char c = yytext[yyleng-1]; char c = yytext[yyleng-1];
/*printf("SEMIC:%s\n",yytext);*/ /*printf("SEMIC:%s\n",yytext);*/
...@@ -321,13 +305,14 @@ includes { STORE_POS; return KW_INCLUDES;} ...@@ -321,13 +305,14 @@ includes { STORE_POS; return KW_INCLUDES;}
pbcpush(c); pbcpush(c);
} }
<semic>{NOSEMIC}\] { <semic>{NOSEMIC}[\)\]\}] {
char c = yytext[yyleng-1];
/*printf("SEMIC:%s\n",yytext);*/ /*printf("SEMIC:%s\n",yytext);*/
yylloc->first_line = my_lineno; yylloc->first_line = my_lineno;
yylloc->first_column=my_col; yylloc->first_column=my_col;
if ( pbcpop(']') ) { /* error */ if ( pbcpop(c) ) { /* error */
pbcwhere(yytext, &my_lineno, &my_col); 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); BEGIN(0);
yylloc->last_line = my_lineno; yylloc->last_line = my_lineno;
yylloc->last_column= my_col; yylloc->last_column= my_col;
...@@ -337,38 +322,6 @@ includes { STORE_POS; return KW_INCLUDES;} ...@@ -337,38 +322,6 @@ includes { STORE_POS; return KW_INCLUDES;}
yymore(); 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}; { <semic>{NOSEMIC}; {
yylloc->first_line = my_lineno; yylloc->first_line = my_lineno;
yylloc->first_column=my_col; yylloc->first_column=my_col;
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment