- Timestamp:
- 10/24/14 12:53:25 (10 years ago)
- Branches:
- master
- Children:
- 56c300b
- Parents:
- ab65d57
- git-author:
- to <to@…> (10/24/14 12:53:25)
- git-committer:
- to <to@…> (10/24/14 12:53:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/dgc/dgc
r519eaf5 r845ee69 295 295 my $props = join('',map("\&$_", @{$x->{props}})); 296 296 297 print_outin("LINK $head->{cat}$hflagconstr $dep->{cat}$dflagconstr $x->{role} 297 print_outin("LINK $head->{cat}$hflagconstr $dep->{cat}$dflagconstr $x->{role}$props",$x, @agrs, @govs); 298 298 } 299 299 } … … 368 368 sub complement { my %exclude; for $c (@{shift()}) { $exclude{$c}++ }; [ grep { ! $exclude{$_} } @{$in{cat}} ] } 369 369 370 # printf STDERR "%6d CAT statements\n", 0+keys(%cats);371 # printf STDERR "%6d ROLE statements\n", 0+keys(%role);372 # printf STDERR "%6d SGL statements\n", @sgl+0;373 # printf STDERR "%6d REQ statements\n", @req+0;374 # printf STDERR "%6d LEFT statements\n", $nleft;375 # printf STDERR "%6d RIGHT statements\n", $nright;376 # printf STDERR "%6d INITR statements\n", $ninitr;377 # printf STDERR "%6d FINR statements\n", $nfinr;378 # printf STDERR "%6d INITF statements\n", $ninitf;379 # printf STDERR "%6d FINF statements\n", $nfinf;380 # printf STDERR "%6d INITC statements\n", $ninitc;381 # printf STDERR "%6d FINC statements\n", $nfinc;382 # printf STDERR "%6d LINK statements\n", $nlink;383 # printf STDERR "%6d CLASS statements\n", $nclass;384 # printf STDERR "%6d FLAG statements\n", $nflag;385 # printf STDERR "%6d SET statements\n", $nset;386 # printf STDERR "%6d PASS statements\n", $npass;387 388 389 ##################################################################################390 391 # while(<INPUT>)392 # {393 # $inputlineno++;394 # s/#.*//;395 # s/^\s+//;396 # s/\s+$//;397 # s/\s+/ /g;398 # if (/^CAT ($cat_re)$/) { register('cat', {src=>$&, cat=>attr::parse($1)}, $1); }399 # elsif(/^FLAG (\S+)$/) { register('flag', {src=>$&, flag=>$1}, $1); }400 # elsif(/^ROLE (\S+)$/) { register('role', {src=>$&, role=>$1}, $1); }401 # elsif(/^LEFT (\S+)$/) { register('left', {src=>$&, role=>$1}, 0); }402 # elsif(/^RIGHT (\S+)$/) { register('right', {src=>$&, role=>$1}, 0); }403 # elsif(/^SGL (\S+)$/) { register('sgl', {src=>$&, role=>$1}, 0); }404 # elsif(/^REQ (\S+) (\S+)$/) { register('req', {src=>$&, cat=>$1, role=>$2}, 0); }405 # elsif(/^AGR (\S+) (\S+)$/) { register('agr', {src=>$&, role=>$1, attr=>$2}, $1); }406 # elsif(/^GOV (\S+) (\S+)$/) { register('gov', {src=>$&, role=>$1, cat=>$2, catexp=>attr::parse($2)}, $1); }407 # elsif(/^INIT ($role_re)$/) { register('initr', {src=>$&, role=>$1}, 0); }408 # elsif(/^FIN ($role_re)$/) { register('finr', {src=>$&, role=>$1}, 0); }409 # elsif(/^INIT ($av_re)$/) { register('initf', {src=>$&, flag=>$1}, 0); }410 # elsif(/^FIN ($av_re)$/) { register('finf', {src=>$&, flag=>$1}, 0); }411 # elsif(/^SET ($cat_re)\s+(\S+)$/) { register('set', {src=>$&, cat=>$1, flag=>$2}, 0); }412 # elsif(/^PASS (\S+)\s+(\S+)$/) { register('pass', {src=>$&, role=>$1, flag=>$2}, 0); }413 # elsif(/^CONSTRE (\S+)\s+(\S+)$/) { register('constre', {src=>$&, role1=>$1, role2=>$2}, 0); }414 # elsif(/^CONSTRI (\S+)\s+(\S+)$/) { register('constri', {src=>$&, role1=>$1, role2=>$2}, 0); }415 416 # elsif(my ($hs,$hfs,$ds,$dfs,$r,$rprops) = /^LINK\s+($cats_re)((?:;$avlist_re)?)\s+($cats_re)((?:;$avlist_re)?)\s+($role_re)((?:$proplist_re)?)$/)417 # { register('link', {src=>$&, hs=>$hs, hfs=>$hfs, ds=>$ds, dfs=>$dfs, r=>$r, props=>$rprops},0) }418 # elsif(/^LONG\s+(\S+)((\s+<\S+)*)((\s+\S+>)*)$/)419 # {420 # my $rel = $1;421 # my $ups = $2;422 # my $downs = $4;423 424 # $ups =~ s/<//g;425 # $ups =~ s/^\s+//;426 # my @up = split(/\s+/,$ups) or ();427 428 # $downs =~ s/>//g;429 # $downs =~ s/^\s+//;430 # my @down = split(/\s+/,$downs) or ();431 432 # register('long', {src=>$&, rel=>$rel, up=>\@up, down=>\@down},0);433 434 # print OUTPUT "LONG $rel " . join(",",@up) . "^" . join(",",@down) . "\n";435 # }436 # elsif(my ($cl,$cs) = /^CLASS\s+(\S+)\s*\=(.*)$/)437 # {438 # $class{$1} = $classparser->classexpr($2);439 # }440 # elsif(/^$/)441 # {442 # # pomijamy puste linie oraz komentarze443 # }444 # else445 # {446 # print STDERR "Illegal format: $_\n";447 # }448 # }449 450 451 452 # sub is_cat { shift =~ /$attr::cat_re/; }453 # sub is_role { $role{shift}; }454 # sub is_flag { $flag{shift}; }455 456 457 # sub print_in458 # {459 # my $data = shift();460 # printf "in@%04d ", $data->{line};461 # print $data->{src};462 # }463 464 # sub print_out465 # {466 # printf "out@%08d ", $outline++;467 # print @_;468 # }469 470 # sub addlinks471 # {472 # my ($l, $h,$hfs,$d,$dfs,$r,$rprops) = @_;473 474 # my @heads = extension($h);475 # my @deps = extension($d);476 477 # my @deps_gov;478 # DEP_GOV:479 # for my $dep (@deps)480 # {481 # for my $gov (@govs)482 # {483 # next DEP_GOV unless attr::match(@{$dep->{catexp}},@{$gov->{catexp}});484 # }485 # push @deps_gov, $dep;486 # }487 488 # for my $head (@heads)489 # {490 # DEP:491 # for my $dep (@deps_gov)492 # {493 # for my $agr (@agrs)494 # {495 # next DEP unless attr::agree(@{$head->{catexp}},@{$dep->{catexp}},$agr->{attr});496 # }497 # print_outin("LINK $head->{cat}$hfs $dep->{cat}$dfs $r$rprops",$l, @agrs,@govs);498 # }499 # }500 # }501 502 503 504 505 # elsif(/^INIT\s+([[:upper:]]\S*)$/)506 # {507 # print OUTPUT "#$_\n";508 # my $cat = attr::parse $1;509 # for my $atomcat (keys %cats)510 # {511 # if(attr::match @$cat, @{$cats{$atomcat}})512 # {513 # print OUTPUT "INITC ".$atomcat."\n";514 # ++$ninitc;515 # }516 # }517 # }518 # elsif(/^FIN\s+([[:upper:]]\S*)$/)519 # {520 # print OUTPUT "#$_\n";521 # my $cat = attr::parse $1;522 # for my $atomcat (keys %cats)523 # {524 # if(attr::match @$cat, @{$cats{$atomcat}})525 # {526 # print OUTPUT "FINC ".$atomcat."\n";527 # ++$nfinc;528 # }529 # }530 # }
Note: See TracChangeset
for help on using the changeset viewer.