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

Comparing COMP/SCRAM/src/ActiveDoc/SimpleDoc.pm (file contents):
Revision 1.1 by williamc, Wed Apr 5 10:12:13 2000 UTC vs.
Revision 1.2 by williamc, Fri Apr 7 13:40:10 2000 UTC

# Line 5 | Line 5
5   #
6   # Description
7   # -----------
8 < # Simple multi parsing functionality
8 > # Simple multi parsing functionality and group manipulation
9   #
10   # Interface
11   # ---------
# Line 15 | Line 15
15   # parse(parselabel)    : Parse the document file for the given parse level
16   # addtag(parselabel,tagname,start,obj,text,obj,end,obj) :
17   #                                Add tags to the parse given by label
18 + # grouptag(tagname, parselabel) : Allow a tag to switch context
19 + #                                 - if not you can never turn a context off!
20   # checktag(tagname, hashref, param) : check for existence of param in
21   #                                       hashref from a tag call
22   # includeparse(local_parsename, objparsename, activedoc) : copy the parse from
# Line 24 | Line 26
26   #
27   # addignoretags(parsename) : add <ignore> </igonore> tags funtionality to the
28   #                               specified parse
29 + # opengroup(name) : declare a group to be open
30 + # closegroup(name) : declare a group to be closed
31 + # allowgroup(name,parse) : allow a group so named
32 + # disallowgroup(name,parse) : disallow the named group
33 + # restoregroup(name,parse) : restore group access setting (that before last change)
34   # --------------- Error handling routines ---------------
35   # verbose(string)       : Print string in verbosity mode
36   # verbosity(0|1)        : verbosity off|on
# Line 157 | Line 164 | sub filetoparse {
164          }
165          return $self->{filename};
166   }
167 + # --------- Group services
168 + sub grouptag {
169 +        my $self=shift;
170 +        my $name=shift;
171 +        my $parselabel=shift;
172 +
173 +        $self->{parsers}{$parselabel}->contexttag($name);
174 + }
175 +
176 + sub opengroup {
177 +        my $self=shift;
178 +        my $name=shift;
179 +
180 +        if ( defined $self->currentparser ) {
181 +           $self->currentparser()->opencontext($name);
182 +        }
183 +        else {
184 +           $self->error("Cannot Call opengroup outside of a parse (".
185 +                        caller().")");
186 +        }
187 + }
188 +
189 + sub closegroup {
190 +        my $self=shift;
191 +        my $name=shift;
192 +
193 +        if ( defined $self->currentparser ) {
194 +           $self->currentparser()->closecontext($name);
195 +        }
196 +        else {
197 +           $self->error("Cannot Call closegroup outside of a parse (".
198 +                        caller().")");
199 +        }
200 + }
201 +
202 + sub allowgroup {
203 +        my $self=shift;
204 +        my $name=shift;
205 +        my $parselabel=shift;
206 +
207 +        $self->{parsers}{$parselabel}->includecontext($name);
208 + }
209 +
210 + sub disallowgroup {
211 +        my $self=shift;
212 +        my $name=shift;
213 +        my $parselabel=shift;
214 +
215 +        $self->{parsers}{$parselabel}->excludecontext($name);
216 + }
217  
218   # -------- Error Handling and Error services --------------
219  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines