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 |
|
|
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, |
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 |
|
|