[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6855] parsetexi update
From: |
Gavin D. Smith |
Subject: |
[6855] parsetexi update |
Date: |
Sun, 13 Dec 2015 21:31:21 +0000 |
Revision: 6855
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6855
Author: gavin
Date: 2015-12-13 21:31:20 +0000 (Sun, 13 Dec 2015)
Log Message:
-----------
parsetexi update
Modified Paths:
--------------
trunk/parsetexi/Parsetexi/lib/Parsetexi.pm
trunk/parsetexi/convert.c
trunk/parsetexi/handle_commands.c
trunk/parsetexi/parser.c
Modified: trunk/parsetexi/Parsetexi/lib/Parsetexi.pm
===================================================================
--- trunk/parsetexi/Parsetexi/lib/Parsetexi.pm 2015-12-13 12:02:00 UTC (rev
6854)
+++ trunk/parsetexi/Parsetexi/lib/Parsetexi.pm 2015-12-13 21:31:20 UTC (rev
6855)
@@ -450,12 +450,17 @@
my $tree = build_texinfo_tree ();
my $INDEX_NAMES = build_index_data ();
$self->{'index_names'} = $INDEX_NAMES;
+
for my $index (keys %$INDEX_NAMES) {
if ($INDEX_NAMES->{$index}->{'merged_in'}) {
$self->{'merged_indices'}-> {$index}
= $INDEX_NAMES->{$index}->{'merged_in'};
}
}
+
+ my $LABELS = build_label_list ();
+ $self->{'labels'} = $LABELS;
+
_get_errors ($self);
_add_parents ($tree);
_complete_node_list ($self, $tree);
Modified: trunk/parsetexi/convert.c
===================================================================
--- trunk/parsetexi/convert.c 2015-12-13 12:02:00 UTC (rev 6854)
+++ trunk/parsetexi/convert.c 2015-12-13 21:31:20 UTC (rev 6855)
@@ -106,8 +106,11 @@
}
return;
}
- else /* unicode_character_brace_no_arg_commands line 538 of Unicode.pm */
+ else
{
+ /* unicode_character_brace_no_arg_commands line 538 of Unicode.pm */
+ /* text_brace_no_arg_commands line 73 of Text.pm */
+ /* Unicode.pm values have priority. */
int not_processed = 0;
/* TODO: There are more commands there than are listed in
"(texinfo)HTML Xref Command Expansion", like @guillemetleft. */
@@ -233,6 +236,14 @@
ADD("_203a"); break;
case CM_click:
ADD("_2192"); break;
+ case CM_TeX:
+ ADD("TeX"); break;
+ case CM_LaTeX:
+ ADD("LaTeX"); break;
+ case CM_tie:
+ ADD(" "); break;
+ case CM_error:
+ ADD("error-->"); break;
default:
not_processed = 1;
}
Modified: trunk/parsetexi/handle_commands.c
===================================================================
--- trunk/parsetexi/handle_commands.c 2015-12-13 12:02:00 UTC (rev 6854)
+++ trunk/parsetexi/handle_commands.c 2015-12-13 21:31:20 UTC (rev 6855)
@@ -434,8 +434,7 @@
arg = new_element (ET_misc_line_arg);
add_to_element_args (current, arg);
- /* 4584 - node */
- if (cmd == CM_node)
+ if (cmd == CM_node) // 4584
{
/* At most three comma-separated arguments to @node. This
is the only (non-block) line command taking comma-separated
@@ -443,9 +442,43 @@
those of some block line commands and brace commands. */
counter_push (&count_remaining_args, current, 3);
}
- /* 4586 - author */
- /* 4612 - dircategory */
- if (cmd == CM_dircategory && current_node)
+ else if (cmd == CM_author)
+ {
+ ELEMENT *parent = current;
+ int found = 0;
+ while (parent->parent)
+ {
+ parent = parent->parent;
+ if (parent->type == ET_brace_command_context)
+ break;
+ if (parent->cmd == CM_titlepage)
+ {
+ // TODO 4595 global author
+ add_extra_key_element (current, "titlepage", parent);
+ found = 1; break;
+ }
+ else if (parent->cmd == CM_quotation
+ || parent->cmd == CM_smallquotation)
+ {
+ KEY_PAIR *k; ELEMENT *e;
+ k = lookup_extra_key (parent, "authors");
+ if (k)
+ e = k->value;
+ else
+ {
+ e = new_element (ET_NONE);
+ add_extra_key_contents (parent, "authors", e);
+ }
+ add_to_contents_as_array (e, current);
+ add_extra_key_element (current, "quotation", parent);
+ found = 1; break;
+ }
+ }
+ if (!found)
+ line_warn ("@author not meaningful outside "
+ "address@hidden' and address@hidden' environments");
+ }
+ else if (cmd == CM_dircategory && current_node)
line_warn ("@dircategory after first node");
current = last_args_child (current); /* arg */
@@ -493,6 +526,10 @@
case CM_unnumberedsubsubsec: level = 4; break;
case CM_subsubheading: level = 4; break;
case CM_appendixsubsubsec: level = 4; break;
+ case CM_part: level = 0; break;
+ case CM_appendixsection: level = 2; break;
+ case CM_majorheading: level = 1; break;
+ case CM_centerchap: level = 1; break;
default: level = -1; break;
}
return level;
@@ -688,6 +725,7 @@
|| (command_data(e->cmd).flags & CF_accent)
|| (command_data(e->cmd).flags & CF_brace
&& (command_data(e->cmd).data > 1
+ || command_data(e->cmd).data == BRACE_style
|| command_data(e->cmd).data == BRACE_context)))
{
e->line_nr = line_nr;
Modified: trunk/parsetexi/parser.c
===================================================================
--- trunk/parsetexi/parser.c 2015-12-13 12:02:00 UTC (rev 6854)
+++ trunk/parsetexi/parser.c 2015-12-13 21:31:20 UTC (rev 6855)
@@ -1183,7 +1183,6 @@
nobrace->cmd = cmd;
add_to_element_contents (current, nobrace);
- // @\
if (cmd == CM_BACKSLASH && current_context () != ct_math)
{
line_warn ("@\\ should only appear in math context");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6855] parsetexi update,
Gavin D. Smith <=