[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5213] * tp/texi2any.pl, doc/texinfo.txi ( Customization Variabl
From: |
Patrice Dumas |
Subject: |
[5213] * tp/texi2any.pl, doc/texinfo.txi ( Customization Variables and Options): |
Date: |
Thu, 28 Feb 2013 08:34:49 +0000 |
Revision: 5213
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5213
Author: pertusus
Date: 2013-02-28 08:34:47 +0000 (Thu, 28 Feb 2013)
Log Message:
-----------
* tp/texi2any.pl, doc/texinfo.txi (Customization Variables and Options):
two new formats, parse and structure that respectively do the parsing
phase, and the parsing and structuring phase, and no conversion.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.txi
trunk/tp/texi2any.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2013-02-28 08:07:53 UTC (rev 5212)
+++ trunk/ChangeLog 2013-02-28 08:34:47 UTC (rev 5213)
@@ -3,6 +3,9 @@
* tp/t/test_utils.pl: close generated files before doing the comparison.
* tp/Texinfo/Convert/Plaintext.pm, tp/Texinfo/Convert/Info.pm:
cache get_conf() results. Convert node names only once.
+ * tp/texi2any.pl, doc/texinfo.txi (Customization Variables and Options):
+ two new formats, parse and structure that respectively do the parsing
+ phase, and the parsing and structuring phase, and no conversion.
2013-02-26 Karl Berry <address@hidden>
Modified: trunk/doc/texinfo.txi
===================================================================
--- trunk/doc/texinfo.txi 2013-02-28 08:07:53 UTC (rev 5212)
+++ trunk/doc/texinfo.txi 2013-02-28 08:34:47 UTC (rev 5213)
@@ -17613,6 +17613,9 @@
Instead of generating a regular output format, output a text representation
of the tree obtained by parsing the input texinfo document.
address@hidden parse
+Do only the Texinfo source parsing phase. There is no output in that case.
+
@item plaintexinfo
Output the Texinfo source with all the macros, @code{@@include} and
@code{@@address@hidden@}} expanded. This is similar to setting
@@ -17625,6 +17628,10 @@
ignored and there is no paragraph filling. This is used by the parser
for file names and copyright text in HTML comments, for example.
address@hidden structure
+Do the Texinfo source parsing and determination of the document structure.
+There is no output in that case.
+
@item texinfosxml
@cindex SXML output
@cindex S-expressions, output format
Modified: trunk/tp/texi2any.pl
===================================================================
--- trunk/tp/texi2any.pl 2013-02-28 08:07:53 UTC (rev 5212)
+++ trunk/tp/texi2any.pl 2013-02-28 08:34:47 UTC (rev 5213)
@@ -609,6 +609,13 @@
'plaintexinfo' => {
'converter' => sub{Texinfo::Convert::PlainTexinfo->converter(@_)},
},
+ 'parse' => {
+ },
+ 'structure' => {
+ 'nodes_tree' => 1,
+ 'floats' => 1,
+ 'split' => 1,
+ },
);
my $call_texi2dvi = 0;
@@ -680,7 +687,8 @@
or $error_count > get_conf('ERROR_LIMIT')));
}
-sub handle_errors($$$) {
+sub handle_errors($$$)
+{
my $self = shift;
my $error_count = shift;
my $opened_files = shift;
@@ -1151,7 +1159,7 @@
my $parser = Texinfo::Parser::parser($parser_options);
my $tree = $parser->parse_texi_file($input_file_name);
- if (!defined($tree)) {
+ if (!defined($tree) or $format eq 'parse') {
handle_errors($parser, $error_count, address@hidden);
next;
}
@@ -1258,6 +1266,10 @@
}
$error_count = handle_errors($parser, $error_count, address@hidden);
+ if ($format eq 'structure') {
+ next;
+ }
+
if ($file_number != 0) {
delete $cmdline_options->{'OUTFILE'} if
exists($cmdline_options->{'OUTFILE'});
delete $cmdline_options->{'OUT'} if exists($cmdline_options->{'OUT'});
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5213] * tp/texi2any.pl, doc/texinfo.txi ( Customization Variables and Options):,
Patrice Dumas <=