Changeset 12d8443 for app/src


Ignore:
Timestamp:
04/30/08 12:16:33 (16 years ago)
Author:
pawelk <pawelk@…>
Branches:
master, help
Children:
28e9ae0
Parents:
19dfa5c
git-author:
pawelk <pawelk@…> (04/30/08 12:16:33)
git-committer:
pawelk <pawelk@…> (04/30/08 12:16:33)
Message:

Naproawiono dgc - teraz obsluguje tez komenatrze w linii z regula.

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@34 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/src/dgp/dgc

    r19dfa5c r12d8443  
    131131while(<INPUT>) 
    132132{ 
    133     if(/^\s*AGR\s+(\S+)\s+(\S+)\s*$/) 
     133    s/#.*//; 
     134    s/^\s+//; 
     135    s/\s+$//; 
     136    if(/^AGR\s+(\S+)\s+(\S+)$/) 
    134137    { 
    135138        push @{$agr{$1}}, $2; 
    136139    } 
    137     elsif(/^\s*GOV\s+(\S+)\s+(\S+)\s*$/) 
     140    elsif(/^GOV\s+(\S+)\s+(\S+)$/) 
    138141    { 
    139142        push @{$gov{$1}}, attr::parse($2); 
    140143    } 
    141     elsif(/^\s*ROLE\s+\S+\s*$/) 
     144    elsif(/^ROLE\s+\S+$/) 
    142145    { 
    143146        $roles{$_}=1; 
    144         print OUTPUT; 
    145     } 
    146     elsif(/^\s*SGL\s+\S+\s*$/) 
     147        print OUTPUT "$_\n"; 
     148    } 
     149    elsif(/^SGL\s+\S+$/) 
    147150    { 
    148151        ++$nsgl; 
    149         print OUTPUT; 
    150     } 
    151     elsif(/^\s*REQ\s+(\S+)\s+(\S+)\s*$/) 
    152     { 
    153         print OUTPUT "#$_"; 
     152        print OUTPUT "$_\n"; 
     153    } 
     154    elsif(/^REQ\s+(\S+)\s+(\S+)$/) 
     155    { 
     156        print OUTPUT "#$_\n"; 
    154157        my $cat = attr::parse $1; 
    155158        for my $atomcat (keys %cats) 
     
    162165        } 
    163166    } 
    164     elsif(/^\s*LEFT\s+\S+\s*$/) 
     167    elsif(/^LEFT\s+\S+$/) 
    165168    { 
    166169        ++$nleft; 
    167         print OUTPUT; 
    168     } 
    169     elsif(/^\s*RIGHT\s+\S+\s*$/) 
     170        print OUTPUT "$_\n"; 
     171    } 
     172    elsif(/^RIGHT\s+\S+$/) 
    170173    { 
    171174        ++$nright; 
    172         print OUTPUT; 
    173     } 
    174     elsif(my ($hs,$ds,$r) = /^\s*LINK\s+($cats_re)\s+($cats_re)\s+(\S+)\s*$/) 
    175     { 
    176         print OUTPUT "#$_"; 
     175        print OUTPUT "$_\n"; 
     176    } 
     177    elsif(my ($hs,$ds,$r) = /^LINK\s+($cats_re)\s+($cats_re)\s+(\S+)$/) 
     178    { 
     179        print OUTPUT "#$_\n"; 
    177180        for my $h ($hs =~ /$attr::cat_re/g) 
    178181        { 
     
    183186        } 
    184187    } 
    185      
    186     else 
    187     { 
    188         print OUTPUT; 
     188    elsif(/^$/) { 
     189        # pomijamy puste linie oraz komentarze 
     190        } 
     191        else 
     192    { 
     193        print STDERR "Illegal format: $_\n"; 
    189194    } 
    190195} 
Note: See TracChangeset for help on using the changeset viewer.