10 if (!defined($arg)) { return undef; }
15 while (<STDIN
> =~ /(\w)\t([^\t]*)\t(.*)/) {
16 my ($action, $called, $rest) = ($1, $2, $3);
18 push(@stack, "$called\t$rest");
19 print "e\t$called\t$rest\n";
21 elsif ($action eq "x") {
22 my $parent = pop(@stack);
23 if (defined $parent) {
24 my $parentcalled = firstfield
($parent);
25 while (defined $parent and $parentcalled ne $called) {
26 print "x\t$parentcalled\t$rest\n";
27 $parent = pop(@stack);
28 $parentcalled = firstfield
($parent);
31 print "x\t$called\t$rest\n";