[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo Parser.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo Parser.pm |
Date: |
Sat, 09 Oct 2010 23:28:29 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/10/09 23:28:29
Modified files:
tp/Texinfo : Parser.pm
Log message:
Handle empty text as soon as possible.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.56&r2=1.57
Patches:
Index: Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- Parser.pm 9 Oct 2010 23:22:52 -0000 1.56
+++ Parser.pm 9 Oct 2010 23:28:29 -0000 1.57
@@ -1417,6 +1417,13 @@
}
}
+ if ($line eq '' and scalar(@$text))
+ {
+ print STDERR "END OF TEXT not at end of line/text\n"
+ if ($self->{'debug'});
+ $line = shift @$text;
+ $line_nr = shift @$lines_array;
+ }
# handle user defined macros before anything else since
# their expansion may lead to changes in the line
# REMACRO
@@ -1567,8 +1574,7 @@
# * folllowed by something else than a space.
} elsif (@{$current->{'contents'}}
and $current->{'contents'}->[-1]->{'type'}
- and $current->{'contents'}->[-1]->{'type'} eq 'menu_star'
- and $line ne '') {
+ and $current->{'contents'}->[-1]->{'type'} eq 'menu_star') {
print STDERR "ABORT MENU STAR ($line)\n" if ($self->{'debug'});
delete $current->{'contents'}->[-1]->{'type'};
# REMACRO
@@ -2032,16 +2038,10 @@
if ($self->{'debug'}) {
print STDERR "END LINE: ". _print_current($current)."\n";
}
- if ($line ne "\n" and scalar(@$text)) {
- die "Remaining line: |$line|\n" if ($line ne '');
- print STDERR "END OF TEXT not at end of line/text\n"
- if ($self->{'debug'});
- $line = shift @$text;
- $line_nr = shift @$lines_array;
- next;
- }
if ($line =~ s/^(\n)//) {
$current = _merge_text ($self, $current, $1);
+ } else {
+ die if (scalar(@$text));
}
$current = _end_line($self, $current, $line_nr);
last;
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/04
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/04
- texinfo/tp/Texinfo Parser.pm,
Patrice Dumas <=
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/14
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/14
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/16
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/18
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/19
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/19
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/24
- texinfo/tp/Texinfo Parser.pm, Patrice Dumas, 2010/10/24