[asterisk-commits] seanbright: branch group/asterisk-cpp r168753 - /team/group/asterisk-cpp/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 15 23:28:50 CST 2009


Author: seanbright
Date: Thu Jan 15 23:28:50 2009
New Revision: 168753

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168753
Log:
Ladies and gentleman, we have a linking asterisk binary under g++.

Modified:
    team/group/asterisk-cpp/main/ast_expr2.c
    team/group/asterisk-cpp/main/ast_expr2.h
    team/group/asterisk-cpp/main/ast_expr2.y

Modified: team/group/asterisk-cpp/main/ast_expr2.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2.c?view=diff&rev=168753&r1=168752&r2=168753
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2.c (original)
+++ team/group/asterisk-cpp/main/ast_expr2.c Thu Jan 15 23:28:50 2009
@@ -440,29 +440,6 @@
 static struct expr_node *alloc_expr_node(enum node_type);
 static void destroy_arglist(struct expr_node *arglist);
 
-/* uh, if I want to predeclare yylex with a YYLTYPE, I have to predeclare the yyltype... sigh */
-typedef struct yyltype
-{
-  int first_line;
-  int first_column;
-
-  int last_line;
-  int last_column;
-} yyltype;
-
-# define YYLTYPE yyltype
-# define YYLTYPE_IS_TRIVIAL 1
-
-/* we will get warning about no prototype for yylex! But we can't
-   define it here, we have no definition yet for YYSTYPE. */
-
-int		ast_yyerror(const char *,YYLTYPE *, struct parse_io *);
- 
-/* I wanted to add args to the yyerror routine, so I could print out
-   some useful info about the error. Not as easy as it looks, but it
-   is possible. */
-#define ast_yyerror(x) ast_yyerror(x,&yyloc,(struct parse_io *)parseio)
-#define DESTROY(x) {if((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) free((x)->u.s); (x)->u.s = 0; free(x);}
 
 
 /* Enabling traces.  */
@@ -485,13 +462,13 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 344 "ast_expr2.y"
+#line 321 "ast_expr2.y"
 {
 	struct val *val;
 	struct expr_node *arglist;
 }
 /* Line 187 of yacc.c.  */
-#line 495 "ast_expr2.c"
+#line 472 "ast_expr2.c"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -513,13 +490,21 @@
 
 
 /* Copy the second part of user declarations.  */
-#line 349 "ast_expr2.y"
+#line 326 "ast_expr2.y"
+
+int		ast_yyerror(const char *,YYLTYPE *, struct parse_io *);
+ 
+/* I wanted to add args to the yyerror routine, so I could print out
+   some useful info about the error. Not as easy as it looks, but it
+   is possible. */
+#define ast_yyerror(x) ast_yyerror(x,&yyloc,(struct parse_io *)parseio)
+#define DESTROY(x) {if((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) free((x)->u.s); (x)->u.s = 0; free(x);}
 
 extern int		ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
 
 
 /* Line 216 of yacc.c.  */
-#line 523 "ast_expr2.c"
+#line 508 "ast_expr2.c"
 
 #ifdef short
 # undef short
@@ -816,9 +801,9 @@
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   373,   373,   381,   388,   389,   398,   404,   405,   409,
-     413,   417,   421,   425,   429,   433,   437,   441,   445,   449,
-     453,   457,   461,   465,   469,   473,   477,   482
+       0,   358,   358,   366,   373,   374,   383,   389,   390,   394,
+     398,   402,   406,   410,   414,   418,   422,   426,   430,   434,
+     438,   442,   446,   450,   454,   458,   462,   467
 };
 #endif
 
@@ -1471,119 +1456,119 @@
   switch (yytype)
     {
       case 4: /* "TOK_COLONCOLON" */
-#line 367 "ast_expr2.y"
+#line 352 "ast_expr2.y"
+	{  free_value((yyvaluep->val)); };
+#line 1462 "ast_expr2.c"
+	break;
+      case 5: /* "TOK_COND" */
+#line 352 "ast_expr2.y"
+	{  free_value((yyvaluep->val)); };
+#line 1467 "ast_expr2.c"
+	break;
+      case 6: /* "TOK_OR" */
+#line 352 "ast_expr2.y"
+	{  free_value((yyvaluep->val)); };
+#line 1472 "ast_expr2.c"
+	break;
+      case 7: /* "TOK_AND" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1477 "ast_expr2.c"
 	break;
-      case 5: /* "TOK_COND" */
-#line 367 "ast_expr2.y"
+      case 8: /* "TOK_NE" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1482 "ast_expr2.c"
 	break;
-      case 6: /* "TOK_OR" */
-#line 367 "ast_expr2.y"
+      case 9: /* "TOK_LE" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1487 "ast_expr2.c"
 	break;
-      case 7: /* "TOK_AND" */
-#line 367 "ast_expr2.y"
+      case 10: /* "TOK_GE" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1492 "ast_expr2.c"
 	break;
-      case 8: /* "TOK_NE" */
-#line 367 "ast_expr2.y"
+      case 11: /* "TOK_LT" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1497 "ast_expr2.c"
 	break;
-      case 9: /* "TOK_LE" */
-#line 367 "ast_expr2.y"
+      case 12: /* "TOK_GT" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1502 "ast_expr2.c"
 	break;
-      case 10: /* "TOK_GE" */
-#line 367 "ast_expr2.y"
+      case 13: /* "TOK_EQ" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1507 "ast_expr2.c"
 	break;
-      case 11: /* "TOK_LT" */
-#line 367 "ast_expr2.y"
+      case 14: /* "TOK_MINUS" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1512 "ast_expr2.c"
 	break;
-      case 12: /* "TOK_GT" */
-#line 367 "ast_expr2.y"
+      case 15: /* "TOK_PLUS" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1517 "ast_expr2.c"
 	break;
-      case 13: /* "TOK_EQ" */
-#line 367 "ast_expr2.y"
+      case 16: /* "TOK_MOD" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1522 "ast_expr2.c"
 	break;
-      case 14: /* "TOK_MINUS" */
-#line 367 "ast_expr2.y"
+      case 17: /* "TOK_DIV" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1527 "ast_expr2.c"
 	break;
-      case 15: /* "TOK_PLUS" */
-#line 367 "ast_expr2.y"
+      case 18: /* "TOK_MULT" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1532 "ast_expr2.c"
 	break;
-      case 16: /* "TOK_MOD" */
-#line 367 "ast_expr2.y"
+      case 19: /* "TOK_COMPL" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1537 "ast_expr2.c"
 	break;
-      case 17: /* "TOK_DIV" */
-#line 367 "ast_expr2.y"
+      case 20: /* "TOK_TILDETILDE" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1542 "ast_expr2.c"
 	break;
-      case 18: /* "TOK_MULT" */
-#line 367 "ast_expr2.y"
+      case 21: /* "TOK_EQTILDE" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1547 "ast_expr2.c"
 	break;
-      case 19: /* "TOK_COMPL" */
-#line 367 "ast_expr2.y"
+      case 22: /* "TOK_COLON" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1552 "ast_expr2.c"
 	break;
-      case 20: /* "TOK_TILDETILDE" */
-#line 367 "ast_expr2.y"
+      case 23: /* "TOK_LP" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1557 "ast_expr2.c"
 	break;
-      case 21: /* "TOK_EQTILDE" */
-#line 367 "ast_expr2.y"
+      case 24: /* "TOK_RP" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1562 "ast_expr2.c"
 	break;
-      case 22: /* "TOK_COLON" */
-#line 367 "ast_expr2.y"
+      case 25: /* "TOKEN" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1567 "ast_expr2.c"
 	break;
-      case 23: /* "TOK_LP" */
-#line 367 "ast_expr2.y"
+      case 29: /* "expr" */
+#line 352 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
 #line 1572 "ast_expr2.c"
-	break;
-      case 24: /* "TOK_RP" */
-#line 367 "ast_expr2.y"
-	{  free_value((yyvaluep->val)); };
-#line 1577 "ast_expr2.c"
-	break;
-      case 25: /* "TOKEN" */
-#line 367 "ast_expr2.y"
-	{  free_value((yyvaluep->val)); };
-#line 1582 "ast_expr2.c"
-	break;
-      case 29: /* "expr" */
-#line 367 "ast_expr2.y"
-	{  free_value((yyvaluep->val)); };
-#line 1587 "ast_expr2.c"
 	break;
 
       default:
@@ -1906,7 +1891,7 @@
   switch (yyn)
     {
         case 2:
-#line 373 "ast_expr2.y"
+#line 358 "ast_expr2.y"
     { ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
               ((struct parse_io *)parseio)->val->type = (yyvsp[(1) - (1)].val)->type;
               if( (yyvsp[(1) - (1)].val)->type == AST_EXPR_number )
@@ -1918,7 +1903,7 @@
     break;
 
   case 3:
-#line 381 "ast_expr2.y"
+#line 366 "ast_expr2.y"
     {/* nothing */ ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
               ((struct parse_io *)parseio)->val->type = AST_EXPR_string;
 			  ((struct parse_io *)parseio)->val->u.s = strdup(""); 
@@ -1926,12 +1911,12 @@
     break;
 
   case 4:
-#line 388 "ast_expr2.y"
+#line 373 "ast_expr2.y"
     { (yyval.arglist) = alloc_expr_node(AST_EXPR_NODE_VAL); (yyval.arglist)->val = (yyvsp[(1) - (1)].val);;}
     break;
 
   case 5:
-#line 389 "ast_expr2.y"
+#line 374 "ast_expr2.y"
     {struct expr_node *x = alloc_expr_node(AST_EXPR_NODE_VAL);
                                  struct expr_node *t;
 								 DESTROY((yyvsp[(2) - (3)].val));
@@ -1941,7 +1926,7 @@
     break;
 
   case 6:
-#line 398 "ast_expr2.y"
+#line 383 "ast_expr2.y"
     { (yyval.val) = op_func((yyvsp[(1) - (4)].val),(yyvsp[(3) - (4)].arglist), ((struct parse_io *)parseio)->chan);
 		                            DESTROY((yyvsp[(2) - (4)].val));
 									DESTROY((yyvsp[(4) - (4)].val));
@@ -1951,12 +1936,12 @@
     break;
 
   case 7:
-#line 404 "ast_expr2.y"
+#line 389 "ast_expr2.y"
     {(yyval.val) = (yyvsp[(1) - (1)].val);;}
     break;
 
   case 8:
-#line 405 "ast_expr2.y"
+#line 390 "ast_expr2.y"
     { (yyval.val) = (yyvsp[(2) - (3)].val);
 	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
 						   (yyloc).first_line=0; (yyloc).last_line=0;
@@ -1964,7 +1949,7 @@
     break;
 
   case 9:
-#line 409 "ast_expr2.y"
+#line 394 "ast_expr2.y"
     { (yyval.val) = op_or ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
 						DESTROY((yyvsp[(2) - (3)].val));	
                          (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -1972,7 +1957,7 @@
     break;
 
   case 10:
-#line 413 "ast_expr2.y"
+#line 398 "ast_expr2.y"
     { (yyval.val) = op_and ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -1980,7 +1965,7 @@
     break;
 
   case 11:
-#line 417 "ast_expr2.y"
+#line 402 "ast_expr2.y"
     { (yyval.val) = op_eq ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                     (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
@@ -1988,7 +1973,7 @@
     break;
 
   case 12:
-#line 421 "ast_expr2.y"
+#line 406 "ast_expr2.y"
     { (yyval.val) = op_gt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
 						DESTROY((yyvsp[(2) - (3)].val));	
                          (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
@@ -1996,7 +1981,7 @@
     break;
 
   case 13:
-#line 425 "ast_expr2.y"
+#line 410 "ast_expr2.y"
     { (yyval.val) = op_lt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                     (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2004,7 +1989,7 @@
     break;
 
   case 14:
-#line 429 "ast_expr2.y"
+#line 414 "ast_expr2.y"
     { (yyval.val) = op_ge ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2012,7 +1997,7 @@
     break;
 
   case 15:
-#line 433 "ast_expr2.y"
+#line 418 "ast_expr2.y"
     { (yyval.val) = op_le ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2020,7 +2005,7 @@
     break;
 
   case 16:
-#line 437 "ast_expr2.y"
+#line 422 "ast_expr2.y"
     { (yyval.val) = op_ne ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2028,7 +2013,7 @@
     break;
 
   case 17:
-#line 441 "ast_expr2.y"
+#line 426 "ast_expr2.y"
     { (yyval.val) = op_plus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2036,7 +2021,7 @@
     break;
 
   case 18:
-#line 445 "ast_expr2.y"
+#line 430 "ast_expr2.y"
     { (yyval.val) = op_minus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2044,7 +2029,7 @@
     break;
 
   case 19:
-#line 449 "ast_expr2.y"
+#line 434 "ast_expr2.y"
     { (yyval.val) = op_negate ((yyvsp[(2) - (2)].val)); 
 						DESTROY((yyvsp[(1) - (2)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column; 
@@ -2052,7 +2037,7 @@
     break;
 
   case 20:
-#line 453 "ast_expr2.y"
+#line 438 "ast_expr2.y"
     { (yyval.val) = op_compl ((yyvsp[(2) - (2)].val)); 
 						DESTROY((yyvsp[(1) - (2)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column; 
@@ -2060,7 +2045,7 @@
     break;
 
   case 21:
-#line 457 "ast_expr2.y"
+#line 442 "ast_expr2.y"
     { (yyval.val) = op_times ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2068,7 +2053,7 @@
     break;
 
   case 22:
-#line 461 "ast_expr2.y"
+#line 446 "ast_expr2.y"
     { (yyval.val) = op_div ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2076,7 +2061,7 @@
     break;
 
   case 23:
-#line 465 "ast_expr2.y"
+#line 450 "ast_expr2.y"
     { (yyval.val) = op_rem ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2084,7 +2069,7 @@
     break;
 
   case 24:
-#line 469 "ast_expr2.y"
+#line 454 "ast_expr2.y"
     { (yyval.val) = op_colon ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2092,7 +2077,7 @@
     break;
 
   case 25:
-#line 473 "ast_expr2.y"
+#line 458 "ast_expr2.y"
     { (yyval.val) = op_eqtilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2100,7 +2085,7 @@
     break;
 
   case 26:
-#line 477 "ast_expr2.y"
+#line 462 "ast_expr2.y"
     { (yyval.val) = op_cond ((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 
 						DESTROY((yyvsp[(2) - (5)].val));	
 						DESTROY((yyvsp[(4) - (5)].val));	
@@ -2109,7 +2094,7 @@
     break;
 
   case 27:
-#line 482 "ast_expr2.y"
+#line 467 "ast_expr2.y"
     { (yyval.val) = op_tildetilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2118,7 +2103,7 @@
 
 
 /* Line 1267 of yacc.c.  */
-#line 2122 "ast_expr2.c"
+#line 2107 "ast_expr2.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2338,7 +2323,7 @@
 }
 
 
-#line 488 "ast_expr2.y"
+#line 473 "ast_expr2.y"
 
 
 static struct expr_node *alloc_expr_node(enum node_type nt)

Modified: team/group/asterisk-cpp/main/ast_expr2.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2.h?view=diff&rev=168753&r1=168752&r2=168753
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2.h (original)
+++ team/group/asterisk-cpp/main/ast_expr2.h Thu Jan 15 23:28:50 2009
@@ -94,7 +94,7 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 344 "ast_expr2.y"
+#line 321 "ast_expr2.y"
 {
 	struct val *val;
 	struct expr_node *arglist;

Modified: team/group/asterisk-cpp/main/ast_expr2.y
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2.y?view=diff&rev=168753&r1=168752&r2=168753
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2.y (original)
+++ team/group/asterisk-cpp/main/ast_expr2.y Thu Jan 15 23:28:50 2009
@@ -309,22 +309,21 @@
 static struct expr_node *alloc_expr_node(enum node_type);
 static void destroy_arglist(struct expr_node *arglist);
 
-/* uh, if I want to predeclare yylex with a YYLTYPE, I have to predeclare the yyltype... sigh */
-typedef struct yyltype
-{
-  int first_line;
-  int first_column;
-
-  int last_line;
-  int last_column;
-} yyltype;
-
-# define YYLTYPE yyltype
-# define YYLTYPE_IS_TRIVIAL 1
-
-/* we will get warning about no prototype for yylex! But we can't
-   define it here, we have no definition yet for YYSTYPE. */
-
+%}
+ 
+%pure-parser
+%locations
+/* %debug  for when you are having big problems */
+
+/* %name-prefix="ast_yy" */
+
+%union
+{
+	struct val *val;
+	struct expr_node *arglist;
+}
+
+%{
 int		ast_yyerror(const char *,YYLTYPE *, struct parse_io *);
  
 /* I wanted to add args to the yyerror routine, so I could print out
@@ -332,21 +331,7 @@
    is possible. */
 #define ast_yyerror(x) ast_yyerror(x,&yyloc,(struct parse_io *)parseio)
 #define DESTROY(x) {if((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) free((x)->u.s); (x)->u.s = 0; free(x);}
-%}
- 
-%pure-parser
-%locations
-/* %debug  for when you are having big problems */
-
-/* %name-prefix="ast_yy" */
-
-%union
-{
-	struct val *val;
-	struct expr_node *arglist;
-}
-
-%{
+
 extern int		ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
 %}
 %left <val> TOK_COMMA




More information about the asterisk-commits mailing list