[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7162] parsetexi update
From: |
gavinsmith0123 |
Subject: |
[7162] parsetexi update |
Date: |
Thu, 12 May 2016 21:02:43 +0000 (UTC) |
Revision: 7162
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7162
Author: gavin
Date: 2016-05-12 21:02:43 +0000 (Thu, 12 May 2016)
Log Message:
-----------
parsetexi update
Modified Paths:
--------------
trunk/tp/parsetexi/api.c
trunk/tp/parsetexi/commands.h
trunk/tp/parsetexi/end_line.c
trunk/tp/parsetexi/macro.c
Modified: trunk/tp/parsetexi/api.c
===================================================================
--- trunk/tp/parsetexi/api.c 2016-05-12 20:12:42 UTC (rev 7161)
+++ trunk/tp/parsetexi/api.c 2016-05-12 21:02:43 UTC (rev 7162)
@@ -57,7 +57,7 @@
void
parse_file (char *filename)
{
- debug_output = 1;
+ debug_output = 0;
reset_parser ();
parse_texi_file (filename);
}
Modified: trunk/tp/parsetexi/commands.h
===================================================================
--- trunk/tp/parsetexi/commands.h 2016-05-12 20:12:42 UTC (rev 7161)
+++ trunk/tp/parsetexi/commands.h 2016-05-12 21:02:43 UTC (rev 7162)
@@ -55,7 +55,7 @@
#define CF_style 0x0080
/* CF_code_style is set for brace commands only. */
#define CF_code_style 0x0100
-#define CF_regular_font_style 0x0200
+#define CF_INFOENCLOSE 0x0200
#define CF_in_heading 0x0400
#define CF_ref 0x0800
#define CF_ALIAS 0x1000
@@ -84,6 +84,8 @@
as BLOCK_region in data instead.
Candidates for flags:
CF_close_paragraph
+
+ Could combine CF_MACRO, CF_ALIAS, and CF_INFOENCLOSE into 2 bits.
*/
/* Types of misc command (has CF_misc flag). Values for COMMAND.data. */
Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c 2016-05-12 20:12:42 UTC (rev 7161)
+++ trunk/tp/parsetexi/end_line.c 2016-05-12 21:02:43 UTC (rev 7162)
@@ -299,6 +299,10 @@
ADD_ARG(new);
ADD_ARG(existing);
+ existing_cmd = lookup_command (existing);
+ if (!existing_cmd)
+ break; /* TODO: Error message */
+
/* Remember the alias. */
new_cmd = add_texinfo_command (new);
new_cmd &= ~USER_COMMAND_BIT;
@@ -321,6 +325,7 @@
{
/* @definfoenclose phoo,//,\\ */
char *new_command = 0, *start = 0, *end = 0;
+ enum command_id new_cmd;
int len;
new_command = read_command_name (&line);
@@ -329,7 +334,7 @@
line += strspn (line, whitespace_chars);
if (*line != ',')
- goto alias_invalid;
+ goto definfoenclose_invalid;
line++;
line += strspn (line, whitespace_chars);
@@ -339,7 +344,7 @@
line += len;
if (!*line)
- goto alias_invalid; /* Not enough args. */
+ goto definfoenclose_invalid; /* Not enough args. */
line++; /* Past ','. */
line += strspn (line, whitespace_chars);
len = strcspn (line, ",");
@@ -348,9 +353,17 @@
if (*line == ',')
goto definfoenclose_invalid; /* Too many args. */
+ /* Remember it. */
+ new_cmd = add_texinfo_command (new_command);
+ new_cmd &= ~USER_COMMAND_BIT;
+ user_defined_command_data[new_cmd].flags
+ |= (CF_INFOENCLOSE & CF_brace);
+ /* TODO: Remember the data. */
+
ADD_ARG(new_command); free (new_command);
ADD_ARG(start); free (start);
ADD_ARG(end); free (end);
+
break;
definfoenclose_invalid:
line_error ("bad argument to @definfoenclose");
Modified: trunk/tp/parsetexi/macro.c
===================================================================
--- trunk/tp/parsetexi/macro.c 2016-05-12 20:12:42 UTC (rev 7161)
+++ trunk/tp/parsetexi/macro.c 2016-05-12 21:02:43 UTC (rev 7162)
@@ -525,5 +525,8 @@
if (!memcmp (value_list[i].name, name, len) && !value_list[i].name[len])
return value_list[i].value;
}
+
+ if (!strcmp (name, "txicommandconditionals"))
+ return "1";
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7162] parsetexi update,
gavinsmith0123 <=