[asterisk-commits] trunk r22727 - in /trunk/pbx/ael: ael.flex ael_lex.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Apr 26 18:35:52 MST 2006


Author: rizzo
Date: Wed Apr 26 20:35:52 2006
New Revision: 22727

URL: http://svn.digium.com/view/asterisk?rev=22727&view=rev
Log:
move similar blocks close to each other to make similarities
more evident


Modified:
    trunk/pbx/ael/ael.flex
    trunk/pbx/ael/ael_lex.c

Modified: trunk/pbx/ael/ael.flex
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael.flex?rev=22727&r1=22726&r2=22727&view=diff
==============================================================================
--- trunk/pbx/ael/ael.flex (original)
+++ trunk/pbx/ael/ael.flex Wed Apr 26 20:35:52 2006
@@ -135,6 +135,9 @@
 		return word;
 	}
 
+
+
+
 <paren>{NOPARENS}\)	{
 		yylloc->first_line = my_lineno;
 		yylloc->first_column=my_col;
@@ -215,6 +218,35 @@
 			yylval->str = strdup(yytext);
 			return word;
 		}
+		yymore();
+	}
+
+
+
+
+<argg>{NOARGG}\(	  {
+		/* printf("ARGG:%s\n",yytext); */
+		/* printf("GOT AN LP!!!\n"); */
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		parencount++;
+		pbcpush('(');
+		yymore();
+	}
+
+<argg>{NOARGG}\[	{
+		/*printf("ARGG:%s\n",yytext);*/
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		pbcpush('[');
+		yymore();
+	}
+
+<argg>{NOARGG}\{	{
+		/*printf("ARGG:%s\n",yytext);*/
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		pbcpush('{');
 		yymore();
 	}
 
@@ -254,16 +286,6 @@
 				return word;
 			}
 		}
-	}
-
-<argg>{NOARGG}\(	  {
-		/* printf("ARGG:%s\n",yytext); */
-		/* printf("GOT AN LP!!!\n"); */
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		parencount++;
-		pbcpush('(');
-		yymore();
 	}
 
 <argg>{NOARGG}\,	{
@@ -299,14 +321,6 @@
 		}
 	}
 
-<argg>{NOARGG}\{	{
-		/*printf("ARGG:%s\n",yytext);*/
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		pbcpush('{');
-		yymore();
-	}
-
 <argg>{NOARGG}\}	{
 		/*printf("ARGG:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -323,14 +337,6 @@
 		yymore();
 	}
 
-<argg>{NOARGG}\[	{
-		/*printf("ARGG:%s\n",yytext);*/
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		pbcpush('[');
-		yymore();
-	}
-
 <argg>{NOARGG}\]	{
 		/*printf("ARGG:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -347,6 +353,9 @@
 		yymore();
 	}
 
+
+
+
 <semic>{NOSEMIC}\[	{
 		/*printf("SEMIC:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -355,6 +364,22 @@
 		pbcpush('[');
 		}
 
+<semic>{NOSEMIC}\{	{
+		/*printf("SEMIC:%s\n",yytext);*/
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		pbcpush('{');
+		yymore();
+	}
+
+<semic>{NOSEMIC}\(	{
+		/*printf("SEMIC:%s\n",yytext);*/
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		pbcpush('(');
+		yymore();
+	}
+
 <semic>{NOSEMIC}\]	{
 		/*printf("SEMIC:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -371,14 +396,6 @@
 		yymore();
 	}
 
-<semic>{NOSEMIC}\{	{
-		/*printf("SEMIC:%s\n",yytext);*/
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		pbcpush('{');
-		yymore();
-	}
-
 <semic>{NOSEMIC}\}	{
 		/*printf("SEMIC:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -392,14 +409,6 @@
 			yylval->str = strdup(yytext);
 			return word;
 		}
-		yymore();
-	}
-
-<semic>{NOSEMIC}\(	{
-		/*printf("SEMIC:%s\n",yytext);*/
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		pbcpush('(');
 		yymore();
 	}
 

Modified: trunk/pbx/ael/ael_lex.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael_lex.c?rev=22727&r1=22726&r2=22727&view=diff
==============================================================================
--- trunk/pbx/ael/ael_lex.c (original)
+++ trunk/pbx/ael/ael_lex.c Wed Apr 26 20:35:52 2006
@@ -372,14 +372,14 @@
         8,    5,    6,   12,   43,   43,   43,   43,   43,   43,
        43,   43,   43,   43,   43,   43,   43,   43,   43,    1,
        10,    2,   65,   45,   44,   46,   47,   48,   49,   65,
-       61,   62,   63,   57,   58,   59,   60,   65,   51,   50,
-       52,   55,   56,   53,   54,   42,   41,   43,   43,   13,
+       59,   62,   63,   57,   60,   58,   61,   65,   50,   53,
+       54,   51,   56,   52,   55,   42,   41,   43,   43,   13,
        11,   43,   43,   43,   43,   43,   43,   43,   43,   43,
        43,   43,   20,   43,   43,   43,   43,   43,   43,   43,
        43,   43,    0,   45,   44,   46,   47,   48,   49,    0,
 
-       61,   62,   63,   57,   58,   59,   60,    0,   51,   50,
-       52,   55,   56,   53,   54,   43,   13,   13,   43,   43,
+       59,   62,   63,   57,   60,   58,   61,    0,   50,   53,
+       54,   51,   56,   52,   55,   43,   13,   13,   43,   43,
        43,   43,   43,   43,   43,   43,   31,   43,   43,   43,
        43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
        43,   43,   43,   43,   33,   43,   43,   43,   25,   43,
@@ -1257,7 +1257,7 @@
 case 44:
 /* rule 44 can match eol */
 YY_RULE_SETUP
-#line 138 "ael.flex"
+#line 141 "ael.flex"
 {
 		yylloc->first_line = my_lineno;
 		yylloc->first_column=my_col;
@@ -1290,7 +1290,7 @@
 case 45:
 /* rule 45 can match eol */
 YY_RULE_SETUP
-#line 167 "ael.flex"
+#line 170 "ael.flex"
 {
 		yylloc->first_line = my_lineno;
 		yylloc->first_column=my_col;
@@ -1302,7 +1302,7 @@
 case 46:
 /* rule 46 can match eol */
 YY_RULE_SETUP
-#line 175 "ael.flex"
+#line 178 "ael.flex"
 {
 		yylloc->first_line = my_lineno;
 		yylloc->first_column=my_col;
@@ -1313,7 +1313,7 @@
 case 47:
 /* rule 47 can match eol */
 YY_RULE_SETUP
-#line 182 "ael.flex"
+#line 185 "ael.flex"
 {
 		yylloc->first_line = my_lineno;
 		yylloc->first_column=my_col;
@@ -1333,7 +1333,7 @@
 case 48:
 /* rule 48 can match eol */
 YY_RULE_SETUP
-#line 198 "ael.flex"
+#line 201 "ael.flex"
 {
 		yylloc->first_line = my_lineno;
 		yylloc->first_column=my_col;
@@ -1344,7 +1344,7 @@
 case 49:
 /* rule 49 can match eol */
 YY_RULE_SETUP
-#line 205 "ael.flex"
+#line 208 "ael.flex"
 {
 		yylloc->first_line = my_lineno;
 		yylloc->first_column=my_col;
@@ -1364,7 +1364,45 @@
 case 50:
 /* rule 50 can match eol */
 YY_RULE_SETUP
-#line 221 "ael.flex"
+#line 227 "ael.flex"
+{
+		/* printf("ARGG:%s\n",yytext); */
+		/* printf("GOT AN LP!!!\n"); */
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		parencount++;
+		pbcpush('(');
+		yymore();
+	}
+	YY_BREAK
+case 51:
+/* rule 51 can match eol */
+YY_RULE_SETUP
+#line 237 "ael.flex"
+{
+		/*printf("ARGG:%s\n",yytext);*/
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		pbcpush('[');
+		yymore();
+	}
+	YY_BREAK
+case 52:
+/* rule 52 can match eol */
+YY_RULE_SETUP
+#line 245 "ael.flex"
+{
+		/*printf("ARGG:%s\n",yytext);*/
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		pbcpush('{');
+		yymore();
+	}
+	YY_BREAK
+case 53:
+/* rule 53 can match eol */
+YY_RULE_SETUP
+#line 253 "ael.flex"
 {
 		/* printf("ARGG:%s\n",yytext); */
 		yylloc->first_line = my_lineno;
@@ -1403,24 +1441,10 @@
 		}
 	}
 	YY_BREAK
-case 51:
-/* rule 51 can match eol */
-YY_RULE_SETUP
-#line 259 "ael.flex"
-{
-		/* printf("ARGG:%s\n",yytext); */
-		/* printf("GOT AN LP!!!\n"); */
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		parencount++;
-		pbcpush('(');
-		yymore();
-	}
-	YY_BREAK
-case 52:
-/* rule 52 can match eol */
-YY_RULE_SETUP
-#line 269 "ael.flex"
+case 54:
+/* rule 54 can match eol */
+YY_RULE_SETUP
+#line 291 "ael.flex"
 {
 		/* printf("ARGG:%s\n",yytext); */
 		if( parencount != 0) {
@@ -1454,22 +1478,10 @@
 		}
 	}
 	YY_BREAK
-case 53:
-/* rule 53 can match eol */
-YY_RULE_SETUP
-#line 302 "ael.flex"
-{
-		/*printf("ARGG:%s\n",yytext);*/
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		pbcpush('{');
-		yymore();
-	}
-	YY_BREAK
-case 54:
-/* rule 54 can match eol */
-YY_RULE_SETUP
-#line 310 "ael.flex"
+case 55:
+/* rule 55 can match eol */
+YY_RULE_SETUP
+#line 324 "ael.flex"
 {
 		/*printf("ARGG:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -1486,22 +1498,10 @@
 		yymore();
 	}
 	YY_BREAK
-case 55:
-/* rule 55 can match eol */
-YY_RULE_SETUP
-#line 326 "ael.flex"
-{
-		/*printf("ARGG:%s\n",yytext);*/
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		pbcpush('[');
-		yymore();
-	}
-	YY_BREAK
 case 56:
 /* rule 56 can match eol */
 YY_RULE_SETUP
-#line 334 "ael.flex"
+#line 340 "ael.flex"
 {
 		/*printf("ARGG:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -1521,7 +1521,7 @@
 case 57:
 /* rule 57 can match eol */
 YY_RULE_SETUP
-#line 350 "ael.flex"
+#line 359 "ael.flex"
 {
 		/*printf("SEMIC:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -1533,7 +1533,31 @@
 case 58:
 /* rule 58 can match eol */
 YY_RULE_SETUP
-#line 358 "ael.flex"
+#line 367 "ael.flex"
+{
+		/*printf("SEMIC:%s\n",yytext);*/
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		pbcpush('{');
+		yymore();
+	}
+	YY_BREAK
+case 59:
+/* rule 59 can match eol */
+YY_RULE_SETUP
+#line 375 "ael.flex"
+{
+		/*printf("SEMIC:%s\n",yytext);*/
+		yylloc->first_line = my_lineno;
+		yylloc->first_column=my_col;
+		pbcpush('(');
+		yymore();
+	}
+	YY_BREAK
+case 60:
+/* rule 60 can match eol */
+YY_RULE_SETUP
+#line 383 "ael.flex"
 {
 		/*printf("SEMIC:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -1550,22 +1574,10 @@
 		yymore();
 	}
 	YY_BREAK
-case 59:
-/* rule 59 can match eol */
-YY_RULE_SETUP
-#line 374 "ael.flex"
-{
-		/*printf("SEMIC:%s\n",yytext);*/
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		pbcpush('{');
-		yymore();
-	}
-	YY_BREAK
-case 60:
-/* rule 60 can match eol */
-YY_RULE_SETUP
-#line 382 "ael.flex"
+case 61:
+/* rule 61 can match eol */
+YY_RULE_SETUP
+#line 399 "ael.flex"
 {
 		/*printf("SEMIC:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -1582,22 +1594,10 @@
 		yymore();
 	}
 	YY_BREAK
-case 61:
-/* rule 61 can match eol */
-YY_RULE_SETUP
-#line 398 "ael.flex"
-{
-		/*printf("SEMIC:%s\n",yytext);*/
-		yylloc->first_line = my_lineno;
-		yylloc->first_column=my_col;
-		pbcpush('(');
-		yymore();
-	}
-	YY_BREAK
 case 62:
 /* rule 62 can match eol */
 YY_RULE_SETUP
-#line 406 "ael.flex"
+#line 415 "ael.flex"
 {
 		/*printf("SEMIC:%s\n",yytext);*/
 		yylloc->first_line = my_lineno;
@@ -1617,7 +1617,7 @@
 case 63:
 /* rule 63 can match eol */
 YY_RULE_SETUP
-#line 422 "ael.flex"
+#line 431 "ael.flex"
 {
 		yylloc->first_line = my_lineno;
 		yylloc->first_column=my_col;
@@ -1636,7 +1636,7 @@
 case 64:
 /* rule 64 can match eol */
 YY_RULE_SETUP
-#line 437 "ael.flex"
+#line 446 "ael.flex"
 {
 		FILE *in1;
 		char fnamebuf[1024],*p1,*p2;
@@ -1703,7 +1703,7 @@
 case YY_STATE_EOF(paren):
 case YY_STATE_EOF(semic):
 case YY_STATE_EOF(argg):
-#line 499 "ael.flex"
+#line 508 "ael.flex"
 {
 		if ( --include_stack_index < 0 ) {
 			yyterminate();
@@ -1719,7 +1719,7 @@
 	YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 512 "ael.flex"
+#line 521 "ael.flex"
 ECHO;
 	YY_BREAK
 #line 1726 "ael_lex.c"
@@ -2852,7 +2852,7 @@
 
 #define YYTABLES_NAME "yytables"
 
-#line 512 "ael.flex"
+#line 521 "ael.flex"
 
 
 



More information about the asterisk-commits mailing list