[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp texi2any.pl Texinfo/Parser.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp texi2any.pl Texinfo/Parser.pm |
Date: |
Thu, 26 Apr 2012 17:36:25 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 12/04/26 17:36:25
Modified files:
tp : texi2any.pl
tp/Texinfo : Parser.pm
Log message:
Print the tree only if DEBUG >= 10 and print it each line if >= 100.
Karl idea.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.128&r2=1.129
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.376&r2=1.377
Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -b -r1.128 -r1.129
--- texi2any.pl 23 Apr 2012 20:36:22 -0000 1.128
+++ texi2any.pl 26 Apr 2012 17:36:25 -0000 1.129
@@ -1020,7 +1020,8 @@
next;
}
- if (defined(get_conf('DUMP_TREE'))) {
+ if (defined(get_conf('DUMP_TREE'))
+ or (get_conf('DEBUG') and get_conf('DEBUG') >= 10)) {
# this is very wrong, but a way to avoid a spurious warning.
no warnings 'once';
local $Data::Dumper::Purity = 1;
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.376
retrieving revision 1.377
diff -u -b -r1.376 -r1.377
--- Texinfo/Parser.pm 21 Apr 2012 17:44:48 -0000 1.376
+++ Texinfo/Parser.pm 26 Apr 2012 17:36:25 -0000 1.377
@@ -101,7 +101,8 @@
# initialized to values given by the user.
our %default_configuration = (
'TEST' => 0,
- 'DEBUG' => 0,
+ 'DEBUG' => 0, # if >= 10, tree is printed in texi2any.pl after parsing.
+ # If >= 100 tree is printed every line.
'SHOW_MENU' => 1, # if false no menu error related.
'gettext' => sub {return $_[0];},
'expanded_formats' => [],
@@ -3506,9 +3507,11 @@
if ($self->{'DEBUG'}) {
$current->{'HERE !!!!'} = 1; # marks where we are in the tree
+ if ($self->{'DEBUG'} >= 100) {
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Purity = 1;
print STDERR "".Data::Dumper->Dump([$root], ['$root']);
+ }
my $line_text = '';
$line_text = "$line_nr->{'line_nr'}.$line_nr->{'macro'}" if ($line_nr);
print STDERR "NEW LINE(".join('|',
@{$self->{'context_stack'}}).":@{$self->{'conditionals_stack'}}:$line_text):
$line";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp texi2any.pl Texinfo/Parser.pm,
Patrice Dumas <=