mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-25 17:55:00 +02:00
%dump didn't dump the root frame because this frame was only appended to the
list of frames at the end of parsing. We now tentatively append it each time a %dump is requested. - fpd.y: append the root frame before calling "dump" git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5921 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
6374b3a61a
commit
e24b9de387
23
fpd.y
23
fpd.y
@ -249,6 +249,16 @@ static int dbg_print(const struct expr *expr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void append_root_frame(void)
|
||||||
|
{
|
||||||
|
root_frame->prev = last_frame;
|
||||||
|
if (last_frame)
|
||||||
|
last_frame->next = root_frame;
|
||||||
|
else
|
||||||
|
frames = root_frame;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
@ -311,11 +321,7 @@ all:
|
|||||||
}
|
}
|
||||||
fpd
|
fpd
|
||||||
{
|
{
|
||||||
root_frame->prev = last_frame;
|
append_root_frame();
|
||||||
if (last_frame)
|
|
||||||
last_frame->next = root_frame;
|
|
||||||
else
|
|
||||||
frames = root_frame;
|
|
||||||
}
|
}
|
||||||
| START_EXPR expr
|
| START_EXPR expr
|
||||||
{
|
{
|
||||||
@ -455,6 +461,13 @@ frame_item:
|
|||||||
}
|
}
|
||||||
| TOK_DBG_DUMP
|
| TOK_DBG_DUMP
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* It's okay to do append the root frame multiple
|
||||||
|
* times. If more frames are added afterwards, they
|
||||||
|
* just replace the root frame until it gets appended a
|
||||||
|
* final time when parsing ends.
|
||||||
|
*/
|
||||||
|
append_root_frame();
|
||||||
if (!dump(stdout)) {
|
if (!dump(stdout)) {
|
||||||
perror("stdout");
|
perror("stdout");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user