334 |
|
|
335 |
ungetc (c, fin); |
ungetc (c, fin); |
336 |
n = read_signed_integer (fin); |
n = read_signed_integer (fin); |
337 |
|
if (n > stack_offset) |
338 |
obstack_fgrow1 (oout, "yylsp[%d]", n - stack_offset); |
complain (_("invalid value: %s%d"), "@", n); |
339 |
locations_flag = 1; |
else |
340 |
|
{ |
341 |
|
/* Offset is always 0 if parser has already popped the stack |
342 |
|
pointer. */ |
343 |
|
obstack_fgrow1 (oout, "yylsp[%d]", |
344 |
|
n - (semantic_parser ? 0 : stack_offset)); |
345 |
|
locations_flag = 1; |
346 |
|
} |
347 |
} |
} |
348 |
else |
else |
349 |
{ |
{ |
398 |
ungetc (c, fin); |
ungetc (c, fin); |
399 |
n = read_signed_integer (fin); |
n = read_signed_integer (fin); |
400 |
|
|
401 |
if (!type_name && n > 0) |
if (n > stack_offset) |
402 |
type_name = get_type_name (n, rule); |
complain (_("invalid value: %s%d"), "$", n); |
403 |
|
else |
404 |
obstack_fgrow1 (oout, "yyvsp[%d]", n - stack_offset); |
{ |
405 |
|
if (!type_name && n > 0) |
406 |
|
type_name = get_type_name (n, rule); |
407 |
|
|
408 |
if (type_name) |
/* Offset is always 0 if parser has already popped the stack |
409 |
obstack_fgrow1 (oout, ".%s", type_name); |
pointer. */ |
410 |
if (!type_name && typed) |
obstack_fgrow1 (oout, "yyvsp[%d]", |
411 |
complain (_("$%d of `%s' has no declared type"), |
n - (semantic_parser ? 0 : stack_offset)); |
412 |
n, rule->sym->tag); |
|
413 |
|
if (type_name) |
414 |
|
obstack_fgrow1 (oout, ".%s", type_name); |
415 |
|
if (!type_name && typed) |
416 |
|
complain (_("$%d of `%s' has no declared type"), |
417 |
|
n, rule->sym->tag); |
418 |
|
} |
419 |
} |
} |
420 |
else |
else |
421 |
{ |
{ |
897 |
nsyms--; |
nsyms--; |
898 |
} |
} |
899 |
|
|
900 |
|
|
901 |
static void |
static void |
902 |
parse_muscle_decl (void) |
parse_muscle_decl (void) |
903 |
{ |
{ |
1097 |
| values in the current rule so far, which says where to find `$0' | |
| values in the current rule so far, which says where to find `$0' | |
1098 |
| with respect to the top of the stack. | |
| with respect to the top of the stack. | |
1099 |
| | |
| | |
1100 |
| This routine is used both for actions and guards. Only the | |
| This routine is used both for actions and guards. Only | |
1101 |
| actions_obstack is used, but this is fine, since we use only | |
| ACTION_OBSTACK is used, but this is fine, since we use only | |
1102 |
| pointers to relevant portions inside this obstack. | |
| pointers to relevant portions inside this obstack. | |
1103 |
`-------------------------------------------------------------------*/ |
`-------------------------------------------------------------------*/ |
1104 |
|
|
1108 |
int c; |
int c; |
1109 |
int count; |
int count; |
1110 |
|
|
|
/* offset is always 0 if parser has already popped the stack pointer */ |
|
|
if (semantic_parser) |
|
|
stack_offset = 0; |
|
|
|
|
1111 |
count = 1; |
count = 1; |
1112 |
while (count > 0) |
while (count > 0) |
1113 |
{ |
{ |