texinfo-commits
[Top][All Lists]
Advanced

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

texinfo doc/texinfo.txi tp/Texinfo/Common.pm tp...


From: Patrice Dumas
Subject: texinfo doc/texinfo.txi tp/Texinfo/Common.pm tp...
Date: Thu, 22 Dec 2011 10:54:42 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/12/22 10:54:42

Modified files:
        doc            : texinfo.txi 
        tp/Texinfo     : Common.pm Parser.pm 
        tp/Texinfo/Convert: HTML.pm Plaintext.pm Text.pm 
        tp/t           : 02coverage.t 57invalid_nestings.t 
        util           : texinfo.dtd 
Added files:
        tp/t/results/coverage: test_errormsg.pl 
        tp/t/results/invalid_nestings: in_errormsg.pl 

Log message:
        Implement @errormsg, following Serguey suggestions and (although mostly
        rewritten) patch.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/doc/texinfo.txi?cvsroot=texinfo&r1=1.399&r2=1.400
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.105&r2=1.106
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.342&r2=1.343
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.216&r2=1.217
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.194&r2=1.195
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Text.pm?cvsroot=texinfo&r1=1.85&r2=1.86
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/02coverage.t?cvsroot=texinfo&r1=1.62&r2=1.63
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/57invalid_nestings.t?cvsroot=texinfo&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/test_errormsg.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/in_errormsg.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/util/texinfo.dtd?cvsroot=texinfo&r1=1.24&r2=1.25

Patches:
Index: doc/texinfo.txi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.txi,v
retrieving revision 1.399
retrieving revision 1.400
diff -u -b -r1.399 -r1.400
--- doc/texinfo.txi     4 Dec 2011 02:55:19 -0000       1.399
+++ doc/texinfo.txi     22 Dec 2011 10:54:40 -0000      1.400
@@ -1,5 +1,5 @@
 \input texinfo.tex    @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.399 2011/12/04 02:55:19 pertusus Exp $
address@hidden $Id: texinfo.txi,v 1.400 2011/12/22 10:54:40 pertusus Exp $
 @c Ordinarily, Texinfo files have the extension .texi.  But texinfo.texi
 @c clashes with texinfo.tex on 8.3 filesystems, so we use texinfo.txi.
 
@@ -21208,7 +21208,7 @@
 (@url{http://www.gnu.org/software/rcs}) version control systems, which
 expand it into a string such as:
 @example
-$Id: texinfo.txi,v 1.399 2011/12/04 02:55:19 pertusus Exp $
+$Id: texinfo.txi,v 1.400 2011/12/22 10:54:40 pertusus Exp $
 @end example
 (This is useful in all sources that use version control, not just manuals.)
 You may wish to include the @samp{$Id:} comment in the @code{@@copying}
@@ -21279,7 +21279,7 @@
 
 @verbatim
 \input texinfo   @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.399 2011/12/04 02:55:19 pertusus Exp $
address@hidden $Id: texinfo.txi,v 1.400 2011/12/22 10:54:40 pertusus Exp $
 @comment %**start of header
 @setfilename sample.info
 @include version.texi
@@ -22654,7 +22654,7 @@
 @end example
 
 The @samp{(Indirect)} line is the next line after @samp{Tag Table:}
-in the case of split output only.  In this 
+in the case of split output only.
 
 Each following line defines an identifier as either an anchor or a
 node, as specific.  It is an error to define the same identifier both

Index: tp/Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- tp/Texinfo/Common.pm        21 Dec 2011 00:05:56 -0000      1.105
+++ tp/Texinfo/Common.pm        22 Dec 2011 10:54:41 -0000      1.106
@@ -423,7 +423,7 @@
 
 foreach my $one_arg_command (
   'ctrl','dmn', 'w', 'key',
-  'titlefont','hyphenation','anchor') {
+  'titlefont','hyphenation','anchor','errormsg') {
   $brace_commands{$one_arg_command} = 1;
 }
 

Index: tp/Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.342
retrieving revision 1.343
diff -u -b -r1.342 -r1.343
--- tp/Texinfo/Parser.pm        12 Dec 2011 23:52:11 -0000      1.342
+++ tp/Texinfo/Parser.pm        22 Dec 2011 10:54:41 -0000      1.343
@@ -331,7 +331,7 @@
 }
 
 foreach my $no_paragraph_command ('titlefont', 'caption', 'shortcaption', 
-          'image', '*', 'hyphenation', 'anchor') {
+          'image', '*', 'hyphenation', 'anchor', 'errormsg') {
   $default_no_paragraph_commands{$no_paragraph_command} = 1;
 }
 
@@ -422,7 +422,7 @@
 foreach my $command ('titlefont', 'anchor', 'xref','ref','pxref', 
                      'inforef', 'shortcaption', 'math', 'indicateurl',
                      'email', 'uref', 'url', 'image', 'abbr', 'acronym', 
-                     'dmn', 'ctrl') {
+                     'dmn', 'ctrl', 'errormsg') {
   $simple_text_commands{$command} = 1;
 }
 
@@ -4537,6 +4537,11 @@
                     = $explained->{'extra'}->{'brace_command_contents'}->[1];
                 }
               }
+            } elsif ($current->{'parent'}->{'cmdname'} eq 'errormsg') {
+              my $error_message_text 
+               = Texinfo::Convert::Text::convert($current,
+                          {Texinfo::Common::_convert_text_options($self)});
+              $self->line_error($error_message_text, $line_nr);
             } elsif 
(_command_with_command_as_argument($current->{'parent'}->{'parent'})
                  and scalar(@{$current->{'contents'}}) == 0) {
                print STDERR "FOR PARENT 
address@hidden>{'parent'}->{'parent'}->{'parent'}->{'cmdname'} 
command_as_argument braces $current->{'cmdname'}\n" if ($self->{'DEBUG'});

Index: tp/Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -b -r1.216 -r1.217
--- tp/Texinfo/Convert/HTML.pm  1 Dec 2011 17:50:03 -0000       1.216
+++ tp/Texinfo/Convert/HTML.pm  22 Dec 2011 10:54:41 -0000      1.217
@@ -7233,7 +7233,8 @@
       }
       return $result;
     } else {
-      print STDERR "BUG: unknown command `$command_name'\n";
+      print STDERR "Unknown command `$command_name'\n"
+       if ($self->get_conf('VERBOSE') or $self->get_conf('DEBUG'));
       return '';
     }
     if ($root_commands{$command_name}) {

Index: tp/Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -b -r1.194 -r1.195
--- tp/Texinfo/Convert/Plaintext.pm     6 Dec 2011 18:50:27 -0000       1.194
+++ tp/Texinfo/Convert/Plaintext.pm     22 Dec 2011 10:54:41 -0000      1.195
@@ -1642,8 +1642,8 @@
     } elsif ($root->{'args'} and $root->{'args'}->[0] 
              and $root->{'args'}->[0]->{'type'}
              and $root->{'args'}->[0]->{'type'} eq 'brace_command_arg') {
-      warn "Unhandled command with braces $root->{'cmdname'}\n";
-      $result .= "!!!!! Unhandled command with braces $root->{'cmdname'} 
!!!!!\n";
+      print STDERR "Unknown command with braces `$root->{'cmdname'}'\n"
+       if ($self->get_conf('VERBOSE') or $self->get_conf('DEBUG'));
     # block commands
     } elsif (exists($block_commands{$root->{'cmdname'}})) {
       # remark:

Index: tp/Texinfo/Convert/Text.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Text.pm,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -b -r1.85 -r1.86
--- tp/Texinfo/Convert/Text.pm  30 Nov 2011 00:11:16 -0000      1.85
+++ tp/Texinfo/Convert/Text.pm  22 Dec 2011 10:54:41 -0000      1.86
@@ -58,7 +58,7 @@
 # when they have no brace_command_arg, see below.
 my %ignored_brace_commands;
 foreach my $ignored_brace_command ('xref','ref','pxref','inforef','anchor',
-   'footnote', 'shortcaption', 'caption', 'hyphenation') {
+   'footnote', 'shortcaption', 'caption', 'hyphenation', 'errormsg') {
   $ignored_brace_commands{$ignored_brace_command} = 1;
 }
 

Index: tp/t/02coverage.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/02coverage.t,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- tp/t/02coverage.t   16 Sep 2011 22:23:16 -0000      1.62
+++ tp/t/02coverage.t   22 Dec 2011 10:54:41 -0000      1.63
@@ -516,7 +516,11 @@
 ['setfilename_in_paragraph',
 'Some text
 @setfilename filename.info
-']
+'],
+['test_errormsg',
+'Some text
address@hidden @~e @code{code}}
+'],
 );
 
 my @test_invalid = (

Index: tp/t/57invalid_nestings.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/57invalid_nestings.t,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- tp/t/57invalid_nestings.t   22 Nov 2011 00:34:58 -0000      1.19
+++ tp/t/57invalid_nestings.t   22 Dec 2011 10:54:41 -0000      1.20
@@ -427,7 +427,17 @@
 @anchor{TOP @ref{Top}}'],
 ['ref_in_ref',
 '@node Top
address@hidden@ref{Top}}']
address@hidden@ref{Top}}'],
+['in_errormsg',
+'
address@hidden ref}
+Text. @address@hidden anchor} @ref{in ref}}
+
address@hidden
address@hidden @asis
address@hidden item
address@hidden table
+}'],
 );
 
 my @formatted_cases = (

Index: util/texinfo.dtd
===================================================================
RCS file: /sources/texinfo/texinfo/util/texinfo.dtd,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- util/texinfo.dtd    2 Nov 2011 12:13:58 -0000       1.24
+++ util/texinfo.dtd    22 Dec 2011 10:54:42 -0000      1.25
@@ -1,4 +1,4 @@
-<!-- $Id: texinfo.dtd,v 1.24 2011/11/02 12:13:58 pertusus Exp $
+<!-- $Id: texinfo.dtd,v 1.25 2011/12/22 10:54:42 pertusus Exp $
   Document Type Definition for Texinfo XML output (the '-'-xml option).
 
   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
@@ -66,7 +66,7 @@
 <!ENTITY % raw.cmds "html | tex | docbook | macro | rmacro | ignore">
 
 <!-- Commands that appear everywhere, both with block and in paragraphs -->
-<!ENTITY % ubiquitous.line.cmds "sp | anchor | indent | noindent | %raw.cmds; 
+<!ENTITY % ubiquitous.cmds "sp | anchor | indent | noindent | %raw.cmds; 
                  | %option.cmds;
                  | %indexentry.cmds; | refill | quote-arg | allow-recursion">
 
@@ -80,7 +80,7 @@
                   | table | vtable | ftable | multitable | definition 
                   | image
                   | %def.cmds; 
-                  | %ubiquitous.line.cmds;
+                  | %ubiquitous.cmds;
                   | verbatim | verbatiminclude | insertcopying | page | need
                   | vskip
                   | listoffloats">
@@ -160,7 +160,7 @@
           | %Inline.footnote; | image">
 <!-- in paragraphs -->
 <!ENTITY % Inline.phrase
-           "%Inline.line; | %ubiquitous.line.cmds;">
+           "%Inline.line; | %ubiquitous.cmds;">
 
 
 <!-- ELEMENTS -->
@@ -669,6 +669,7 @@
 <!ATTLIST anchor
           name CDATA #IMPLIED>
 
+<!ELEMENT errormsg (#PCDATA | %Inline.phrase;)*>
 
 <!ENTITY % xref.args "xrefnodename, xrefinfoname?, xrefprinteddesc?,
                 xrefinfofile?, xrefprintedname?">

Index: tp/t/results/coverage/test_errormsg.pl
===================================================================
RCS file: tp/t/results/coverage/test_errormsg.pl
diff -N tp/t/results/coverage/test_errormsg.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tp/t/results/coverage/test_errormsg.pl      22 Dec 2011 10:54:41 -0000      
1.1
@@ -0,0 +1,159 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
+   %result_indices %result_sectioning %result_nodes %result_menus
+   %result_floats %result_converted %result_converted_errors 
+   %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'test_errormsg'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'Some text
+'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'Text '
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'e'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'following_arg'
+                    }
+                  ],
+                  'cmdname' => '~',
+                  'parent' => {}
+                },
+                {
+                  'parent' => {},
+                  'text' => ' '
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'code'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'code',
+                  'contents' => [],
+                  'line_nr' => {
+                    'file_name' => '',
+                    'line_nr' => 2,
+                    'macro' => ''
+                  },
+                  'parent' => {}
+                }
+              ],
+              'parent' => {},
+              'type' => 'brace_command_arg'
+            }
+          ],
+          'cmdname' => 'errormsg',
+          'contents' => [],
+          'extra' => {
+            'brace_command_contents' => [
+              [
+                {},
+                {},
+                {},
+                {}
+              ]
+            ]
+          },
+          'line_nr' => {},
+          'parent' => {}
+        },
+        {
+          'parent' => {},
+          'text' => '
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[0]{'parent'} = 
$result_trees{'test_errormsg'}{'contents'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'args'}[0]{'parent'}
 = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'parent'}
 = $result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'}
 = $result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][1]
 = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][2]
 = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][3]
 = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'line_nr'} = 
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'line_nr'};
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'parent'} = 
$result_trees{'test_errormsg'}{'contents'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[2]{'parent'} = 
$result_trees{'test_errormsg'}{'contents'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'parent'} = 
$result_trees{'test_errormsg'};
+
+$result_texis{'test_errormsg'} = 'Some text
address@hidden @~e @code{code}}
+';
+
+
+$result_texts{'test_errormsg'} = 'Some text
+
+';
+
+$result_errors{'test_errormsg'} = [
+  {
+    'error_line' => ':2: Text e~ code
+',
+    'file_name' => '',
+    'line_nr' => 2,
+    'macro' => '',
+    'text' => 'Text e~ code',
+    'type' => 'error'
+  }
+];
+
+
+
+$result_converted{'plaintext'}->{'test_errormsg'} = 'Some text
+';
+
+
+$result_converted{'html_text'}->{'test_errormsg'} = '<p>Some text
+
+</p>';
+
+
+$result_converted{'xml'}->{'test_errormsg'} = '<para>Some text
+<errormsg>Text <accent type="tilde">e</accent> <code>code</code></errormsg>
+</para>';
+
+
+$result_converted{'docbook'}->{'test_errormsg'} = '<para>Some text
+
+</para>';
+
+1;

Index: tp/t/results/invalid_nestings/in_errormsg.pl
===================================================================
RCS file: tp/t/results/invalid_nestings/in_errormsg.pl
diff -N tp/t/results/invalid_nestings/in_errormsg.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tp/t/results/invalid_nestings/in_errormsg.pl        22 Dec 2011 10:54:41 
-0000      1.1
@@ -0,0 +1,466 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
+   %result_indices %result_sectioning %result_nodes %result_menus
+   %result_floats %result_converted %result_converted_errors 
+   %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'in_errormsg'} = {
+  'contents' => [
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'in ref'
+            }
+          ],
+          'parent' => {},
+          'type' => 'brace_command_arg'
+        }
+      ],
+      'cmdname' => 'anchor',
+      'contents' => [],
+      'extra' => {
+        'brace_command_contents' => [
+          [
+            {}
+          ]
+        ],
+        'node_content' => [
+          {}
+        ],
+        'normalized' => 'in-ref'
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 2,
+        'macro' => ''
+      },
+      'parent' => {}
+    },
+    {
+      'text' => '
+',
+      'type' => 'empty_spaces_after_close_brace'
+    },
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'Text. '
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'in anchor'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'anchor',
+                  'contents' => [],
+                  'extra' => {
+                    'brace_command_contents' => [
+                      [
+                        {}
+                      ]
+                    ],
+                    'invalid_nesting' => 1,
+                    'node_content' => [
+                      {}
+                    ],
+                    'normalized' => 'in-anchor'
+                  },
+                  'line_nr' => {
+                    'file_name' => '',
+                    'line_nr' => 3,
+                    'macro' => ''
+                  },
+                  'parent' => {}
+                },
+                {
+                  'text' => ' ',
+                  'type' => 'empty_spaces_after_close_brace'
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'in ref'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'ref',
+                  'contents' => [],
+                  'extra' => {
+                    'brace_command_contents' => [
+                      [
+                        {}
+                      ]
+                    ],
+                    'invalid_nesting' => 1,
+                    'label' => {},
+                    'node_argument' => {
+                      'node_content' => [
+                        {}
+                      ],
+                      'normalized' => 'in-ref'
+                    }
+                  },
+                  'line_nr' => {},
+                  'parent' => {}
+                }
+              ],
+              'parent' => {},
+              'type' => 'brace_command_arg'
+            }
+          ],
+          'cmdname' => 'errormsg',
+          'contents' => [],
+          'extra' => {
+            'brace_command_contents' => [
+              [
+                {},
+                {},
+                {}
+              ]
+            ]
+          },
+          'line_nr' => {},
+          'parent' => {}
+        },
+        {
+          'parent' => {},
+          'text' => '
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => '
+',
+              'type' => 'empty_spaces_before_argument'
+            }
+          ],
+          'parent' => {},
+          'type' => 'brace_command_arg'
+        }
+      ],
+      'cmdname' => 'errormsg',
+      'contents' => [],
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 5,
+        'macro' => ''
+      },
+      'parent' => {}
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'extra' => {
+                'command' => {}
+              },
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'cmdname' => 'asis',
+              'parent' => {},
+              'type' => 'command_as_argument'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'space_at_end_block_command'
+            }
+          ],
+          'parent' => {},
+          'type' => 'block_line_arg'
+        }
+      ],
+      'cmdname' => 'table',
+      'contents' => [
+        {
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'extra' => {
+                            'command' => {}
+                          },
+                          'parent' => {},
+                          'text' => ' ',
+                          'type' => 'empty_spaces_after_command'
+                        },
+                        {
+                          'parent' => {},
+                          'text' => 'item'
+                        },
+                        {
+                          'parent' => {},
+                          'text' => '
+',
+                          'type' => 'spaces_at_end'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'misc_line_arg'
+                    }
+                  ],
+                  'cmdname' => 'item',
+                  'extra' => {
+                    'misc_content' => [
+                      {}
+                    ]
+                  },
+                  'line_nr' => {
+                    'file_name' => '',
+                    'line_nr' => 7,
+                    'macro' => ''
+                  },
+                  'parent' => {}
+                }
+              ],
+              'parent' => {},
+              'type' => 'table_term'
+            }
+          ],
+          'parent' => {},
+          'type' => 'table_entry'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'extra' => {
+                    'command' => {}
+                  },
+                  'parent' => {},
+                  'text' => ' ',
+                  'type' => 'empty_spaces_after_command'
+                },
+                {
+                  'parent' => {},
+                  'text' => 'table'
+                },
+                {
+                  'parent' => {},
+                  'text' => '
+',
+                  'type' => 'spaces_at_end'
+                }
+              ],
+              'parent' => {},
+              'type' => 'misc_line_arg'
+            }
+          ],
+          'cmdname' => 'end',
+          'extra' => {
+            'command' => {},
+            'command_argument' => 'table',
+            'text_arg' => 'table'
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 8,
+            'macro' => ''
+          },
+          'parent' => {}
+        }
+      ],
+      'extra' => {
+        'block_command_line_contents' => [
+          [
+            {}
+          ]
+        ],
+        'command_as_argument' => {},
+        'end_command' => {},
+        'invalid_nesting' => 1
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 6,
+        'macro' => ''
+      },
+      'parent' => {}
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'in_errormsg'}{'contents'}[0]{'parent'} = 
$result_trees{'in_errormsg'};
+$result_trees{'in_errormsg'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[1]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[1]{'args'}[0]{'parent'} = 
$result_trees{'in_errormsg'}{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = $result_trees{'in_errormsg'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[1]{'extra'}{'node_content'}[0] = 
$result_trees{'in_errormsg'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[1]{'parent'} = 
$result_trees{'in_errormsg'};
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[0]{'parent'} = 
$result_trees{'in_errormsg'}{'contents'}[3];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'}
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'node_content'}[0]
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'extra'}{'label'}
 = $result_trees{'in_errormsg'}{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'extra'}{'node_argument'}{'node_content'}[0]
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'line_nr'}
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'line_nr'};
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][1]
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][2]
 = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[2];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'line_nr'} = 
$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'line_nr'};
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[1]{'parent'} = 
$result_trees{'in_errormsg'}{'contents'}[3];
+$result_trees{'in_errormsg'}{'contents'}[3]{'contents'}[2]{'parent'} = 
$result_trees{'in_errormsg'}{'contents'}[3];
+$result_trees{'in_errormsg'}{'contents'}[3]{'parent'} = 
$result_trees{'in_errormsg'};
+$result_trees{'in_errormsg'}{'contents'}[4]{'parent'} = 
$result_trees{'in_errormsg'};
+$result_trees{'in_errormsg'}{'contents'}[5]{'args'}[0]{'parent'} = 
$result_trees{'in_errormsg'}{'contents'}[5];
+$result_trees{'in_errormsg'}{'contents'}[5]{'parent'} = 
$result_trees{'in_errormsg'};
+$result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'in_errormsg'}{'contents'}[6];
+$result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0]{'parent'} = 
$result_trees{'in_errormsg'}{'contents'}[6];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = 
$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'parent'}
 = 
$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'misc_content'}[0]
 = 
$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[0]{'parent'} = 
$result_trees{'in_errormsg'}{'contents'}[6];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'args'}[0];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'args'}[0]{'parent'}
 = $result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'extra'}{'command'} 
= $result_trees{'in_errormsg'}{'contents'}[6];
+$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1]{'parent'} = 
$result_trees{'in_errormsg'}{'contents'}[6];
+$result_trees{'in_errormsg'}{'contents'}[6]{'extra'}{'block_command_line_contents'}[0][0]
 = $result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0]{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[6]{'extra'}{'command_as_argument'} = 
$result_trees{'in_errormsg'}{'contents'}[6]{'args'}[0]{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[6]{'extra'}{'end_command'} = 
$result_trees{'in_errormsg'}{'contents'}[6]{'contents'}[1];
+$result_trees{'in_errormsg'}{'contents'}[6]{'parent'} = 
$result_trees{'in_errormsg'};
+
+$result_texis{'in_errormsg'} = '
address@hidden ref}
+Text. @address@hidden anchor} @ref{in ref}}
+
address@hidden
address@hidden @asis
address@hidden item
address@hidden table
+';
+
+
+$result_texts{'in_errormsg'} = '
+Text. 
+
+item
+';
+
+$result_errors{'in_errormsg'} = [
+  {
+    'error_line' => ':3: warning: @anchor should not appear in @errormsg
+',
+    'file_name' => '',
+    'line_nr' => 3,
+    'macro' => '',
+    'text' => '@anchor should not appear in @errormsg',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':3: warning: @ref should not appear in @errormsg
+',
+    'file_name' => '',
+    'line_nr' => 3,
+    'macro' => '',
+    'text' => '@ref should not appear in @errormsg',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':3: 
+',
+    'file_name' => '',
+    'line_nr' => 3,
+    'macro' => '',
+    'text' => '',
+    'type' => 'error'
+  },
+  {
+    'error_line' => ':5: @errormsg missing close brace
+',
+    'file_name' => '',
+    'line_nr' => 5,
+    'macro' => '',
+    'text' => '@errormsg missing close brace',
+    'type' => 'error'
+  },
+  {
+    'error_line' => ':6: warning: @table should not appear in @errormsg
+',
+    'file_name' => '',
+    'line_nr' => 6,
+    'macro' => '',
+    'text' => '@table should not appear in @errormsg',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':9: Misplaced }
+',
+    'file_name' => '',
+    'line_nr' => 9,
+    'macro' => '',
+    'text' => 'Misplaced }',
+    'type' => 'error'
+  }
+];
+
+
+1;



reply via email to

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