[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Parser.pm t/03coverage_brace...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Parser.pm t/03coverage_brace... |
Date: |
Mon, 25 Oct 2010 19:26:49 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/10/25 19:26:49
Modified files:
tp/Texinfo : Parser.pm
tp/t : 03coverage_braces.t
tp/t/results/coverage: block_commands.pl math.pl
tp/t/results/coverage_braces: caption_not_closed.pl footnote.pl
footnote_ending_on_empty_line.pl
footnote_not_closed.pl
math_bracketed_inside_not_closed.pl
math_bracketed_not_closed.pl
math_not_closed.pl
space_in_footnote.pl
tp/t/results/def: double_command.pl
end_of_lines_protected_in_footnote.pl
tp/t/results/invalid_nestings: center.pl in_table.pl
on_block_command_line.pl
on_index_entry_line.pl
on_itemize_line.pl
on_section_line.pl
Added files:
tp/t/results/coverage_braces: footnote_in_command_not_closed.pl
Log message:
Use a type for context_brace_command arg.
More systematic handling of closing commands.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.110&r2=1.111
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/03coverage_braces.t?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/block_commands.pl?cvsroot=texinfo&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/math.pl?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/caption_not_closed.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/footnote.pl?cvsroot=texinfo&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/footnote_ending_on_empty_line.pl?cvsroot=texinfo&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/footnote_not_closed.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/math_bracketed_inside_not_closed.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/math_bracketed_not_closed.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/math_not_closed.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/space_in_footnote.pl?cvsroot=texinfo&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/footnote_in_command_not_closed.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/def/double_command.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/def/end_of_lines_protected_in_footnote.pl?cvsroot=texinfo&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/center.pl?cvsroot=texinfo&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/in_table.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/on_block_command_line.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/on_index_entry_line.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/on_itemize_line.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/on_section_line.pl?cvsroot=texinfo&r1=1.2&r2=1.3
Patches:
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -b -r1.110 -r1.111
--- Texinfo/Parser.pm 24 Oct 2010 22:52:52 -0000 1.110
+++ Texinfo/Parser.pm 25 Oct 2010 19:26:48 -0000 1.111
@@ -471,7 +471,8 @@
}
my %type_with_paragraph;
-foreach my $type ('before_item', 'text_root', 'document_root') {
+foreach my $type ('before_item', 'text_root', 'document_root',
+ 'brace_command_context') {
$type_with_paragraph{$type} = 1;
}
@@ -693,8 +694,7 @@
-
-# deep copy of a structure
+# simple deep copy of a structure
sub _deep_copy ($)
{
my $struct = shift;
@@ -703,6 +703,7 @@
return $struct;
}
+# enter all the commands associated with an index name.
sub _enter_index_commands ($$)
{
my $self = shift;
@@ -764,10 +765,11 @@
$parser->{'simple_text_commands'} = _deep_copy (\%simple_text_commands);
$parser->{'no_paragraph_commands'} = { %default_no_paragraph_commands };
$parser->{'index_names'} = _deep_copy (\%index_names);
+ # a hash is simply concatenated
if (ref($parser->{'indices'}) eq 'HASH') {
%{$parser->{'index_names'}} = (%{$parser->{'index_names'}},
%{$parser->{'indices'}});
- } else {
+ } else { # an array holds index names defined with @defindex
foreach my $name (@{$parser->{'indices'}}) {
$parser->{'index_names'}->{$name} = {$name => 0};
}
@@ -824,7 +826,7 @@
return $new_lines;
}
-# The main entry point
+# entry point for text fragments
sub parse_texi_text($$;$)
{
my $self = shift;
@@ -851,6 +853,7 @@
return $self->_parse_texi();
}
+# parse a texi file
sub parse_texi_file ($$)
{
my $self = shift;
@@ -882,20 +885,20 @@
sub tree_to_texi ($);
+# return the errors and warnings
sub errors ($)
{
my $self = shift;
return ($self->{'errors_warnings'}, $self->{'error_nrs'});
}
+# return indices informations
sub indices_information ($)
{
my $self = shift;
return ($self->{'index_names'}, $self->{'merged_indices'});
}
-# internal sub
-
# for debugging
sub _print_current($)
{
@@ -1084,7 +1087,7 @@
# a command arg means closing until that command is found.
# no command arg means closing until the root or a root_command
# is found.
-sub _end_block_command($$$;$)
+sub _close_commands($$$;$)
{
my $self = shift;
my $current = shift;
@@ -1108,32 +1111,7 @@
and ($root_commands{$current->{'cmdname'}}
or ($command and $current->{'parent'}->{'cmdname'}
and
$context_brace_commands{$current->{'parent'}->{'cmdname'}})))){
- if ($current->{'cmdname'}
- and exists($block_commands{$current->{'cmdname'}})) {
- if (defined($command)) {
- $self->_line_error(sprintf($self->__("address@hidden' expected `%s',
but saw `%s'"),
- $current->{'cmdname'}, $command), $line_nr);
- } else {
- $self->_line_error(sprintf($self->__("No matching `%cend %s'"),
- ord('@'), $current->{'cmdname'}), $line_nr);
- }
- pop @{$self->{'context_stack'}} if
- ($preformatted_commands{$current->{'cmdname'}}
- or $menu_commands{$current->{'cmdname'}});
- $current = $current->{'parent'};
- } elsif ($current->{'parent'}->{'cmdname'}
- and exists
$context_brace_commands{$current->{'parent'}->{'cmdname'}}) {
- $current = _close_brace_command($self, $current->{'parent'}, $line_nr);
- pop @{$self->{'context_stack'}};
- } else {
- if ($current->{'type'} and $current->{'type'} eq 'bracketed') {
- # FIXME record the line number in the braccketed and use it
- _line_error ($self, sprintf($self->__("Misplaced %c"),
- ord('{')), $line_nr);
- }
- # silently close containers and @-commands without brace nor @end
- $current = $current->{'parent'};
- }
+ $current = $self->_close_current($current, $line_nr, $command);
}
if ($command and $current->{'cmdname'}
@@ -1172,8 +1150,6 @@
or $current->{'contents'}->[-1]->{'type'} eq
'empty_spaces_before_argument')) {
$no_merge_with_following_text = 1;
}
- # Change this if you don't want to have preceding space added to
- # the text out of the paragraph
if (_abort_empty_line ($self, $current, $leading_spaces)) {
$text =~ s/^(\s+)//;
}
@@ -1190,8 +1166,7 @@
and !$no_merge_with_following_text) {
$current->{'contents'}->[-1]->{'text'} .= $text;
print STDERR "MERGED TEXT: $text|||\n" if ($self->{'debug'});
- }
- else {
+ } else {
push @{$current->{'contents'}}, { 'text' => $text, 'parent' => $current };
print STDERR "NEW TEXT: $text|||\n" if ($self->{'debug'});
}
@@ -1387,7 +1362,6 @@
for ($i=0; $i<=$args_total; $i++) {
$args->[$i] = "" unless (defined($args->[$i]));
}
-# line_error (sprintf(__("Macro `%s' called with too many args"), $name),
$line_nr) if (defined($args->[$i + 1]));
my $result = '';
while ($macrobody ne '') {
@@ -1491,7 +1465,6 @@
#print STDERR "Return command $contents->[0]->{'cmdname'}\n";
return ($spaces, shift @{$contents});
} else {
- # we don't want to change the initial contents, so first we copy
#print STDERR "Process $contents->[0]->{'text'}\n";
$contents->[0]->{'text'} =~ s/^(\s*)//;
my $space_text = $1;
@@ -1575,33 +1548,52 @@
return address@hidden, @args_results];
}
-# close the current command, with error pessages and give the parent.
-sub _close_current($$$)
+# close the current command, with error messages and give the parent.
+# If the last argument is given it is the command being closed if
+# there was no error, currently only block command, used for a
+# better error message.
+sub _close_current($$$;$)
{
my $self = shift;
my $current = shift;
my $line_nr = shift;
+ my $command = shift;
if ($current->{'cmdname'}) {
if (exists($brace_commands{$current->{'cmdname'}})) {
+ pop @{$self->{'context_stack'}}
+ if (exists $context_brace_commands{$current->{'cmdname'}});
$current = _close_brace_command($self, $current, $line_nr);
+ } elsif (exists($block_commands{$current->{'cmdname'}})) {
+ if (defined($command)) {
+ $self->_line_error(sprintf($self->__("address@hidden' expected `%s',
but saw `%s'"),
+ $current->{'cmdname'}, $command), $line_nr);
} else {
- _line_error($self, sprintf($self->__("Closing address@hidden"),
- $current->{'cmdname'}), $line_nr);
+ $self->_line_error(sprintf($self->__("No matching `%cend %s'"),
+ ord('@'), $current->{'cmdname'}), $line_nr);
+ }
+ pop @{$self->{'context_stack'}} if
+ ($preformatted_commands{$current->{'cmdname'}}
+ or $menu_commands{$current->{'cmdname'}});
+ $current = $current->{'parent'};
+ } else { # FIXME is this possible? And does it make sense?
+ # silently close containers and @-commands without brace nor @end
+ #_line_error($self, sprintf($self->__("Closing address@hidden"),
+ # $current->{'cmdname'}), $line_nr);
$current = $current->{'parent'};
}
} elsif ($current->{'type'}) {
if ($current->{'type'} eq 'bracketed') {
- # FIXME record the line number in the braccketed and use it
+ # FIXME record the line number in the bracketed and use it
_line_error ($self, sprintf($self->__("Misplaced %c"),
ord('{')), $line_nr);
$current = $current->{'parent'};
} else {
$current = $current->{'parent'} if ($current->{'parent'});
}
- } else {
+ } else { # Should never go here.
$current = $current->{'parent'} if ($current->{'parent'});
- print STDERR "Where am I?"._print_current($current);
+ print STDERR "BUG: Where am I? "._print_current($current);
}
return $current;
}
@@ -1986,6 +1978,7 @@
#c 'block_line_arg'
#
#c 'brace_command_arg'
+#c 'brace_command_context'
#
#c 'before_item' what comes after @*table, @itemize, @enumerate before
# an @item
@@ -2171,7 +2164,7 @@
($current, $included_file) =
_end_line ($self, $current, $line_nr);
if (!$included_file) {
- $current = _end_block_command($self, $current, $line_nr);
+ $current = _close_commands($self, $current, $line_nr);
return $root;
}
}
@@ -2492,7 +2485,7 @@
}
last;
}
- $current = _end_block_command($self, $current, $line_nr,
+ $current = _close_commands($self, $current, $line_nr,
$end_command);
}
$line = _start_empty_line_after_command($line, $current);
@@ -2514,7 +2507,7 @@
# commands without braces and not block commands, ie no @end
if (defined($self->{'misc_commands'}->{$command})) {
if ($root_commands{$command} or $command eq 'bye') {
- $current = _end_block_command($self, $current, $line_nr);
+ $current = _close_commands($self, $current, $line_nr);
# root_level commands leads to starting setting a new root
# for the whole document and stuffing the preceding text
# as the first content, this is done only once.
@@ -2848,6 +2841,7 @@
if ($context_brace_commands{$command}) {
push @{$self->{'context_stack'}},
$current->{'parent'}->{'cmdname'};
$line =~ s/([^\S\n]*)//;
+ $current->{'type'} = 'brace_command_context';
push @{$current->{'contents'}}, { 'type' => 'empty_line',
'text' => $1,
'parent' => $current };
@@ -2973,7 +2967,7 @@
my $end_conditional = pop @{$self->{'conditionals_stack'}};
_line_error ($self, sprintf($self->__("Expected address@hidden %s"),
$end_conditional), $line_nr);
}
- $current = _end_block_command($self, $current, $line_nr);
+ $current = _close_commands($self, $current, $line_nr);
return $root;
}
@@ -3358,8 +3352,7 @@
or $block_commands{$cmdname} eq 'multitable')
and $cmd->{'args'}) {
foreach my $arg (@{$cmd->{'args'}}) {
- my $arg_expanded = tree_to_texi ($arg);
- $result .= $arg_expanded;
+ $result .= tree_to_texi ($arg);
}
} elsif (($cmd->{'special'} or $cmdname eq 'macro' or $cmdname eq 'rmacro')
and defined($cmd->{'special'}->{'arg_line'})) {
@@ -3374,9 +3367,9 @@
$result =~ s/,$//;
} elsif (defined($cmd->{'args'})) {
my $braces;
- $braces = 1 if (($cmd->{'args'}->[0]->{'type'}
- and $cmd->{'args'}->[0]->{'type'} eq 'brace_command_arg')
- or ($context_brace_commands{$cmdname}));
+ $braces = 1 if ($cmd->{'args'}->[0]->{'type'}
+ and ($cmd->{'args'}->[0]->{'type'} eq 'brace_command_arg'
+ or $cmd->{'args'}->[0]->{'type'} eq
'brace_command_context'));
$result .= '{' if ($braces);
if ($cmdname eq 'verb') {
$result .= $cmd->{'type'};
Index: t/03coverage_braces.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/03coverage_braces.t,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- t/03coverage_braces.t 24 Oct 2010 10:14:49 -0000 1.10
+++ t/03coverage_braces.t 25 Oct 2010 19:26:48 -0000 1.11
@@ -66,7 +66,9 @@
second paragraph
third}
-']
+'],
+['footnote_in_command_not_closed',
+'address@hidden address@hidden footnote']
);
our ($arg_test_case, $arg_generate, $arg_debug);
Index: t/results/coverage/block_commands.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/block_commands.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- t/results/coverage/block_commands.pl 24 Oct 2010 19:08:31 -0000
1.11
+++ t/results/coverage/block_commands.pl 25 Oct 2010 19:26:48 -0000
1.12
@@ -180,7 +180,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'caption',
Index: t/results/coverage/math.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/math.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- t/results/coverage/math.pl 24 Oct 2010 19:08:31 -0000 1.6
+++ t/results/coverage/math.pl 25 Oct 2010 19:26:48 -0000 1.7
@@ -38,7 +38,8 @@
'type' => 'bracketed'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'math',
@@ -101,7 +102,8 @@
'text' => ' a < b'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'math',
@@ -214,7 +216,8 @@
'type' => 'bracketed'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'math',
Index: t/results/coverage_braces/caption_not_closed.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/coverage_braces/caption_not_closed.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/coverage_braces/caption_not_closed.pl 24 Oct 2010 19:08:32
-0000 1.2
+++ t/results/coverage_braces/caption_not_closed.pl 25 Oct 2010 19:26:48
-0000 1.3
@@ -89,7 +89,8 @@
'type' => 'empty_line'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'caption',
Index: t/results/coverage_braces/footnote.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage_braces/footnote.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- t/results/coverage_braces/footnote.pl 24 Oct 2010 19:08:32 -0000
1.8
+++ t/results/coverage_braces/footnote.pl 25 Oct 2010 19:26:48 -0000
1.9
@@ -57,7 +57,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/coverage_braces/footnote_ending_on_empty_line.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/coverage_braces/footnote_ending_on_empty_line.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- t/results/coverage_braces/footnote_ending_on_empty_line.pl 24 Oct 2010
19:08:32 -0000 1.3
+++ t/results/coverage_braces/footnote_ending_on_empty_line.pl 25 Oct 2010
19:26:48 -0000 1.4
@@ -34,7 +34,8 @@
'type' => 'empty_line'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/coverage_braces/footnote_not_closed.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/coverage_braces/footnote_not_closed.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/coverage_braces/footnote_not_closed.pl 24 Oct 2010 19:08:32
-0000 1.2
+++ t/results/coverage_braces/footnote_not_closed.pl 25 Oct 2010 19:26:48
-0000 1.3
@@ -45,7 +45,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/coverage_braces/math_bracketed_inside_not_closed.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/coverage_braces/math_bracketed_inside_not_closed.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/coverage_braces/math_bracketed_inside_not_closed.pl 24 Oct
2010 19:08:32 -0000 1.2
+++ t/results/coverage_braces/math_bracketed_inside_not_closed.pl 25 Oct
2010 19:26:48 -0000 1.3
@@ -33,7 +33,8 @@
'type' => 'bracketed'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'math',
Index: t/results/coverage_braces/math_bracketed_not_closed.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/coverage_braces/math_bracketed_not_closed.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/coverage_braces/math_bracketed_not_closed.pl 24 Oct 2010
19:08:32 -0000 1.2
+++ t/results/coverage_braces/math_bracketed_not_closed.pl 25 Oct 2010
19:26:48 -0000 1.3
@@ -33,7 +33,8 @@
'type' => 'bracketed'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'math',
Index: t/results/coverage_braces/math_not_closed.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/coverage_braces/math_not_closed.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/coverage_braces/math_not_closed.pl 24 Oct 2010 19:08:32
-0000 1.2
+++ t/results/coverage_braces/math_not_closed.pl 25 Oct 2010 19:26:48
-0000 1.3
@@ -13,7 +13,8 @@
'text' => '\\delta + 2'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'math',
Index: t/results/coverage_braces/space_in_footnote.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/coverage_braces/space_in_footnote.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- t/results/coverage_braces/space_in_footnote.pl 24 Oct 2010 19:08:32
-0000 1.3
+++ t/results/coverage_braces/space_in_footnote.pl 25 Oct 2010 19:26:48
-0000 1.4
@@ -27,7 +27,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/def/double_command.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/def/double_command.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/def/double_command.pl 24 Oct 2010 19:08:32 -0000 1.2
+++ t/results/def/double_command.pl 25 Oct 2010 19:26:48 -0000 1.3
@@ -568,12 +568,12 @@
'type' => 'warning'
},
{
- 'error_line' => ':5: Closing @defvr
+ 'error_line' => ':5: No matching address@hidden defvr\'
',
'file_name' => '',
'line_nr' => 5,
'macro' => '',
- 'text' => 'Closing @defvr',
+ 'text' => 'No matching address@hidden defvr\'',
'type' => 'error'
}
];
Index: t/results/def/end_of_lines_protected_in_footnote.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/def/end_of_lines_protected_in_footnote.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- t/results/def/end_of_lines_protected_in_footnote.pl 24 Oct 2010 19:08:32
-0000 1.3
+++ t/results/def/end_of_lines_protected_in_footnote.pl 25 Oct 2010 19:26:49
-0000 1.4
@@ -237,7 +237,8 @@
'type' => 'empty_line_after_command'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/invalid_nestings/center.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/invalid_nestings/center.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- t/results/invalid_nestings/center.pl 24 Oct 2010 19:08:33 -0000
1.5
+++ t/results/invalid_nestings/center.pl 25 Oct 2010 19:26:49 -0000
1.6
@@ -73,7 +73,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
@@ -527,12 +528,12 @@
'type' => 'warning'
},
{
- 'error_line' => ':5: Closing @quotation
+ 'error_line' => ':5: No matching address@hidden quotation\'
',
'file_name' => '',
'line_nr' => 5,
'macro' => '',
- 'text' => 'Closing @quotation',
+ 'text' => 'No matching address@hidden quotation\'',
'type' => 'error'
},
{
Index: t/results/invalid_nestings/in_table.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/invalid_nestings/in_table.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/invalid_nestings/in_table.pl 24 Oct 2010 19:08:33 -0000
1.2
+++ t/results/invalid_nestings/in_table.pl 25 Oct 2010 19:26:49 -0000
1.3
@@ -150,7 +150,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
@@ -209,7 +210,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/invalid_nestings/on_block_command_line.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/invalid_nestings/on_block_command_line.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/invalid_nestings/on_block_command_line.pl 24 Oct 2010 19:08:33
-0000 1.2
+++ t/results/invalid_nestings/on_block_command_line.pl 25 Oct 2010 19:26:49
-0000 1.3
@@ -207,7 +207,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/invalid_nestings/on_index_entry_line.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/invalid_nestings/on_index_entry_line.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/invalid_nestings/on_index_entry_line.pl 24 Oct 2010 19:08:33
-0000 1.2
+++ t/results/invalid_nestings/on_index_entry_line.pl 25 Oct 2010 19:26:49
-0000 1.3
@@ -73,7 +73,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/invalid_nestings/on_itemize_line.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/invalid_nestings/on_itemize_line.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/invalid_nestings/on_itemize_line.pl 24 Oct 2010 19:08:33
-0000 1.2
+++ t/results/invalid_nestings/on_itemize_line.pl 25 Oct 2010 19:26:49
-0000 1.3
@@ -73,7 +73,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/invalid_nestings/on_section_line.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/invalid_nestings/on_section_line.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/invalid_nestings/on_section_line.pl 24 Oct 2010 19:08:33
-0000 1.2
+++ t/results/invalid_nestings/on_section_line.pl 25 Oct 2010 19:26:49
-0000 1.3
@@ -81,7 +81,8 @@
'type' => 'paragraph'
}
],
- 'parent' => {}
+ 'parent' => {},
+ 'type' => 'brace_command_context'
}
],
'cmdname' => 'footnote',
Index: t/results/coverage_braces/footnote_in_command_not_closed.pl
===================================================================
RCS file: t/results/coverage_braces/footnote_in_command_not_closed.pl
diff -N t/results/coverage_braces/footnote_in_command_not_closed.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/coverage_braces/footnote_in_command_not_closed.pl 25 Oct 2010
19:26:48 -0000 1.1
@@ -0,0 +1,98 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
%results_indices);
+
+$result_trees{'footnote_in_command_not_closed'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'aaa'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'in code'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'in footnote'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_context'
+ }
+ ],
+ 'cmdname' => 'footnote',
+ 'contents' => [],
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'code',
+ 'contents' => [],
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'footnote_in_command_not_closed'}{'contents'}[0];
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0]{'parent'}
=
$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'}
=
$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1];
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'contents'}[1]{'parent'}
= $result_trees{'footnote_in_command_not_closed'}{'contents'}[0];
+$result_trees{'footnote_in_command_not_closed'}{'contents'}[0]{'parent'} =
$result_trees{'footnote_in_command_not_closed'};
+
+$result_texis{'footnote_in_command_not_closed'} = 'address@hidden
address@hidden footnote}}';
+
+
+$result_texts{'footnote_in_command_not_closed'} = 'aaain code';
+
+$result_errors{'footnote_in_command_not_closed'} = [
+ {
+ 'error_line' => ':1: @footnote missing close brace
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => '@footnote missing close brace',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => ':1: @code missing close brace
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => '@code missing close brace',
+ 'type' => 'error'
+ }
+];
+
+
+$result_indices{'footnote_in_command_not_closed'} = undef;
+
+
+1;