13 |
|
# filetoparse([filename]) : Set/Return the filename of document |
14 |
|
# newparse(parselabel) : Create a new parse type |
15 |
|
# parse(parselabel) : Parse the document file for the given parse level |
16 |
< |
# addtag(parselabel,tagname,start,obj,text,obj,end,obj) : |
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! |
149 |
|
sub addtag { |
150 |
|
my $self=shift; |
151 |
|
my $parselabel=shift; |
152 |
< |
if ( $#_ != 6 ) { |
152 |
> |
if ( ( $#_ != 6 ) && ( $#_ != 2) ) { |
153 |
|
$self->error("Incorrect addtags specification\n". |
154 |
|
"called with :\n@_ \n"); |
155 |
|
} |