[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Parser.pm t/30sectionin...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Parser.pm t/30sectionin... |
Date: |
Sat, 04 Dec 2010 14:54:07 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/12/04 14:54:07
Modified files:
tp : TODO
tp/Texinfo : Parser.pm
tp/t : 30sectioning.t 80include.t
tp/t/results/def: double_command.pl
tp/t/results/misc_commands: invalid_documentencoding.pl
many_lines.pl setfilename.pl
tp/t/results/regions: double_copying.pl
double_titlepage_not_closed.pl
Added files:
tp/t/results/include: include_setfilename_on_setfilename_line.pl
tp/t/results/sectioning: setfilename_on_top_and_after_node.pl
Log message:
Register global commands and warn for some multiply defined commands.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.159&r2=1.160
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/30sectioning.t?cvsroot=texinfo&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/80include.t?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/def/double_command.pl?cvsroot=texinfo&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/include/include_setfilename_on_setfilename_line.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/misc_commands/invalid_documentencoding.pl?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/misc_commands/many_lines.pl?cvsroot=texinfo&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/misc_commands/setfilename.pl?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/regions/double_copying.pl?cvsroot=texinfo&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/regions/double_titlepage_not_closed.pl?cvsroot=texinfo&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/setfilename_on_top_and_after_node.pl?cvsroot=texinfo&rev=1.1
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- TODO 2 Dec 2010 09:17:32 -0000 1.59
+++ TODO 4 Dec 2010 14:54:06 -0000 1.60
@@ -42,12 +42,6 @@
"%c%s expects `i' or `j' as argument, not `%s'"
no warning in
-t/25regions.t double_copying
-
-no warning in
-t/57invalid_nestings.t recursive_copying
-
-no warning in
t/19def.t empty_def_arguments
warn when a @noindent/@indent appears within a paragraph.
@@ -61,6 +55,10 @@
use definfoenclose information in Convert::Text?
+t/30sectioning.t setfilename_on_top_and_after_node
+there could be a wrning
+ warning: @setfilename after the first element
+
Incorporation of texi2html tests
--------------------------------
@@ -69,8 +67,6 @@
glossary.texi
bib-example.texi (big test)
macro-at.texi (the macro part is already done)
-double_setfilename.texi
-bad_setfilename.texi
from test_paths.texi:
@image{formatting/f--ile}
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -b -r1.159 -r1.160
--- Texinfo/Parser.pm 4 Dec 2010 13:19:38 -0000 1.159
+++ Texinfo/Parser.pm 4 Dec 2010 14:54:06 -0000 1.160
@@ -353,6 +353,18 @@
$type_with_paragraph{$type} = 1;
}
+my %global_multiple_commands;
+foreach my $global_multiple_command ('author', 'documentlanguage',
+ 'subtitle') {
+ $global_multiple_commands{$global_multiple_command} = 1;
+}
+
+my %global_unique_commands;
+foreach my $global_unique_command ('documentencoding', 'title',
+ 'shorttitlepage', 'settitle', 'copying', 'documentdescription', 'titlepage',
+ 'setfilename') {
+ $global_unique_commands{$global_unique_command} = 1;
+}
# key is index name, keys of the reference value are the prefixes.
# value associated with the prefix is 0 if the prefix is not a code-like
@@ -855,6 +867,19 @@
$parser->{'error_nrs'}++ unless ($continuation);
}
+sub _register_global_unique_command($$$)
+{
+ my $self = shift;
+ my $current = shift;
+ my $line_nr = shift;
+ if (exists ($self->{'extra'}->{$current->{'cmdname'}})) {
+ _line_warn ($self, sprintf($self->__('Multiple @%s'),
+ $current->{'cmdname'}), $line_nr);
+ } else {
+ $self->{'extra'}->{$current->{'cmdname'}} = $current;
+ }
+}
+
# parse a @macro line
sub _parse_macro_command_line($$$$$;$)
{
@@ -2884,6 +2909,7 @@
# noarg skipline skipspace line lineraw /^\d$/
my $arg_spec = $self->{'misc_commands'}->{$command};
+ my $misc;
if ($arg_spec eq 'noarg') {
my $ignored = 0;
@@ -2891,7 +2917,8 @@
my $parent = $current;
while ($parent) {
if ($parent->{'cmdname'} and $parent->{'cmdname'} eq
'copying') {
- $self->_line_error (sprintf($self->__("address@hidden not
allowed inside address@hidden' block"), $command, $parent->{'cmdname'}),
$line_nr);
+ $self->_line_error (sprintf($self->__("address@hidden not
allowed inside address@hidden' block"),
+ $command, $parent->{'cmdname'}),
$line_nr);
$ignored = 1;
last;
}
@@ -2899,10 +2926,9 @@
}
}
unless ($ignored) {
- push @{$current->{'contents'}}, {'cmdname' => $command,
+ $misc = {'cmdname' => $command,
'parent' => $current};
- $current->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'} = 1
- if ($invalid);
+ push @{$current->{'contents'}}, $misc;
}
# all the cases using the raw line
} elsif ($arg_spec eq 'skipline' or $arg_spec eq 'lineraw'
@@ -2912,20 +2938,19 @@
my ($new_line, $new_line_nr) = _new_line($self, $line_nr);
$line .= $new_line if (defined($new_line));
}
- push @{$current->{'contents'}}, {'cmdname' => $command,
+ $misc = {'cmdname' => $command,
'parent' => $current};
- $current->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'} = 1
- if ($invalid);
+ push @{$current->{'contents'}}, $misc;
my $args = [];
if ($arg_spec eq 'lineraw') {
$args = [ $line ];
} elsif ($arg_spec eq 'special') {
$args
= $self->_parse_special_misc_command($line, $command,
$line_nr);
- $current->{'contents'}->[-1]->{'extra'}->{'arg_line'} = $line;
+ $misc->{'extra'}->{'arg_line'} = $line;
}
foreach my $arg (@$args) {
- push @{$current->{'contents'}->[-1]->{'args'}},
+ push @{$misc->{'args'}},
{ 'type' => 'misc_arg', 'text' => $arg,
'parent' => $current->{'contents'}->[-1] };
}
@@ -2939,6 +2964,8 @@
} elsif ($command eq 'novalidate') {
$self->{'novalidate'} = 1;
}
+ $misc->{'extra'}->{'invalid_nesting'} = 1 if ($invalid);
+
last NEXT_LINE if ($command eq 'bye');
last;
} else {
@@ -2952,12 +2979,11 @@
if ($command eq 'item') {
print STDERR "ITEM_CONTAINER\n" if ($self->{'debug'});
$parent->{'items_count'}++;
- push @{$parent->{'contents'}},
- { 'cmdname' => $command, 'parent' => $parent,
+ $misc = { 'cmdname' => $command, 'parent' => $parent,
'contents' => [],
- 'extra' => {'item_number' => $parent->{'items_count'}} };
- $current->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'}
= 1
- if ($invalid);
+ 'extra' =>
+ {'item_number' => $parent->{'items_count'}} };
+ push @{$parent->{'contents'}}, $misc;
$current = $parent->{'contents'}->[-1];
} else {
$self->_line_error (sprintf($self->__("address@hidden not
meaningful inside address@hidden' block"), $command, $parent->{'cmdname'}),
$line_nr);
@@ -2967,10 +2993,8 @@
if ($command eq 'item' or $command eq 'itemx') {
print STDERR "ITEM_LINE\n" if ($self->{'debug'});
$current = $parent;
- push @{$current->{'contents'}},
- { 'cmdname' => $command, 'parent' => $current };
- $current->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'}
= 1
- if ($invalid);
+ $misc = { 'cmdname' => $command, 'parent' => $current };
+ push @{$current->{'contents'}}, $misc;
$line_arg = 1;
} else {
$self->_line_error (sprintf($self->__("address@hidden not
meaningful inside address@hidden' block"), $command, $parent->{'cmdname'}),
$line_nr);
@@ -2990,13 +3014,12 @@
$self->_line_error (sprintf($self->__("Too many columns
in multitable item (max %d)"), $parent->{'extra'}->{'max_columns'}), $line_nr);
} else {
$row->{'cells_count'}++;
- push @{$row->{'contents'}}, { 'cmdname' => $command,
+ $misc = { 'cmdname' => $command,
'parent' => $row,
'contents' => [],
'extra' =>
{'cell_number' => $row->{'cells_count'}} };
- $row->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'}
= 1
- if ($invalid);
+ push @{$row->{'contents'}}, $misc;
$current = $row->{'contents'}->[-1];
print STDERR "TAB\n" if ($self->{'debug'});
}
@@ -3008,12 +3031,11 @@
'extra' => {'row_number' =>
$parent->{'rows_count'} },
'parent' => $parent };
push @{$parent->{'contents'}}, $row;
- push @{$row->{'contents'}}, { 'cmdname' => $command,
+ $misc = { 'cmdname' => $command,
'parent' => $row,
'contents' => [],
'extra' => {'cell_number' =>
1}};
- $row->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'} =
1
- if ($invalid);
+ push @{$row->{'contents'}}, $misc;
$current = $row->{'contents'}->[-1];
}
} else {
@@ -3026,11 +3048,9 @@
}
} else {
- push @{$current->{'contents'}},
- { 'cmdname' => $command, 'parent' => $current,
+ $misc = { 'cmdname' => $command, 'parent' => $current,
'line_nr' => $line_nr };
- $current->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'} = 1
- if ($invalid);
+ push @{$current->{'contents'}}, $misc;
if ($self->{'sections_level'} and $root_commands{$command}
and $command ne 'node' and $command ne 'part') {
$current->{'contents'}->[-1]->{'extra'}->{'sections_level'}
@@ -3111,6 +3131,12 @@
}
$line = _start_empty_line_after_command($line, $current);
}
+ $misc->{'extra'}->{'invalid_nesting'} = 1 if ($invalid);
+ if ($global_multiple_commands{$command} and $command ne 'author') {
+ push @{$self->{'extra'}->{$command}}, $misc;
+ } elsif ($global_unique_commands{$command}) {
+ $self->_register_global_unique_command($misc, $line_nr);
+ }
# @-command with matching @end
} elsif (exists($block_commands{$command})) {
if ($command eq 'macro' or $command eq 'rmacro') {
@@ -3156,6 +3182,7 @@
# the end of line?
last;
} else {
+ my $block;
# a menu command closes a menu_comment, but not the other
# block commands. This won't catch menu commands buried in
# other formats (that are incorrect anyway).
@@ -3172,12 +3199,10 @@
# with def*x.
if ($def_commands{$command}) {
push @{$self->{'context_stack'}}, 'def';
- push @{$current->{'contents'}}, {
- 'parent' => $current,
+ $block = { 'parent' => $current,
'cmdname' => $command,
'contents' => [] };
- $current->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'} = 1
- if ($invalid);
+ push @{$current->{'contents'}}, $block;
$current = $current->{'contents'}->[-1];
push @{$current->{'contents'}}, {
'type' => 'def_line',
@@ -3189,11 +3214,10 @@
$current->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'} = 1
if ($invalid);
} else {
- push @{$current->{'contents'}}, { 'cmdname' => $command,
+ $block = { 'cmdname' => $command,
'parent' => $current,
'contents' => [] };
- $current->{'contents'}->[-1]->{'extra'}->{'invalid_nesting'} = 1
- if ($invalid);
+ push @{$current->{'contents'}}, $block;
}
$current = $current->{'contents'}->[-1];
if ($block_arg_commands{$command}) {
@@ -3234,6 +3258,10 @@
}
}
+ $block->{'extra'}->{'invalid_nesting'} = 1 if ($invalid);
+ if ($global_unique_commands{$command}) {
+ $self->_register_global_unique_command($block, $line_nr);
+ }
$line = _start_empty_line_after_command($line, $current);
}
} elsif (defined($brace_commands{$command})
Index: t/30sectioning.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/30sectioning.t,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- t/30sectioning.t 1 Dec 2010 22:39:44 -0000 1.16
+++ t/30sectioning.t 4 Dec 2010 14:54:06 -0000 1.17
@@ -560,6 +560,12 @@
@top Second top
Second top.
+'],
+['setfilename_on_top_and_after_node',
+'@node Top
address@hidden In top @setfilename very badly placed setfilename
+
address@hidden a bit too late
']
);
Index: t/80include.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/80include.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- t/80include.t 27 Oct 2010 18:44:30 -0000 1.6
+++ t/80include.t 4 Dec 2010 14:54:06 -0000 1.7
@@ -125,6 +125,9 @@
After.'],
['include_with_setfilename',
'@include included_file_with_setfilename.texi
+'],
+['include_setfilename_on_setfilename_line',
+'@setfilename file @setfilename other file @include are you joking!
']
);
Index: t/results/def/double_command.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/def/double_command.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- t/results/def/double_command.pl 1 Dec 2010 22:39:45 -0000 1.13
+++ t/results/def/double_command.pl 4 Dec 2010 14:54:06 -0000 1.14
@@ -184,6 +184,7 @@
'index_name' => 'fn',
'index_prefix' => 'f'
},
+ 'invalid_nesting' => 1,
'original_def_cmdname' => 'deffnx'
},
'line_nr' => {
Index: t/results/misc_commands/invalid_documentencoding.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/misc_commands/invalid_documentencoding.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/results/misc_commands/invalid_documentencoding.pl 1 Dec 2010 22:39:46
-0000 1.1
+++ t/results/misc_commands/invalid_documentencoding.pl 4 Dec 2010 14:54:07
-0000 1.2
@@ -486,6 +486,15 @@
$result_errors{'invalid_documentencoding'} = [
{
+ 'error_line' => ':4: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':4: warning: Encoding `latin1a\' is not a canonical
texinfo encoding
',
'file_name' => '',
@@ -504,6 +513,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':5: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':5: warning: Encoding `YS-ASCII\' is not a canonical
texinfo encoding
',
'file_name' => '',
@@ -531,6 +549,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':6: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':6: warning: Encoding `bad encoding name\' is not a
canonical texinfo encoding
',
'file_name' => '',
@@ -549,6 +576,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':7: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 7,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':7: warning: Encoding `1\' is not a canonical texinfo
encoding
',
'file_name' => '',
@@ -567,6 +603,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':8: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 8,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':8: warning: Encoding `%\' is not a canonical texinfo
encoding
',
'file_name' => '',
@@ -585,6 +630,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':9: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 9,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':9: warning: Encoding address@hidden' is not a canonical
texinfo encoding
',
'file_name' => '',
@@ -603,6 +657,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':10: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 10,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':10: warning: Encoding `AAATeX\' is not a canonical
texinfo encoding
',
'file_name' => '',
@@ -621,6 +684,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':11: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 11,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':11: warning: Encoding `BBBe\'\' is not a canonical
texinfo encoding
',
'file_name' => '',
Index: t/results/misc_commands/many_lines.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/misc_commands/many_lines.pl,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- t/results/misc_commands/many_lines.pl 1 Dec 2010 22:39:46 -0000
1.22
+++ t/results/misc_commands/many_lines.pl 4 Dec 2010 14:54:07 -0000
1.23
@@ -1700,6 +1700,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':30: warning: Multiple @documentencoding
+',
+ 'file_name' => '',
+ 'line_nr' => 30,
+ 'macro' => '',
+ 'text' => 'Multiple @documentencoding',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':31: warning: @frenchspacing should only appear at a line
beginning
',
'file_name' => '',
Index: t/results/misc_commands/setfilename.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/misc_commands/setfilename.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- t/results/misc_commands/setfilename.pl 20 Nov 2010 16:58:08 -0000
1.10
+++ t/results/misc_commands/setfilename.pl 4 Dec 2010 14:54:07 -0000
1.11
@@ -233,7 +233,35 @@
$result_texts{'setfilename'} = '
';
-$result_errors{'setfilename'} = [];
+$result_errors{'setfilename'} = [
+ {
+ 'error_line' => ':2: warning: Multiple @setfilename
+',
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => '',
+ 'text' => 'Multiple @setfilename',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':3: warning: Multiple @setfilename
+',
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => '',
+ 'text' => 'Multiple @setfilename',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':4: warning: Multiple @setfilename
+',
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => '',
+ 'text' => 'Multiple @setfilename',
+ 'type' => 'warning'
+ }
+];
1;
Index: t/results/regions/double_copying.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/regions/double_copying.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- t/results/regions/double_copying.pl 20 Nov 2010 16:58:09 -0000 1.7
+++ t/results/regions/double_copying.pl 4 Dec 2010 14:54:07 -0000 1.8
@@ -103,7 +103,17 @@
$result_texts{'double_copying'} = '';
-$result_errors{'double_copying'} = [];
+$result_errors{'double_copying'} = [
+ {
+ 'error_line' => ':5: warning: Multiple @copying
+',
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => '',
+ 'text' => 'Multiple @copying',
+ 'type' => 'warning'
+ }
+];
1;
Index: t/results/regions/double_titlepage_not_closed.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/regions/double_titlepage_not_closed.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- t/results/regions/double_titlepage_not_closed.pl 20 Nov 2010 16:58:09
-0000 1.7
+++ t/results/regions/double_titlepage_not_closed.pl 4 Dec 2010 14:54:07
-0000 1.8
@@ -105,6 +105,15 @@
$result_errors{'double_titlepage_not_closed'} = [
{
+ 'error_line' => ':6: warning: Multiple @titlepage
+',
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => '',
+ 'text' => 'Multiple @titlepage',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':8: No matching address@hidden titlepage\'
',
'file_name' => '',
Index: t/results/include/include_setfilename_on_setfilename_line.pl
===================================================================
RCS file: t/results/include/include_setfilename_on_setfilename_line.pl
diff -N t/results/include/include_setfilename_on_setfilename_line.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/include/include_setfilename_on_setfilename_line.pl 4 Dec
2010 14:54:07 -0000 1.1
@@ -0,0 +1,189 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted);
+
+$result_trees{'include_setfilename_on_setfilename_line'} = {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'file'
+ },
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'spaces_at_end'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'other file'
+ },
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'spaces_at_end'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'are you joking!'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'include',
+ 'extra' => {
+ 'invalid_nesting' => 1,
+ 'text_arg' => 'are you joking!'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'setfilename',
+ 'extra' => {
+ 'invalid_nesting' => 1,
+ 'text_arg' => 'other file'
+ },
+ 'line_nr' => {},
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'setfilename',
+ 'extra' => {
+ 'text_arg' => 'file'
+ },
+ 'line_nr' => {},
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[2]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[2]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[2]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'args'}[0]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'line_nr'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'line_nr'};
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'parent'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'parent'}
= $result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0];
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'line_nr'}
=
$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[3]{'line_nr'};
+$result_trees{'include_setfilename_on_setfilename_line'}{'contents'}[0]{'parent'}
= $result_trees{'include_setfilename_on_setfilename_line'};
+
+$result_texis{'include_setfilename_on_setfilename_line'} = '@setfilename file
@setfilename other file @include are you joking!
+';
+
+
+$result_texts{'include_setfilename_on_setfilename_line'} = '';
+
+$result_errors{'include_setfilename_on_setfilename_line'} = [
+ {
+ 'error_line' => ':1: warning: @setfilename should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => '@setfilename should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':1: warning: @setfilename should not appear in
@setfilename
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => '@setfilename should not appear in @setfilename',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':1: warning: Multiple @setfilename
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => 'Multiple @setfilename',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':1: warning: @include should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => '@include should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':1: warning: @include should not appear in @setfilename
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => '@include should not appear in @setfilename',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':1: @include: Cannot find are you joking!
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => '@include: Cannot find are you joking!',
+ 'type' => 'error'
+ }
+];
+
+
+1;
Index: t/results/sectioning/setfilename_on_top_and_after_node.pl
===================================================================
RCS file: t/results/sectioning/setfilename_on_top_and_after_node.pl
diff -N t/results/sectioning/setfilename_on_top_and_after_node.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/sectioning/setfilename_on_top_and_after_node.pl 4 Dec 2010
14:54:07 -0000 1.1
@@ -0,0 +1,291 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted);
+
+$result_trees{'setfilename_on_top_and_after_node'} = {
+ 'contents' => [
+ {
+ 'contents' => [],
+ 'type' => 'text_root'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'Top'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [],
+ 'normalized' => 'Top'
+ }
+ ],
+ 'normalized' => 'Top'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'In top'
+ },
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'spaces_at_end'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'very badly placed setfilename'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'setfilename',
+ 'extra' => {
+ 'invalid_nesting' => 1,
+ 'text_arg' => 'very badly placed setfilename'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'top',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'a bit too late'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'setfilename',
+ 'extra' => {
+ 'text_arg' => 'a bit too late'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'extra' => {
+ 'misc_content' => [
+ {},
+ {},
+ {}
+ ]
+ },
+ 'level' => 0,
+ 'line_nr' => {},
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'extra'}{'node_content'}[0]
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'extra'}{'node_content'};
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[1]{'parent'} =
$result_trees{'setfilename_on_top_and_after_node'};
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[2]{'parent'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'args'}[0]{'parent'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[0]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1]{'args'}[0];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'parent'}
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'contents'}[1]{'parent'}
= $result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'extra'}{'misc_content'}[0]
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[1];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'extra'}{'misc_content'}[1]
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[2];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'extra'}{'misc_content'}[2]
=
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3];
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'line_nr'} =
$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'args'}[0]{'contents'}[3]{'line_nr'};
+$result_trees{'setfilename_on_top_and_after_node'}{'contents'}[2]{'parent'} =
$result_trees{'setfilename_on_top_and_after_node'};
+
+$result_texis{'setfilename_on_top_and_after_node'} = '@node Top
address@hidden In top @setfilename very badly placed setfilename
+
address@hidden a bit too late
+';
+
+
+$result_texts{'setfilename_on_top_and_after_node'} = 'In top
+******
+
+';
+
+$result_sectioning{'setfilename_on_top_and_after_node'} = {
+ 'level' => -1,
+ 'section_childs' => [
+ {
+ 'cmdname' => 'top',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+ }
+ },
+ 'level' => 0,
+ 'section_up' => {}
+ }
+ ]
+};
+$result_sectioning{'setfilename_on_top_and_after_node'}{'section_childs'}[0]{'section_up'}
= $result_sectioning{'setfilename_on_top_and_after_node'};
+
+$result_nodes{'setfilename_on_top_and_after_node'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'top',
+ 'extra' => {},
+ 'level' => 0
+ },
+ 'normalized' => 'Top'
+ },
+ 'node_up' => {
+ 'extra' => {},
+ 'manual_content' => [
+ {
+ 'text' => 'dir'
+ }
+ ]
+ }
+};
+
+$result_menus{'setfilename_on_top_and_after_node'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+};
+
+$result_errors{'setfilename_on_top_and_after_node'} = [
+ {
+ 'error_line' => ':2: warning: @setfilename should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => '',
+ 'text' => '@setfilename should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':2: warning: @setfilename should not appear in @top
+',
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => '',
+ 'text' => '@setfilename should not appear in @top',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':4: warning: Multiple @setfilename
+',
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => '',
+ 'text' => 'Multiple @setfilename',
+ 'type' => 'warning'
+ }
+];
+
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp TODO Texinfo/Parser.pm t/30sectionin...,
Patrice Dumas <=