[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Parser.pm Texinfo/Conve...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Parser.pm Texinfo/Conve... |
Date: |
Fri, 26 Nov 2010 15:24:23 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/11/26 15:24:23
Modified files:
tp : TODO
tp/Texinfo : Parser.pm
tp/Texinfo/Convert: Plaintext.pm
tp/t : 27float.t
tp/t/results/include: macro_and_commands_in_early_commands.pl
macro_in_early_commands.pl
tp/t/results/macro: empty_macro.pl empty_macro_in_text_no_arg.pl
macro_no_arg_bad_expansion.pl
two_macros_on_a_line.pl
tp/t/results/value_and_macro: macro_in_value.pl
Log message:
Macro with no arg called without doesn't trigger warning, as said on the
bug-texinfo list.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.155&r2=1.156
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/27float.t?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/include/macro_and_commands_in_early_commands.pl?cvsroot=texinfo&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/include/macro_in_early_commands.pl?cvsroot=texinfo&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/macro/empty_macro.pl?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/macro/empty_macro_in_text_no_arg.pl?cvsroot=texinfo&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/macro/macro_no_arg_bad_expansion.pl?cvsroot=texinfo&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/macro/two_macros_on_a_line.pl?cvsroot=texinfo&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/value_and_macro/macro_in_value.pl?cvsroot=texinfo&r1=1.15&r2=1.16
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- TODO 21 Nov 2010 18:33:40 -0000 1.57
+++ TODO 26 Nov 2010 15:24:22 -0000 1.58
@@ -8,6 +8,19 @@
could be used for the main loop. More simply, a binary tokenizer, at
least, could make for a notable speedup.
+for i18n, one want to do something like
+{style} {number}: {caption}
+ -> new tree.
+
+and
+section {section} in @cite{{manual}}
+ -> new tree
+
+and also maybe
+{acronym_like} ({explanation})
+ -> replace acronym_like with the already formatted text and
+ explanation with convert(explanation).
+
Following should be an error:
@example
@heading A heading
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -b -r1.155 -r1.156
--- Texinfo/Parser.pm 22 Nov 2010 23:27:49 -0000 1.155
+++ Texinfo/Parser.pm 26 Nov 2010 15:24:22 -0000 1.156
@@ -2310,7 +2310,10 @@
($arguments, $line, $line_nr) =
_expand_macro_arguments ($self, $expanded_macro, $line, $line_nr);
} elsif (($args_number >= 2) or ($args_number <1)) {
- _line_warn($self, sprintf($self->__("address@hidden defined with
zero or more than one argument should be invoked with {}"), $command),
$line_nr);
+ # as agreed on the bug-texinfo mailing list, no warn when zero
+ # arg and not called with {}.
+ _line_warn($self, sprintf($self->__("address@hidden defined with
zero or more than one argument should be invoked with {}"), $command), $line_nr)
+ if ($args_number >= 2);
} else {
if ($line !~ /\n/) {
($line, $line_nr) = _new_line($self, $line_nr);
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- Texinfo/Convert/Plaintext.pm 23 Nov 2010 22:07:40 -0000 1.20
+++ Texinfo/Convert/Plaintext.pm 26 Nov 2010 15:24:22 -0000 1.21
@@ -99,7 +99,7 @@
}
my %ignored_commands = %ignored_misc_commands;
-foreach my $ignored_brace_commands ('caption', 'shortcation',
+foreach my $ignored_brace_commands ('caption', 'shortcaption',
'hyphenation') {
$ignored_commands{$ignored_brace_commands} = 1;
}
@@ -1011,7 +1011,41 @@
pop @{$self->{'context'}};
}
pop @{$self->{'format_context'}}
- if ($root->{'cmdname'} and $indented_commands{$root->{'cmdname'}});
+ if ($root->{'cmdname'} and $format_context_commands{$root->{'cmdname'}});
+ if ($root->{'cmdname'} and $root->{'cmdname'} eq 'float') {
+ my $type_texi;
+ my $caption_texi;
+ #if ($root->{'extra'}) {
+ # my @contents;
+ # if ($root->{'extra'}->{'type'}) {
+ # @contents = (@{$root->{'extra'}->{'type'}->{'contents'}});
+ # push @contents, {'text' => " $root->{'number'}"}
+ # if (defined($root->{'number'}));
+ # } elsif (defined($root->{'number'})) {
+ # @contents = ({'text' => $root->{'number'}});
+ # }
+ # my $caption;
+ # if ($root->{'extra'}->{'caption'}) {
+ # $caption = $root->{'extra'}->{'caption'};
+ # } elsif ($root->{'extra'}->{'shortcaption'}) {
+ # $caption = $root->{'extra'}->{'shortcaption'};
+ # }
+ # if ($caption) {
+ # $caption_texi = Texinfo::Convert::Texinfo::convert(
+ # {'contents' => $caption->{'contents'}})
+ # }
+ #}
+ if ($self->{'debug'}) {
+ my $number = '';
+ $number = $root->{'number'} if (defined($root->{'number'}));
+ $type_texi = '' if (!defined($type_texi));
+ $caption_texi = '' if (!defined($caption_texi));
+ print STDERR "FLOAT: ($number) ($type_texi) ($caption_texi)";
+
+ }
+ #if (
+ #my $prepended = Texinfo::Parser::parse_texi_line (undef,
'@b{'.${quotation_arg}.':} ');
+ }
return $result;
}
Index: t/27float.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/27float.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/27float.t 24 Nov 2010 00:15:42 -0000 1.2
+++ t/27float.t 26 Nov 2010 15:24:22 -0000 1.3
@@ -205,6 +205,10 @@
']
);
+foreach my $test (@test_cases) {
+# $test->[2]->{'test_formats'} = ['plaintext'];
+}
+
our ($arg_test_case, $arg_generate, $arg_debug);
run_all ('float', address@hidden, $arg_test_case,
Index: t/results/include/macro_and_commands_in_early_commands.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/include/macro_and_commands_in_early_commands.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- t/results/include/macro_and_commands_in_early_commands.pl 20 Nov 2010
16:58:06 -0000 1.24
+++ t/results/include/macro_and_commands_in_early_commands.pl 26 Nov 2010
15:24:22 -0000 1.25
@@ -615,15 +615,6 @@
'macro' => '',
'text' => 'unrecognized encoding name address@hidden'',
'type' => 'warning'
- },
- {
- 'error_line' => ':21: warning: @multiinclude defined with zero or more
than one argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 21,
- 'macro' => '',
- 'text' => '@multiinclude defined with zero or more than one argument
should be invoked with {}',
- 'type' => 'warning'
}
];
Index: t/results/include/macro_in_early_commands.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/include/macro_in_early_commands.pl,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- t/results/include/macro_in_early_commands.pl 20 Nov 2010 16:58:06
-0000 1.23
+++ t/results/include/macro_in_early_commands.pl 26 Nov 2010 15:24:22
-0000 1.24
@@ -678,26 +678,7 @@
}
};
-$result_errors{'macro_in_early_commands'} = [
- {
- 'error_line' => ':18: warning: @documentencoding-command defined with zero
or more than one argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 18,
- 'macro' => '',
- 'text' => '@documentencoding-command defined with zero or more than one
argument should be invoked with {}',
- 'type' => 'warning'
- },
- {
- 'error_line' => ':28: warning: @multiinclude defined with zero or more
than one argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 28,
- 'macro' => '',
- 'text' => '@multiinclude defined with zero or more than one argument
should be invoked with {}',
- 'type' => 'warning'
- }
-];
+$result_errors{'macro_in_early_commands'} = [];
1;
Index: t/results/macro/empty_macro.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/macro/empty_macro.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- t/results/macro/empty_macro.pl 20 Nov 2010 16:58:07 -0000 1.10
+++ t/results/macro/empty_macro.pl 26 Nov 2010 15:24:23 -0000 1.11
@@ -82,17 +82,7 @@
';
-$result_errors{'empty_macro'} = [
- {
- 'error_line' => ':4: warning: @foo defined with zero or more than one
argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 4,
- 'macro' => '',
- 'text' => '@foo defined with zero or more than one argument should be
invoked with {}',
- 'type' => 'warning'
- }
-];
+$result_errors{'empty_macro'} = [];
1;
Index: t/results/macro/empty_macro_in_text_no_arg.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/macro/empty_macro_in_text_no_arg.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- t/results/macro/empty_macro_in_text_no_arg.pl 20 Nov 2010 16:58:07
-0000 1.11
+++ t/results/macro/empty_macro_in_text_no_arg.pl 26 Nov 2010 15:24:23
-0000 1.12
@@ -142,26 +142,7 @@
This 2 see. A.
';
-$result_errors{'empty_macro_in_text_no_arg'} = [
- {
- 'error_line' => ':4: warning: @texnl defined with zero or more than one
argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 4,
- 'macro' => '',
- 'text' => '@texnl defined with zero or more than one argument should be
invoked with {}',
- 'type' => 'warning'
- },
- {
- 'error_line' => ':9: warning: @texnl2 defined with zero or more than one
argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 9,
- 'macro' => '',
- 'text' => '@texnl2 defined with zero or more than one argument should be
invoked with {}',
- 'type' => 'warning'
- }
-];
+$result_errors{'empty_macro_in_text_no_arg'} = [];
1;
Index: t/results/macro/macro_no_arg_bad_expansion.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/macro/macro_no_arg_bad_expansion.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- t/results/macro/macro_no_arg_bad_expansion.pl 20 Nov 2010 16:58:07
-0000 1.15
+++ t/results/macro/macro_no_arg_bad_expansion.pl 26 Nov 2010 15:24:23
-0000 1.16
@@ -80,17 +80,7 @@
res1 abc
';
-$result_errors{'macro_no_arg_bad_expansion'} = [
- {
- 'error_line' => ':5: warning: @test1 defined with zero or more than one
argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 5,
- 'macro' => '',
- 'text' => '@test1 defined with zero or more than one argument should be
invoked with {}',
- 'type' => 'warning'
- }
-];
+$result_errors{'macro_no_arg_bad_expansion'} = [];
1;
Index: t/results/macro/two_macros_on_a_line.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/macro/two_macros_on_a_line.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- t/results/macro/two_macros_on_a_line.pl 20 Nov 2010 16:58:08 -0000
1.17
+++ t/results/macro/two_macros_on_a_line.pl 26 Nov 2010 15:24:23 -0000
1.18
@@ -425,26 +425,7 @@
after in mymacro
';
-$result_errors{'two_macros_on_a_line'} = [
- {
- 'error_line' => ':16: warning: @mymacro defined with zero or more than one
argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 16,
- 'macro' => '',
- 'text' => '@mymacro defined with zero or more than one argument should be
invoked with {}',
- 'type' => 'warning'
- },
- {
- 'error_line' => ':19: warning: @mymacro defined with zero or more than one
argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 19,
- 'macro' => '',
- 'text' => '@mymacro defined with zero or more than one argument should be
invoked with {}',
- 'type' => 'warning'
- }
-];
+$result_errors{'two_macros_on_a_line'} = [];
1;
Index: t/results/value_and_macro/macro_in_value.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/value_and_macro/macro_in_value.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- t/results/value_and_macro/macro_in_value.pl 20 Nov 2010 16:58:10 -0000
1.15
+++ t/results/value_and_macro/macro_in_value.pl 26 Nov 2010 15:24:23 -0000
1.16
@@ -155,17 +155,7 @@
b
';
-$result_errors{'macro_in_value'} = [
- {
- 'error_line' => ':9: warning: @ab defined with zero or more than one
argument should be invoked with {}
-',
- 'file_name' => '',
- 'line_nr' => 9,
- 'macro' => '',
- 'text' => '@ab defined with zero or more than one argument should be
invoked with {}',
- 'type' => 'warning'
- }
-];
+$result_errors{'macro_in_value'} = [];
1;