[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7506] new parser object to parse TOP_NODE_UP
From: |
gavinsmith0123 |
Subject: |
[7506] new parser object to parse TOP_NODE_UP |
Date: |
Sun, 13 Nov 2016 16:09:00 +0000 (UTC) |
Revision: 7506
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7506
Author: gavin
Date: 2016-11-13 16:08:59 +0000 (Sun, 13 Nov 2016)
Log Message:
-----------
new parser object to parse TOP_NODE_UP
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Parser.pm
trunk/tp/Texinfo/Structuring.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-11-12 23:24:20 UTC (rev 7505)
+++ trunk/ChangeLog 2016-11-13 16:08:59 UTC (rev 7506)
@@ -1,3 +1,13 @@
+2016-11-13 Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Parser.pm (_abort_empty_line): Include element type
+ in "ABORT EMPTY" debugging message.
+ (_parse_node_manual): Update comment.
+ (_parse_texi): Remove unnecessary deletion of 'normalized'
+ value.
+ * tp/Texinfo/Structuring.pm (nodes_tree): Create a new parser
+ object to parse the "TOP_NODE_UP" string.
+
2016-11-12 Gavin Smith <address@hidden>
* doc/texinfo.texi (@example): Add missing ) after @pxref.
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2016-11-12 23:24:20 UTC (rev 7505)
+++ trunk/tp/Texinfo/Parser.pm 2016-11-13 16:08:59 UTC (rev 7506)
@@ -2178,7 +2178,11 @@
or $current->{'contents'}->[-1]->{'type'} eq
'empty_line_after_command'
or $current->{'contents'}->[-1]->{'type'} eq
'empty_spaces_before_argument'
or $current->{'contents'}->[-1]->{'type'} eq
'empty_spaces_after_close_brace')) {
- print STDERR "ABORT EMPTY additional text |$additional_text|, current
|$current->{'contents'}->[-1]->{'text'}|\n" if ($self->{'DEBUG'});
+ print STDERR "ABORT EMPTY "
+ .$current->{'contents'}->[-1]->{'type'}
+ ." additional text |$additional_text|,"
+ ." current |$current->{'contents'}->[-1]->{'text'}|\n"
+ if ($self->{'DEBUG'});
$current->{'contents'}->[-1]->{'text'} .= $additional_text;
# remove empty 'empty*before'.
if ($current->{'contents'}->[-1]->{'text'} eq '') {
@@ -2270,13 +2274,11 @@
}
# $NODE->{'contents'} is the Texinfo fo the specification of a node.
-# Returned object is a hash with three fields:
+# Returned object is a hash with two fields:
#
# manual_content - Texinfo tree for a manual name extracted from the
# node specification.
# node_content - Texinfo tree for the node name on its own
-# normalized - a string with the node name after HTML node name
-# normalization is applied
#
# retrieve a leading manual name in parentheses, if there is one.
sub _parse_node_manual($)
@@ -5140,8 +5142,6 @@
and !defined($args[3]) and !defined($args[4])
and !$parsed_ref_node->{'manual_content'}) {
push @{$self->{'internal_references'}}, $ref;
- } else {
- delete $parsed_ref_node->{'normalized'};
}
$ref->{'extra'}->{'node_argument'} = $parsed_ref_node
}
Modified: trunk/tp/Texinfo/Structuring.pm
===================================================================
--- trunk/tp/Texinfo/Structuring.pm 2016-11-12 23:24:20 UTC (rev 7505)
+++ trunk/tp/Texinfo/Structuring.pm 2016-11-13 16:08:59 UTC (rev 7506)
@@ -396,8 +396,9 @@
foreach my $node (@{$self->{'nodes'}}) {
if ($node->{'extra'}->{'normalized'} eq 'Top') {
$top_node = $node;
- my $top_node_up_content_tree = Texinfo::Parser::parse_texi_line($self,
- $self->{'TOP_NODE_UP'});
+ my $parser = Texinfo::Parser::simple_parser ($self->{'conf'});
+ my $top_node_up_content_tree
+ = $parser->parse_texi_line($self->{'TOP_NODE_UP'});
$top_node_up
= {'type' => 'top_node_up',
'extra' => Texinfo::Common::parse_node_manual(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7506] new parser object to parse TOP_NODE_UP,
gavinsmith0123 <=