This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

More cpplib


Hi,

The attached patch makes the C++ front end work well enough to complete the
build "make all info install" with cpplib, which includes some C++ code compiled
with xgcc. The source is still going through cpp before the front end sees it,
but the lexical analysis is at least working.

OK to check it in?

Dave
Index: c-parse.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-parse.c,v
retrieving revision 1.8
diff -c -p -r1.8 c-parse.c
*** c-parse.c	1998/05/07 15:07:43	1.8
--- c-parse.c	1998/05/25 22:35:33
*************** static const short yycheck[] = {    40,
*** 1163,1169 ****
      48,    49,    50,    51,    52
  };
  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
! #line 3 "/usr/share/bison.simple"
  
  /* Skeleton output parser for bison,
     Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
--- 1163,1169 ----
      48,    49,    50,    51,    52
  };
  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
! #line 3 "/usr/local/share/bison.simple"
  
  /* Skeleton output parser for bison,
     Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
*************** __yy_memcpy (char *to, char *from, int c
*** 1356,1362 ****
  #endif
  #endif
  
! #line 196 "/usr/share/bison.simple"
  
  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
     into yyparse.  The argument should have type void *.
--- 1356,1362 ----
  #endif
  #endif
  
! #line 196 "/usr/local/share/bison.simple"
  
  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
     into yyparse.  The argument should have type void *.
*************** case 395:
*** 3651,3657 ****
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 498 "/usr/share/bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
--- 3651,3657 ----
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 498 "/usr/local/share/bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
Index: cexp.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cexp.c,v
retrieving revision 1.6
diff -c -p -r1.6 cexp.c
*** cexp.c	1998/05/07 11:44:03	1.6
--- cexp.c	1998/05/25 22:35:34
*************** static void integer_overflow PROTO((void
*** 187,193 ****
  #define SIGNED (~0)
  #define UNSIGNED 0
  
! #line 251 "cexp.y"
  typedef union {
    struct constant {HOST_WIDE_INT value; int signedp;} integer;
    struct name {U_CHAR *address; int length;} name;
--- 187,193 ----
  #define SIGNED (~0)
  #define UNSIGNED 0
  
! #line 195 "cexp.y"
  typedef union {
    struct constant {HOST_WIDE_INT value; int signedp;} integer;
    struct name {U_CHAR *address; int length;} name;
*************** static const short yyrhs[] = {    35,
*** 268,277 ****
  
  #if YYDEBUG != 0
  static const short yyrline[] = { 0,
!    281,   291,   292,   299,   304,   307,   309,   312,   316,   318,
!    323,   328,   341,   358,   371,   377,   383,   389,   395,   398,
!    401,   408,   415,   422,   429,   432,   435,   438,   441,   444,
!    447,   450,   452,   455,   458,   460,   462,   470,   472,   485
  };
  #endif
  
--- 268,277 ----
  
  #if YYDEBUG != 0
  static const short yyrline[] = { 0,
!    225,   235,   236,   243,   248,   251,   253,   256,   260,   262,
!    267,   272,   285,   302,   315,   321,   327,   333,   339,   342,
!    345,   352,   359,   366,   373,   376,   379,   382,   385,   388,
!    391,   394,   396,   399,   402,   404,   406,   414,   416,   429
  };
  #endif
  
*************** static const short yycheck[] = {     4,
*** 377,383 ****
      26,    27,    23,    24,    25,    26,    27,     0,     9
  };
  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
! #line 3 "/usr/cygnus/latest-940103/share/bison.simple"
  
  /* Skeleton output parser for bison,
     Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
--- 377,383 ----
      26,    27,    23,    24,    25,    26,    27,     0,     9
  };
  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
! #line 3 "/usr/local/share/bison.simple"
  
  /* Skeleton output parser for bison,
     Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
*************** __yy_memcpy (char *to, char *from, int c
*** 570,576 ****
  #endif
  #endif
  
! #line 196 "/usr/cygnus/latest-940103/share/bison.simple"
  
  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
     into yyparse.  The argument should have type void *.
--- 570,576 ----
  #endif
  #endif
  
! #line 196 "/usr/local/share/bison.simple"
  
  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
     into yyparse.  The argument should have type void *.
*************** yyreduce:
*** 875,881 ****
    switch (yyn) {
  
  case 1:
! #line 282 "cexp.y"
  {
  		  expression_value = yyvsp[0].integer.value;
  #ifdef TEST_EXP_READER
--- 875,881 ----
    switch (yyn) {
  
  case 1:
! #line 226 "cexp.y"
  {
  		  expression_value = yyvsp[0].integer.value;
  #ifdef TEST_EXP_READER
*************** case 1:
*** 884,938 ****
  		;
      break;}
  case 3:
! #line 293 "cexp.y"
  { if (pedantic)
  			    pedwarn ("comma operator in operand of `#if'");
  			  yyval.integer = yyvsp[0].integer; ;
      break;}
  case 4:
! #line 300 "cexp.y"
  { yyval.integer.value = - yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[0].integer.signedp;
  			  if ((yyval.integer.value & yyvsp[0].integer.value & yyval.integer.signedp) < 0)
  			    integer_overflow (); ;
      break;}
  case 5:
! #line 305 "cexp.y"
  { yyval.integer.value = ! yyvsp[0].integer.value;
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 6:
! #line 308 "cexp.y"
  { yyval.integer = yyvsp[0].integer; ;
      break;}
  case 7:
! #line 310 "cexp.y"
  { yyval.integer.value = ~ yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[0].integer.signedp; ;
      break;}
  case 8:
! #line 313 "cexp.y"
  { yyval.integer.value = check_assertion (yyvsp[0].name.address, yyvsp[0].name.length,
  						      0, NULL_PTR);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 9:
! #line 317 "cexp.y"
  { keyword_parsing = 1; ;
      break;}
  case 10:
! #line 319 "cexp.y"
  { yyval.integer.value = check_assertion (yyvsp[-4].name.address, yyvsp[-4].name.length,
  						      1, yyvsp[-1].keywords);
  			  keyword_parsing = 0;
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 11:
! #line 324 "cexp.y"
  { yyval.integer = yyvsp[-1].integer; ;
      break;}
  case 12:
! #line 329 "cexp.y"
  { yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
  			  if (yyval.integer.signedp)
  			    {
--- 884,938 ----
  		;
      break;}
  case 3:
! #line 237 "cexp.y"
  { if (pedantic)
  			    pedwarn ("comma operator in operand of `#if'");
  			  yyval.integer = yyvsp[0].integer; ;
      break;}
  case 4:
! #line 244 "cexp.y"
  { yyval.integer.value = - yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[0].integer.signedp;
  			  if ((yyval.integer.value & yyvsp[0].integer.value & yyval.integer.signedp) < 0)
  			    integer_overflow (); ;
      break;}
  case 5:
! #line 249 "cexp.y"
  { yyval.integer.value = ! yyvsp[0].integer.value;
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 6:
! #line 252 "cexp.y"
  { yyval.integer = yyvsp[0].integer; ;
      break;}
  case 7:
! #line 254 "cexp.y"
  { yyval.integer.value = ~ yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[0].integer.signedp; ;
      break;}
  case 8:
! #line 257 "cexp.y"
  { yyval.integer.value = check_assertion (yyvsp[0].name.address, yyvsp[0].name.length,
  						      0, NULL_PTR);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 9:
! #line 261 "cexp.y"
  { keyword_parsing = 1; ;
      break;}
  case 10:
! #line 263 "cexp.y"
  { yyval.integer.value = check_assertion (yyvsp[-4].name.address, yyvsp[-4].name.length,
  						      1, yyvsp[-1].keywords);
  			  keyword_parsing = 0;
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 11:
! #line 268 "cexp.y"
  { yyval.integer = yyvsp[-1].integer; ;
      break;}
  case 12:
! #line 273 "cexp.y"
  { yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
  			  if (yyval.integer.signedp)
  			    {
*************** case 12:
*** 947,953 ****
  					* yyvsp[0].integer.value); ;
      break;}
  case 13:
! #line 342 "cexp.y"
  { if (yyvsp[0].integer.value == 0)
  			    {
  			      if (!skip_evaluation)
--- 947,953 ----
  					* yyvsp[0].integer.value); ;
      break;}
  case 13:
! #line 286 "cexp.y"
  { if (yyvsp[0].integer.value == 0)
  			    {
  			      if (!skip_evaluation)
*************** case 13:
*** 966,972 ****
  					/ yyvsp[0].integer.value); ;
      break;}
  case 14:
! #line 359 "cexp.y"
  { if (yyvsp[0].integer.value == 0)
  			    {
  			      if (!skip_evaluation)
--- 966,972 ----
  					/ yyvsp[0].integer.value); ;
      break;}
  case 14:
! #line 303 "cexp.y"
  { if (yyvsp[0].integer.value == 0)
  			    {
  			      if (!skip_evaluation)
*************** case 14:
*** 981,987 ****
  					% yyvsp[0].integer.value); ;
      break;}
  case 15:
! #line 372 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value + yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
  			  if (overflow_sum_sign (yyvsp[-2].integer.value, yyvsp[0].integer.value,
--- 981,987 ----
  					% yyvsp[0].integer.value); ;
      break;}
  case 15:
! #line 316 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value + yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
  			  if (overflow_sum_sign (yyvsp[-2].integer.value, yyvsp[0].integer.value,
*************** case 15:
*** 989,995 ****
  			    integer_overflow (); ;
      break;}
  case 16:
! #line 378 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value - yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
  			  if (overflow_sum_sign (yyval.integer.value, yyvsp[0].integer.value,
--- 989,995 ----
  			    integer_overflow (); ;
      break;}
  case 16:
! #line 322 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value - yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp;
  			  if (overflow_sum_sign (yyval.integer.value, yyvsp[0].integer.value,
*************** case 16:
*** 997,1003 ****
  			    integer_overflow (); ;
      break;}
  case 17:
! #line 384 "cexp.y"
  { yyval.integer.signedp = yyvsp[-2].integer.signedp;
  			  if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0)
  			    yyval.integer.value = right_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value);
--- 997,1003 ----
  			    integer_overflow (); ;
      break;}
  case 17:
! #line 328 "cexp.y"
  { yyval.integer.signedp = yyvsp[-2].integer.signedp;
  			  if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0)
  			    yyval.integer.value = right_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value);
*************** case 17:
*** 1005,1011 ****
  			    yyval.integer.value = left_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ;
      break;}
  case 18:
! #line 390 "cexp.y"
  { yyval.integer.signedp = yyvsp[-2].integer.signedp;
  			  if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0)
  			    yyval.integer.value = left_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value);
--- 1005,1011 ----
  			    yyval.integer.value = left_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ;
      break;}
  case 18:
! #line 334 "cexp.y"
  { yyval.integer.signedp = yyvsp[-2].integer.signedp;
  			  if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0)
  			    yyval.integer.value = left_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value);
*************** case 18:
*** 1013,1029 ****
  			    yyval.integer.value = right_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ;
      break;}
  case 19:
! #line 396 "cexp.y"
  { yyval.integer.value = (yyvsp[-2].integer.value == yyvsp[0].integer.value);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 20:
! #line 399 "cexp.y"
  { yyval.integer.value = (yyvsp[-2].integer.value != yyvsp[0].integer.value);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 21:
! #line 402 "cexp.y"
  { yyval.integer.signedp = SIGNED;
  			  if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
  			    yyval.integer.value = yyvsp[-2].integer.value <= yyvsp[0].integer.value;
--- 1013,1029 ----
  			    yyval.integer.value = right_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ;
      break;}
  case 19:
! #line 340 "cexp.y"
  { yyval.integer.value = (yyvsp[-2].integer.value == yyvsp[0].integer.value);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 20:
! #line 343 "cexp.y"
  { yyval.integer.value = (yyvsp[-2].integer.value != yyvsp[0].integer.value);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 21:
! #line 346 "cexp.y"
  { yyval.integer.signedp = SIGNED;
  			  if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
  			    yyval.integer.value = yyvsp[-2].integer.value <= yyvsp[0].integer.value;
*************** case 21:
*** 1032,1038 ****
  					<= yyvsp[0].integer.value); ;
      break;}
  case 22:
! #line 409 "cexp.y"
  { yyval.integer.signedp = SIGNED;
  			  if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
  			    yyval.integer.value = yyvsp[-2].integer.value >= yyvsp[0].integer.value;
--- 1032,1038 ----
  					<= yyvsp[0].integer.value); ;
      break;}
  case 22:
! #line 353 "cexp.y"
  { yyval.integer.signedp = SIGNED;
  			  if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
  			    yyval.integer.value = yyvsp[-2].integer.value >= yyvsp[0].integer.value;
*************** case 22:
*** 1041,1047 ****
  					>= yyvsp[0].integer.value); ;
      break;}
  case 23:
! #line 416 "cexp.y"
  { yyval.integer.signedp = SIGNED;
  			  if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
  			    yyval.integer.value = yyvsp[-2].integer.value < yyvsp[0].integer.value;
--- 1041,1047 ----
  					>= yyvsp[0].integer.value); ;
      break;}
  case 23:
! #line 360 "cexp.y"
  { yyval.integer.signedp = SIGNED;
  			  if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
  			    yyval.integer.value = yyvsp[-2].integer.value < yyvsp[0].integer.value;
*************** case 23:
*** 1050,1056 ****
  					< yyvsp[0].integer.value); ;
      break;}
  case 24:
! #line 423 "cexp.y"
  { yyval.integer.signedp = SIGNED;
  			  if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
  			    yyval.integer.value = yyvsp[-2].integer.value > yyvsp[0].integer.value;
--- 1050,1056 ----
  					< yyvsp[0].integer.value); ;
      break;}
  case 24:
! #line 367 "cexp.y"
  { yyval.integer.signedp = SIGNED;
  			  if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp)
  			    yyval.integer.value = yyvsp[-2].integer.value > yyvsp[0].integer.value;
*************** case 24:
*** 1059,1122 ****
  					> yyvsp[0].integer.value); ;
      break;}
  case 25:
! #line 430 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value & yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
      break;}
  case 26:
! #line 433 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value ^ yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
      break;}
  case 27:
! #line 436 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value | yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
      break;}
  case 28:
! #line 439 "cexp.y"
  { skip_evaluation += !yyvsp[-1].integer.value; ;
      break;}
  case 29:
! #line 441 "cexp.y"
  { skip_evaluation -= !yyvsp[-3].integer.value;
  			  yyval.integer.value = (yyvsp[-3].integer.value && yyvsp[0].integer.value);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 30:
! #line 445 "cexp.y"
  { skip_evaluation += !!yyvsp[-1].integer.value; ;
      break;}
  case 31:
! #line 447 "cexp.y"
  { skip_evaluation -= !!yyvsp[-3].integer.value;
  			  yyval.integer.value = (yyvsp[-3].integer.value || yyvsp[0].integer.value);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 32:
! #line 451 "cexp.y"
  { skip_evaluation += !yyvsp[-1].integer.value; ;
      break;}
  case 33:
! #line 453 "cexp.y"
  { skip_evaluation += !!yyvsp[-4].integer.value - !yyvsp[-4].integer.value; ;
      break;}
  case 34:
! #line 455 "cexp.y"
  { skip_evaluation -= !!yyvsp[-6].integer.value;
  			  yyval.integer.value = yyvsp[-6].integer.value ? yyvsp[-3].integer.value : yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-3].integer.signedp & yyvsp[0].integer.signedp; ;
      break;}
  case 35:
! #line 459 "cexp.y"
  { yyval.integer = yylval.integer; ;
      break;}
  case 36:
! #line 461 "cexp.y"
  { yyval.integer = yylval.integer; ;
      break;}
  case 37:
! #line 463 "cexp.y"
  { if (warn_undef && !skip_evaluation)
  			    warning ("`%.*s' is not defined",
  				     yyvsp[0].name.length, yyvsp[0].name.address);
--- 1059,1122 ----
  					> yyvsp[0].integer.value); ;
      break;}
  case 25:
! #line 374 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value & yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
      break;}
  case 26:
! #line 377 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value ^ yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
      break;}
  case 27:
! #line 380 "cexp.y"
  { yyval.integer.value = yyvsp[-2].integer.value | yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ;
      break;}
  case 28:
! #line 383 "cexp.y"
  { skip_evaluation += !yyvsp[-1].integer.value; ;
      break;}
  case 29:
! #line 385 "cexp.y"
  { skip_evaluation -= !yyvsp[-3].integer.value;
  			  yyval.integer.value = (yyvsp[-3].integer.value && yyvsp[0].integer.value);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 30:
! #line 389 "cexp.y"
  { skip_evaluation += !!yyvsp[-1].integer.value; ;
      break;}
  case 31:
! #line 391 "cexp.y"
  { skip_evaluation -= !!yyvsp[-3].integer.value;
  			  yyval.integer.value = (yyvsp[-3].integer.value || yyvsp[0].integer.value);
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 32:
! #line 395 "cexp.y"
  { skip_evaluation += !yyvsp[-1].integer.value; ;
      break;}
  case 33:
! #line 397 "cexp.y"
  { skip_evaluation += !!yyvsp[-4].integer.value - !yyvsp[-4].integer.value; ;
      break;}
  case 34:
! #line 399 "cexp.y"
  { skip_evaluation -= !!yyvsp[-6].integer.value;
  			  yyval.integer.value = yyvsp[-6].integer.value ? yyvsp[-3].integer.value : yyvsp[0].integer.value;
  			  yyval.integer.signedp = yyvsp[-3].integer.signedp & yyvsp[0].integer.signedp; ;
      break;}
  case 35:
! #line 403 "cexp.y"
  { yyval.integer = yylval.integer; ;
      break;}
  case 36:
! #line 405 "cexp.y"
  { yyval.integer = yylval.integer; ;
      break;}
  case 37:
! #line 407 "cexp.y"
  { if (warn_undef && !skip_evaluation)
  			    warning ("`%.*s' is not defined",
  				     yyvsp[0].name.length, yyvsp[0].name.address);
*************** case 37:
*** 1124,1134 ****
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 38:
! #line 471 "cexp.y"
  { yyval.keywords = 0; ;
      break;}
  case 39:
! #line 473 "cexp.y"
  { struct arglist *temp;
  			  yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist));
  			  yyval.keywords->next = yyvsp[-2].keywords;
--- 1124,1134 ----
  			  yyval.integer.signedp = SIGNED; ;
      break;}
  case 38:
! #line 415 "cexp.y"
  { yyval.keywords = 0; ;
      break;}
  case 39:
! #line 417 "cexp.y"
  { struct arglist *temp;
  			  yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist));
  			  yyval.keywords->next = yyvsp[-2].keywords;
*************** case 39:
*** 1143,1149 ****
  			  temp->next->length = 1; ;
      break;}
  case 40:
! #line 486 "cexp.y"
  { yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist));
  			  yyval.keywords->name = yyvsp[-1].name.address;
  			  yyval.keywords->length = yyvsp[-1].name.length;
--- 1143,1149 ----
  			  temp->next->length = 1; ;
      break;}
  case 40:
! #line 430 "cexp.y"
  { yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist));
  			  yyval.keywords->name = yyvsp[-1].name.address;
  			  yyval.keywords->length = yyvsp[-1].name.length;
*************** case 40:
*** 1151,1157 ****
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 498 "/usr/cygnus/latest-940103/share/bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
--- 1151,1157 ----
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 498 "/usr/local/share/bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
*************** yyerrhandle:
*** 1347,1353 ****
    yystate = yyn;
    goto yynewstate;
  }
! #line 491 "cexp.y"
  
  
  /* During parsing of a C expression, the pointer to the next character
--- 1347,1353 ----
    yystate = yyn;
    goto yynewstate;
  }
! #line 435 "cexp.y"
  
  
  /* During parsing of a C expression, the pointer to the next character
Index: cp/lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/lex.c,v
retrieving revision 1.47
diff -c -p -r1.47 lex.c
*** lex.c	1998/05/21 08:56:16	1.47
--- lex.c	1998/05/25 22:35:42
*************** char *inline_text_firstobj;
*** 114,120 ****
  
  #if USE_CPPLIB
  #include "cpplib.h"
! extern cpp_reader parse_in;
  #else
  FILE *finput;
  #endif
--- 114,122 ----
  
  #if USE_CPPLIB
  #include "cpplib.h"
! extern cpp_reader  parse_in;
! extern cpp_options parse_options;
! extern unsigned char *yy_cur, *yy_lim;
  #else
  FILE *finput;
  #endif
*************** init_parse (filename)
*** 471,477 ****
  
    int i;
  
! #if !USE_CPPLIB
    /* Open input file.  */
    if (filename == 0 || !strcmp (filename, "-"))
      {
--- 473,490 ----
  
    int i;
  
! #if USE_CPPLIB
!   yy_cur = "";
!   yy_lim = yy_cur;
! 
!   cpp_reader_init (&parse_in);
!   parse_in.data = &parse_options;
!   cpp_options_init (&parse_options);
!   cpp_handle_options (&parse_in, 0, NULL); /* FIXME */
!   parse_in.show_column = 1;
!   if (! cpp_start_read (&parse_in, filename))
!     abort ();
! #else
    /* Open input file.  */
    if (filename == 0 || !strcmp (filename, "-"))
      {
Index: cp/parse.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/parse.c,v
retrieving revision 1.51
diff -c -p -r1.51 parse.c
*** parse.c	1998/05/24 23:52:17	1.51
--- parse.c	1998/05/25 22:35:48
*************** static const short yycheck[] = {     4,
*** 3489,3495 ****
      80,    81,    82,    83,    84
  };
  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
! #line 3 "/usr/lib/bison.simple"
  
  /* Skeleton output parser for bison,
     Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
--- 3489,3495 ----
      80,    81,    82,    83,    84
  };
  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
! #line 3 "/usr/local/share/bison.simple"
  
  /* Skeleton output parser for bison,
     Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
*************** __yy_memcpy (char *to, char *from, int c
*** 3682,3688 ****
  #endif
  #endif
  
! #line 196 "/usr/lib/bison.simple"
  
  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
     into yyparse.  The argument should have type void *.
--- 3682,3688 ----
  #endif
  #endif
  
! #line 196 "/usr/local/share/bison.simple"
  
  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
     into yyparse.  The argument should have type void *.
*************** case 840:
*** 7628,7634 ****
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 498 "/usr/lib/bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
--- 7628,7634 ----
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 498 "/usr/local/share/bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
Index: objc/objc-parse.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/objc/objc-parse.c,v
retrieving revision 1.9
diff -c -p -r1.9 objc-parse.c
*** objc-parse.c	1998/05/06 17:05:41	1.9
--- objc-parse.c	1998/05/25 22:35:56
*************** static const short yycheck[] = {     9,
*** 1632,1638 ****
      48,    49,    50,    51,    52
  };
  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
! #line 3 "/usr/share/bison.simple"
  
  /* Skeleton output parser for bison,
     Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
--- 1632,1638 ----
      48,    49,    50,    51,    52
  };
  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
! #line 3 "/usr/local/share/bison.simple"
  
  /* Skeleton output parser for bison,
     Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
*************** __yy_memcpy (char *to, char *from, int c
*** 1825,1831 ****
  #endif
  #endif
  
! #line 196 "/usr/share/bison.simple"
  
  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
     into yyparse.  The argument should have type void *.
--- 1825,1831 ----
  #endif
  #endif
  
! #line 196 "/usr/local/share/bison.simple"
  
  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
     into yyparse.  The argument should have type void *.
*************** case 556:
*** 4911,4917 ****
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 498 "/usr/share/bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
--- 4911,4917 ----
      break;}
  }
     /* the action file gets copied in in place of this dollarsign */
! #line 498 "/usr/local/share/bison.simple"
  
    yyvsp -= yylen;
    yyssp -= yylen;
Mon May 25 18:41:35 1998  Dave Brolley  <brolley@cygnus.com>

	* lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
	(init_parse): Initialize cpplib interface.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]