[asterisk-commits] branch murf/AEL2 r9042 - in /team/murf/AEL2/pbx:
ael.flex ael_lex.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Feb 1 09:10:26 MST 2006
Author: murf
Date: Wed Feb 1 10:10:24 2006
New Revision: 9042
URL: http://svn.digium.com/view/asterisk?rev=9042&view=rev
Log:
I needed to add a single quote to the pattern for a generic 'word'.
Modified:
team/murf/AEL2/pbx/ael.flex
team/murf/AEL2/pbx/ael_lex.c
Modified: team/murf/AEL2/pbx/ael.flex
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/ael.flex?rev=9042&r1=9041&r2=9042&view=diff
==============================================================================
--- team/murf/AEL2/pbx/ael.flex (original)
+++ team/murf/AEL2/pbx/ael.flex Wed Feb 1 10:10:24 2006
@@ -119,7 +119,7 @@
[ ]+ {/* nothing */ my_col+=yyleng;}
[ ]+ {/* nothing */ int wid = 8-(my_col%8); my_col+=wid;}
-[-a-zA-Z0-9"_/.\<\>\*\+!$#\[\]][-a-zA-Z0-9"_/.!\*\+\<\>\{\}$#\[\]]* {
+[-a-zA-Z0-9'"_/.\<\>\*\+!$#\[\]][-a-zA-Z0-9'"_/.!\*\+\<\>\{\}$#\[\]]* {
yylloc->first_line = yylloc->last_line = my_lineno;yylloc->last_column=my_col+yyleng-1; yylloc->first_column=my_col; /* set up the ptr */
yylval->str = strdup(yytext);
/* printf("\nGot WORD %s[%d][%d:%d]\n", yylval->str, my_lineno ,yylloc->first_column,yylloc->last_column ); */
@@ -454,28 +454,28 @@
strcpy(fnamebuf,p1+1);
in1 = fopen( fnamebuf, "r" );
if ( ! in1 ) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
+ ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
} else {
- char *buffer;
+ char *buffer;
struct stat stats;
stat(fnamebuf, &stats);
buffer = (char*)malloc(stats.st_size+1);
fread(buffer, 1, stats.st_size, in1);
- buffer[stats.st_size] = 0;
-
+ buffer[stats.st_size] = 0;
+ ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf, (int)stats.st_size);
fclose(in1);
- include_stack[include_stack_index].fname = my_file;
- my_file = strdup(fnamebuf);
- include_stack[include_stack_index].lineno = my_lineno;
- include_stack[include_stack_index].colno = my_col+yyleng;
- include_stack[include_stack_index++].bufstate = YY_CURRENT_BUFFER;
+ include_stack[include_stack_index].fname = my_file;
+ my_file = strdup(fnamebuf);
+ include_stack[include_stack_index].lineno = my_lineno;
+ include_stack[include_stack_index].colno = my_col+yyleng;
+ include_stack[include_stack_index++].bufstate = YY_CURRENT_BUFFER;
yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner);
- free(buffer);
- my_lineno = 1;
- my_col = 1;
- BEGIN(INITIAL);
+ free(buffer);
+ my_lineno = 1;
+ my_col = 1;
+ BEGIN(INITIAL);
}
}
}
Modified: team/murf/AEL2/pbx/ael_lex.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/ael_lex.c?rev=9042&r1=9041&r2=9042&view=diff
==============================================================================
--- team/murf/AEL2/pbx/ael_lex.c (original)
+++ team/murf/AEL2/pbx/ael_lex.c Wed Feb 1 10:10:24 2006
@@ -387,7 +387,7 @@
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 5, 6, 7, 5, 1, 8, 1, 9,
+ 1, 4, 5, 6, 7, 5, 1, 8, 5, 9,
10, 5, 5, 11, 5, 5, 12, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 13, 14, 5,
15, 16, 1, 17, 5, 5, 5, 5, 5, 5,
@@ -1657,28 +1657,28 @@
strcpy(fnamebuf,p1+1);
in1 = fopen( fnamebuf, "r" );
if ( ! in1 ) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
+ ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
} else {
- char *buffer;
+ char *buffer;
struct stat stats;
stat(fnamebuf, &stats);
buffer = (char*)malloc(stats.st_size+1);
fread(buffer, 1, stats.st_size, in1);
- buffer[stats.st_size] = 0;
-
+ buffer[stats.st_size] = 0;
+ ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf, (int)stats.st_size);
fclose(in1);
- include_stack[include_stack_index].fname = my_file;
- my_file = strdup(fnamebuf);
- include_stack[include_stack_index].lineno = my_lineno;
- include_stack[include_stack_index].colno = my_col+yyleng;
- include_stack[include_stack_index++].bufstate = YY_CURRENT_BUFFER;
+ include_stack[include_stack_index].fname = my_file;
+ my_file = strdup(fnamebuf);
+ include_stack[include_stack_index].lineno = my_lineno;
+ include_stack[include_stack_index].colno = my_col+yyleng;
+ include_stack[include_stack_index++].bufstate = YY_CURRENT_BUFFER;
ael_yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner);
- free(buffer);
- my_lineno = 1;
- my_col = 1;
- BEGIN(INITIAL);
+ free(buffer);
+ my_lineno = 1;
+ my_col = 1;
+ BEGIN(INITIAL);
}
}
}
More information about the asterisk-commits
mailing list