ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/Parse.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/Parse.pm (file contents):
Revision 1.1 by williamc, Tue Nov 23 17:20:55 1999 UTC vs.
Revision 1.5 by williamc, Fri Apr 7 13:40:09 2000 UTC

# Line 19 | Line 19
19   #                                  supplied as a second argument
20   # line()        : return the current linenumber in the file
21   # tagstartline()        : return the linenumber of the last tag opening
22 + # includeparse(Parse) : include the settings from another parse object
23 + # tags()                : return list of defined tags
24 + # cleartags()           : clear of all tags
25 + # opencontext(name)             : open a parse context
26 + # closecontext(name)    : close a parse context
27 + # includecontext(name)  : Process when in a given context
28 + # excludecontext(name)  : No Processing when given context
29 + # contexttag(tagname)   : Register the tagname as one able to change context
30 + #                         if not registerd - the close tag will be ignored
31 + #                         too if outside of the specified context!
32  
33  
34   package ActiveDoc::Parse;
# Line 60 | Line 70 | sub parse {
70             }
71          }
72  
73 <        # parse
73 >        # -- parse
74          $self->{switch}->parse();
75          undef $self->{switch};
76   }
# Line 80 | Line 90 | sub tagstartline {
90          }
91          return undef;
92   }
93 +
94 + sub includeparse {
95 +        my $self=shift;
96 +        my $obj=shift;
97 +
98 +        my $tag;
99 +        # copy the tags from  the remote parse object
100 +        foreach $tag ( $obj->tags() ) {
101 +          $self->addtag($tag,$obj->{tags}->tagsettings($tag));
102 +        }
103 +        # now the group settings
104 + }
105 +
106   sub addtag {
107          my $self=shift;
108          $self->{tags}->addtag(@_);
# Line 97 | Line 120 | sub addignoretags {
120          $self->{gc}->exclude("ignore");
121          $self->{tags}->addtag("Ignore", \&Ignore_Start, $self,
122                          "",$self, \&Ignore_End,$self);
123 +        $self->{tags}->setgrouptag("Ignore");
124 + }
125 +
126 + sub contexttag {
127 +        my $self=shift;
128 +        $self->{tags}->setgrouptag(shift);
129 + }
130 +
131 + sub opencontext {
132 +        my $self=shift;
133 +        $self->{gc}->opencontext(shift);
134 + }
135 +
136 + sub closecontext {
137 +        my $self=shift;
138 +        $self->{gc}->closecontext(shift);
139 + }
140 +
141 + sub includecontext {
142 +        my $self=shift;
143 +        my $name=shift;
144 +
145 +        $self->{gc}->unexclude($name);
146 +        $self->{gc}->include($name);
147 + }
148 +
149 + sub excludecontext {
150 +        my $self=shift;
151 +        my $name=shift;
152 +        $self->{gc}->exclude($name);
153 +        $self->{gc}->uninclude($name);
154 + }
155 +
156 + sub cleartags {
157 +        my $self=shift;
158 +        $self->{tags}->cleartags();
159 + }
160 +
161 + sub tags {
162 +         my $self=shift;
163 +         return $self->{tags}->tags();
164   }
165  
166   # ---------  Basic Group Related Tags ---------------------------------

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines