texinfo-commits
[Top][All Lists]
Advanced

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

[7516] parsetexi valid nestings


From: gavinsmith0123
Subject: [7516] parsetexi valid nestings
Date: Sat, 19 Nov 2016 17:05:18 +0000 (UTC)

Revision: 7516
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7516
Author:   gavin
Date:     2016-11-19 17:05:18 +0000 (Sat, 19 Nov 2016)
Log Message:
-----------
parsetexi valid nestings

Modified Paths:
--------------
    trunk/tp/parsetexi/parser.c

Modified: trunk/tp/parsetexi/parser.c
===================================================================
--- trunk/tp/parsetexi/parser.c 2016-11-18 07:18:35 UTC (rev 7515)
+++ trunk/tp/parsetexi/parser.c 2016-11-19 17:05:18 UTC (rev 7516)
@@ -1293,8 +1293,16 @@
       if (current->parent)
         {
           /* Check whether outer command can contain cmd.  Commands are
-             classified according to what commands they can contain. */
+             classified according to what commands they can contain:
 
+             accents
+             full text
+             simple text
+             full line
+             full line no refs
+
+           */
+
           int ok = 0; /* Whether nesting is allowed. */
 
           /* Whether command is a "simple text" command.  Use a variable
@@ -1345,20 +1353,10 @@
           else if (outer_flags & CF_block
                    && current->type != ET_block_line_arg)
             ok = 1; // 4247
-          else if (outer == CM_item
-                   || outer == CM_itemx
+          else if ((outer == CM_item
+                   || outer == CM_itemx)
                    && current->type != ET_misc_line_arg)
             ok = 1; // 4252
-          else if (outer == CM_table
-                   || outer == CM_vtable
-                   || outer == CM_ftable)
-            {
-              /* FIXME: This nesting should be OK. */
-              if (cmd_flags & CF_INFOENCLOSE)
-                ;
-              else
-                ok = 1;
-            }
           else if (outer_flags & CF_accent) // 358
             {
               if (cmd_flags & (CF_nobrace | CF_accent))
@@ -1398,8 +1396,10 @@
                    || simple_text_command)
             {
               // "in full text commands".
-              if (cmd_flags & (CF_brace | CF_nobrace)) // 370
+              if (cmd_flags & CF_nobrace) // 370
                 ok = 1;
+              if (cmd_flags & CF_brace && !(cmd_flags & CF_INFOENCLOSE)) // 370
+                ok = 1;
               else if (cmd == CM_c
                        || cmd == CM_comment
                        || cmd == CM_refill




reply via email to

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