/[bison]/bison/src/parse-gram.y
ViewVC logotype

Diff of /bison/src/parse-gram.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.38 by eggert, Thu Dec 26 06:51:42 2002 UTC revision 1.39 by eggert, Mon Feb 3 15:35:56 2003 UTC
# Line 1  Line 1 
1  /* Bison Grammar Parser                             -*- C -*-  /* Bison Grammar Parser                             -*- C -*-
2     Copyright (C) 2002 Free Software Foundation, Inc.  
3       Copyright (C) 2002, 2003 Free Software Foundation, Inc.
4    
5     This file is part of Bison, the GNU Compiler Compiler.     This file is part of Bison, the GNU Compiler Compiler.
6    
# Line 413  static YYLTYPE Line 414  static YYLTYPE
414  lloc_default (YYLTYPE const *rhs, int n)  lloc_default (YYLTYPE const *rhs, int n)
415  {  {
416    int i;    int i;
417    YYLTYPE r;    YYLTYPE loc;
418    r.start = r.end = rhs[n].end;    loc.start = loc.end = rhs[n].end;
419    
420    /* Ignore empty nonterminals the start of the the right-hand side.    /* Ignore empty nonterminals the start of the the right-hand side.
421       Do not bother to ignore them at the end of the right-hand side,       Do not bother to ignore them at the end of the right-hand side,
# Line 422  lloc_default (YYLTYPE const *rhs, int n) Line 423  lloc_default (YYLTYPE const *rhs, int n)
423    for (i = 1; i <= n; i++)    for (i = 1; i <= n; i++)
424      if (! equal_boundaries (rhs[i].start, rhs[i].end))      if (! equal_boundaries (rhs[i].start, rhs[i].end))
425        {        {
426          r.start = rhs[i].start;          loc.start = rhs[i].start;
427          break;          break;
428        }        }
429    
430    return r;    return loc;
431  }  }
432    
433    

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26