[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6817] parsetexi update
From: |
Gavin D. Smith |
Subject: |
[6817] parsetexi update |
Date: |
Mon, 30 Nov 2015 14:56:05 +0000 |
Revision: 6817
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6817
Author: gavin
Date: 2015-11-30 14:56:04 +0000 (Mon, 30 Nov 2015)
Log Message:
-----------
parsetexi update
Modified Paths:
--------------
trunk/parsetexi/end_line.c
trunk/parsetexi/indices.c
trunk/parsetexi/macro.c
trunk/parsetexi/parser.c
Modified: trunk/parsetexi/end_line.c
===================================================================
--- trunk/parsetexi/end_line.c 2015-11-30 14:19:17 UTC (rev 6816)
+++ trunk/parsetexi/end_line.c 2015-11-30 14:56:04 UTC (rev 6817)
@@ -1114,14 +1114,20 @@
current = close_commands (current, end_id,
&closed_command, 0); /* 3292 */
if (!closed_command)
- abort (); // 3335
-
- close_command_cleanup (closed_command);
- // 3301 INLINE_INSERTCOPYING
- add_to_element_contents (closed_command, end_elt); // 3321
- // 3324 ET_menu_comment
- if (close_preformatted_command (end_id))
- current = begin_preformatted (current);
+ {
+ /* shouldn't get here, but got here
+ on 2015.11.30 for t/16raw.t */
+ //abort (); // 3335
+ }
+ else
+ {
+ close_command_cleanup (closed_command);
+ // 3301 INLINE_INSERTCOPYING
+ add_to_element_contents (closed_command, end_elt); // 3321
+ // 3324 ET_menu_comment
+ if (close_preformatted_command (end_id))
+ current = begin_preformatted (current);
+ }
}
else
{
@@ -1332,7 +1338,7 @@
else if (name->contents.number == 1)
{
char *t = name->contents.list[0]->text.text;
- if (t[strspn (t, whitespace_chars)] != '\0')
+ if (t && t[strspn (t, whitespace_chars)] != '\0')
index_entry = name;
}
}
Modified: trunk/parsetexi/indices.c
===================================================================
--- trunk/parsetexi/indices.c 2015-11-30 14:19:17 UTC (rev 6816)
+++ trunk/parsetexi/indices.c 2015-11-30 14:56:04 UTC (rev 6817)
@@ -101,7 +101,7 @@
{
int i;
- for (i = 0; i < num_index_commands; i++)
+ for (i = 0; i < number_of_indices; i++)
{
if (!strcmp (index_names[i]->name, name))
return index_names[i];
Modified: trunk/parsetexi/macro.c
===================================================================
--- trunk/parsetexi/macro.c 2015-11-30 14:19:17 UTC (rev 6816)
+++ trunk/parsetexi/macro.c 2015-11-30 14:56:04 UTC (rev 6817)
@@ -61,9 +61,9 @@
}
// 1088
-/* COMMAND_ID will be either CM_macro or CM_rmacro. Read the line defining a
- macro's name and the arguments it takes, and return this information in a
- new ELEMENT. */
+/* CMD will be either CM_macro or CM_rmacro. Read the line defining a macro's
+ name and the arguments it takes, and return this information in a new
+ ELEMENT. */
ELEMENT *
parse_macro_command_line (enum command_id cmd, char **line_inout,
ELEMENT *parent)
@@ -80,7 +80,9 @@
name = read_command_name (&line);
if (!name)
{
- abort (); //error
+ line_errorf ("@%s requires a name", command_name (cmd));
+ add_extra_string (macro, "invalid_syntax", "1");
+ return macro;
}
macro_name = new_element (ET_macro_name);
Modified: trunk/parsetexi/parser.c
===================================================================
--- trunk/parsetexi/parser.c 2015-11-30 14:19:17 UTC (rev 6816)
+++ trunk/parsetexi/parser.c 2015-11-30 14:56:04 UTC (rev 6817)
@@ -661,10 +661,12 @@
|| (current->parent->cmd != CM_macro
&& current->parent->cmd != CM_rmacro)))
{
- char *name;
-
- name = element_text (args_child_by_index (current, 0));
- new_macro (name, current); // 3808
+ if (!lookup_extra_key (current, "invalid_syntax"))
+ {
+ char *name;
+ name = element_text (args_child_by_index (current, 0));
+ new_macro (name, current); // 3808
+ }
}
current = current->parent;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6817] parsetexi update,
Gavin D. Smith <=