texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[8376] parsetexi change misc_line_arg to line_arg


From: gavinsmith0123
Subject: [8376] parsetexi change misc_line_arg to line_arg
Date: Mon, 22 Oct 2018 13:20:32 -0400 (EDT)

Revision: 8376
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8376
Author:   gavin
Date:     2018-10-22 13:20:31 -0400 (Mon, 22 Oct 2018)
Log Message:
-----------
parsetexi change misc_line_arg to line_arg

Modified Paths:
--------------
    trunk/tp/Texinfo/XS/parsetexi/Makefile.am
    trunk/tp/Texinfo/XS/parsetexi/api.c
    trunk/tp/Texinfo/XS/parsetexi/close.c
    trunk/tp/Texinfo/XS/parsetexi/element_types.awk
    trunk/tp/Texinfo/XS/parsetexi/element_types.c
    trunk/tp/Texinfo/XS/parsetexi/element_types.h
    trunk/tp/Texinfo/XS/parsetexi/element_types.txt
    trunk/tp/Texinfo/XS/parsetexi/end_line.c
    trunk/tp/Texinfo/XS/parsetexi/handle_commands.c
    trunk/tp/Texinfo/XS/parsetexi/parser.c
    trunk/tp/Texinfo/XS/parsetexi/separator.c

Modified: trunk/tp/Texinfo/XS/parsetexi/Makefile.am
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/Makefile.am   2018-10-22 16:49:26 UTC (rev 
8375)
+++ trunk/tp/Texinfo/XS/parsetexi/Makefile.am   2018-10-22 17:20:31 UTC (rev 
8376)
@@ -101,8 +101,9 @@
 # Notes
 EXTRA_DIST+=debug_perl.txt makeinfo-debug.txt
 
-element_types.c element_types.h: element_types.txt element_types.awk
-       awk -f element_types.awk element_types.txt >element_types.h
+$(srcdir)/element_types.c $(srcdir)/element_types.h: element_types.txt 
element_types.awk
+       awk -v srcdir=$(srcdir) -f $(srcdir)/element_types.awk \
+            $(srcdir)/element_types.txt
 
 $(srcdir)/command_data.c $(srcdir)/command_ids.h: command_data.txt 
command_data.awk
        awk -v srcdir=$(srcdir) -f $(srcdir)/command_data.awk \

Modified: trunk/tp/Texinfo/XS/parsetexi/api.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/api.c 2018-10-22 16:49:26 UTC (rev 8375)
+++ trunk/tp/Texinfo/XS/parsetexi/api.c 2018-10-22 17:20:31 UTC (rev 8376)
@@ -238,7 +238,7 @@
       || e->type == ET_root_line
       || e->type == ET_bracketed
       || e->type == ET_bracketed_def_content
-      || e->type == ET_misc_line_arg
+      || e->type == ET_line_arg
       || e->cmd == CM_image // why image?
       || e->cmd == CM_item && e->parent && e->parent->type == ET_row
       || e->cmd == CM_tab && e->parent && e->parent->type == ET_row

Modified: trunk/tp/Texinfo/XS/parsetexi/close.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/close.c       2018-10-22 16:49:26 UTC (rev 
8375)
+++ trunk/tp/Texinfo/XS/parsetexi/close.c       2018-10-22 17:20:31 UTC (rev 
8376)
@@ -1,5 +1,4 @@
-/* Copyright 2010, 2011, 2012, 2013, 2014, 2015
-   Free Software Foundation, Inc.
+/* Copyright 2010-2018 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -338,7 +337,7 @@
             current = current->parent;
 
           break;
-        case ET_misc_line_arg:
+        case ET_line_arg:
         case ET_block_line_arg:
           c = pop_context ();
           if (c != ct_line && c != ct_def)

Modified: trunk/tp/Texinfo/XS/parsetexi/element_types.awk
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/element_types.awk     2018-10-22 16:49:26 UTC 
(rev 8375)
+++ trunk/tp/Texinfo/XS/parsetexi/element_types.awk     2018-10-22 17:20:31 UTC 
(rev 8376)
@@ -1,4 +1,4 @@
-# Copyright 2014, 2015 Free Software Foundation, Inc.
+# Copyright 2014-2018 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,27 +15,34 @@
 #
 
 BEGIN {
-  print "/* This file automatically generated by element_types.awk */"
-  print "enum element_type {"
-  print "ET_NONE,"
+    if (srcdir == "") {
+        srcdir = "."
+    }
+    ETH = srcdir "/element_types.h"
+    ETC = srcdir "/element_types.c"
+
+    print "/* This file automatically generated by element_types.awk */" > ETH
+    print "enum element_type {"                                          > ETH
+    print "ET_NONE,"                                                     > ETH
 }
 
 !/^$/ && !/^#/ {
-    print "ET_" $1 ","
+    print "ET_" $1 ","                                                > ETH
     array = array "\"" $1 "\",\n"
 }
 
 END {
-  print "};"
-  print
-  print "extern char *element_type_names[];"
-  print "char *element_type_names[] = {" > "element_types.c"
-  print "0," > "element_types.c"
-  print array > "element_types.c"
-  print "};" > "element_types.c"
+    print "};"                                                        > ETH    
 
+    print                                                             > ETH 
+    print "extern char *element_type_names[];"                        > ETH
+
+    print "char *element_type_names[] = {"                            > ETC
+    print "0,"                                                        > ETC    
 
+    print array                                                       > ETC    
 
+    print "};"                                                        > ETC    
 
 }
 
 function output_array (string)
 {
-    print string > "element_types.c"
+    print string > ETC
 }

Modified: trunk/tp/Texinfo/XS/parsetexi/element_types.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/element_types.c       2018-10-22 16:49:26 UTC 
(rev 8375)
+++ trunk/tp/Texinfo/XS/parsetexi/element_types.c       2018-10-22 17:20:31 UTC 
(rev 8376)
@@ -33,7 +33,7 @@
 "brace_command_arg",
 "brace_command_context",
 "block_line_arg",
-"misc_line_arg",
+"line_arg",
 "misc_arg",
 "menu_entry",
 "menu_entry_leading_text",

Modified: trunk/tp/Texinfo/XS/parsetexi/element_types.h
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/element_types.h       2018-10-22 16:49:26 UTC 
(rev 8375)
+++ trunk/tp/Texinfo/XS/parsetexi/element_types.h       2018-10-22 17:20:31 UTC 
(rev 8376)
@@ -34,7 +34,7 @@
 ET_brace_command_arg,
 ET_brace_command_context,
 ET_block_line_arg,
-ET_misc_line_arg,
+ET_line_arg,
 ET_misc_arg,
 ET_menu_entry,
 ET_menu_entry_leading_text,

Modified: trunk/tp/Texinfo/XS/parsetexi/element_types.txt
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/element_types.txt     2018-10-22 16:49:26 UTC 
(rev 8375)
+++ trunk/tp/Texinfo/XS/parsetexi/element_types.txt     2018-10-22 17:20:31 UTC 
(rev 8376)
@@ -1,5 +1,4 @@
-# Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
-# Free Software Foundation, Inc.
+# Copyright 2010-2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Texinfo.
 #
@@ -54,7 +53,7 @@
 brace_command_arg
 brace_command_context
 block_line_arg
-misc_line_arg
+line_arg
 misc_arg
 
 menu_entry

Modified: trunk/tp/Texinfo/XS/parsetexi/end_line.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/end_line.c    2018-10-22 16:49:26 UTC (rev 
8375)
+++ trunk/tp/Texinfo/XS/parsetexi/end_line.c    2018-10-22 17:20:31 UTC (rev 
8376)
@@ -2248,8 +2248,7 @@
 
       current = begin_preformatted (current);
     }
-  /* if it's a misc line arg 3100 */
-  else if (current->type == ET_misc_line_arg)
+  else if (current->type == ET_line_arg)
     {
       current = end_line_misc_line (current);
     }
@@ -2302,8 +2301,8 @@
       else
         {
           while (current->parent
-                 && current->type != ET_block_line_arg
-                 && current->type != ET_misc_line_arg)
+                 && current->type != ET_line_arg
+                 && current->type != ET_block_line_arg)
             {
               current = close_current (current, 0, 0);
             }

Modified: trunk/tp/Texinfo/XS/parsetexi/handle_commands.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/handle_commands.c     2018-10-22 16:49:26 UTC 
(rev 8375)
+++ trunk/tp/Texinfo/XS/parsetexi/handle_commands.c     2018-10-22 17:20:31 UTC 
(rev 8376)
@@ -427,7 +427,7 @@
       if (equivalent_cmd)
         {
           char *arg = 0;
-          ELEMENT *misc_line_args;
+          ELEMENT *line_args;
           ELEMENT *e;
 
           if (cmd == CM_set)
@@ -449,8 +449,8 @@
           misc->cmd = equivalent_cmd;
           misc->line_nr = line_nr;
 
-          misc_line_args = new_element (ET_misc_line_arg);
-          add_to_element_args (misc, misc_line_args);
+          line_args = new_element (ET_line_arg);
+          add_to_element_args (misc, line_args);
           add_extra_misc_args (misc, "misc_args", args);
 
           add_extra_string_dup (misc, "spaces_before_argument", " ");
@@ -457,11 +457,11 @@
 
           e = new_element (ET_NONE);
           text_append (&e->text, arg);
-          add_to_element_contents (misc_line_args, e);
+          add_to_element_contents (line_args, e);
 
           e = new_element (ET_spaces_at_end);
           text_append_n (&e->text, "\n", 1);
-          add_to_element_contents (misc_line_args, e);
+          add_to_element_contents (line_args, e);
 
           add_to_element_contents (current, misc);
         }
@@ -616,7 +616,7 @@
       /* 4576 - change 'current' to its last child.  This is ELEMENT *misc 
          above.  */
       current = last_contents_child (current);
-      arg = new_element (ET_misc_line_arg);
+      arg = new_element (ET_line_arg);
       add_to_element_args (current, arg);
 
       if (cmd == CM_node) // 4584

Modified: trunk/tp/Texinfo/XS/parsetexi/parser.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/parser.c      2018-10-22 16:49:26 UTC (rev 
8375)
+++ trunk/tp/Texinfo/XS/parsetexi/parser.c      2018-10-22 17:20:31 UTC (rev 
8376)
@@ -736,7 +736,7 @@
   text = element_text (last_elt);
   if (!text || !*text
       || (last_elt->type && (!current->type
-                             || current->type != ET_misc_line_arg)))
+                             || current->type != ET_line_arg)))
     return;
 
   text_len = last_elt->text.end;
@@ -1518,7 +1518,7 @@
               simple_text_command = 1;
             }
 
-          if (outer_flags & CF_root && current->type != ET_misc_line_arg)
+          if (outer_flags & CF_root && current->type != ET_line_arg)
             ok = 1; // 4242
           else if (outer_flags & CF_block
                    && current->type != ET_block_line_arg)
@@ -1525,7 +1525,7 @@
             ok = 1; // 4247
           else if ((outer == CM_item
                    || outer == CM_itemx)
-                   && current->type != ET_misc_line_arg)
+                   && current->type != ET_line_arg)
             ok = 1; // 4252
           else if (outer_flags & CF_accent) // 358
             {

Modified: trunk/tp/Texinfo/XS/parsetexi/separator.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/separator.c   2018-10-22 16:49:26 UTC (rev 
8375)
+++ trunk/tp/Texinfo/XS/parsetexi/separator.c   2018-10-22 17:20:31 UTC (rev 
8376)
@@ -771,7 +771,7 @@
     {
       current = handle_comma (current, &line);
     }
-  else if (separator == ',' && current->type == ET_misc_line_arg
+  else if (separator == ',' && current->type == ET_line_arg
            && current->parent->cmd == CM_node) // 5297
     {
       line_warn ("superfluous arguments for node");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]