[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo Common.pm Parser.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo Common.pm Parser.pm |
Date: |
Fri, 28 Oct 2011 23:04:16 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/10/28 23:04:16
Modified files:
tp/Texinfo : Common.pm Parser.pm
Log message:
Fix some FIXME.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.82&r2=1.83
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.320&r2=1.321
Patches:
Index: Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- Common.pm 28 Oct 2011 21:59:43 -0000 1.82
+++ Common.pm 28 Oct 2011 23:04:16 -0000 1.83
@@ -113,7 +113,7 @@
'ENCODING_NAME', 'PERL_ENCODING', 'INDICES', 'KBDINPUTSTYLE', 'LABELS',
'MACROS', 'NOVALIDATE', 'SECTIONS_LEVEL', 'VALUES');
-# FIXME warn when those variables are used?
+# TODO warn when those variables are used?
my @obsolete_variables = ('TOP_HEADING_AT_BEGINNING', 'USE_SECTIONS',
'IDX_SUMMARY', 'I18N_PERL_HASH', 'USE_UNICODE', 'USE_NLS',
'USE_UP_FOR_ADJACENT_NODES', 'SEPARATE_DESCRIPTION',
@@ -145,7 +145,7 @@
'OUT_ENCODING', 'ENCODING_NAME', 'EXTERNAL_CROSSREF_SPLIT', 'BODYTEXT',
'CSS_LINES', 'RENAMED_NODES_REDIRECTIONS', 'RENAMED_NODES_FILE',
'TEXI2DVI', 'DUMP_TREE', 'MAX_MACRO_CALL_NESTING',
-# FIXME new
+# TODO new, document?
'PROGRAM_AND_VERSION', 'PROGRAM_HOMEPAGE', 'PROGRAM',
'PRE_BODY_CLOSE', 'AFTER_BODY_OPEN', 'PRE_ABOUT', 'AFTER_ABOUT',
'EXTRA_HEAD', 'LINKS_BUTTONS', 'DO_ABOUT',
Index: Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.320
retrieving revision 1.321
diff -u -b -r1.320 -r1.321
--- Parser.pm 28 Oct 2011 21:59:43 -0000 1.320
+++ Parser.pm 28 Oct 2011 23:04:16 -0000 1.321
@@ -143,8 +143,6 @@
'documentlanguage' => undef,
# Current documentlanguage set by
# @documentlanguage
- # FIXME not used?
- 'ENABLE_ENCODING' => 1, # corresponds to --enable-encoding.
'MAX_MACRO_CALL_NESTING' => 100000, # max number of nested macro calls
'TOP_NODE_UP' => '(dir)', # up node of Top node
'SIMPLE_MENU' => 0, # currently not used in the parser for now,
@@ -1052,7 +1050,8 @@
my $message = shift;
# use the beginning of the @-command for the error message
- # line number if available. FIXME currently not done for regular brace
commands
+ # line number if available.
+ # FIXME currently not done for regular brace commands
if ($current->{'line_nr'}) {
$line_nr = $current->{'line_nr'};
}
@@ -1220,7 +1219,6 @@
}
}
if ($type eq 'table_item') {
- # FIXME keep table_item with only comments and/or empty lines?
my $table_entry = {'type' => 'table_entry',
'parent' => $current,
'contents' => []};
@@ -1474,10 +1472,9 @@
pop @{$self->{'regions_stack'}}
if ($region_commands{$current->{'cmdname'}});
$current = $current->{'parent'};
- } else { # FIXME is this possible? And does it make sense?
- # silently close containers and @-commands without brace nor @end
- # $self->line_error(sprintf($self->__("Closing address@hidden"),
- # $current->{'cmdname'}), $line_nr);
+ } else {
+ # There @item and @tab commands are closed, and also line commands
+ # with invalid content
$current = $current->{'parent'};
}
} elsif ($current->{'type'}) {
@@ -2001,8 +1998,6 @@
if ($contents->[0]->{'type'} and $contents->[0]->{'type'} eq 'bracketed') {
#print STDERR "Return bracketed\n";
my $bracketed = shift @{$contents};
- # FIXME don't modify type here?
- # return ($spaces, $bracketed);
$self->_isolate_last_space($bracketed, 'empty_space_at_end_def_bracketed');
return ($spaces, { 'contents' => $bracketed->{'contents'},
'parent' => $bracketed->{'parent'},
@@ -2251,13 +2246,10 @@
$current = _end_paragraph($self, $current, $line_nr);
push @{$current->{'contents'}}, $empty_line;
$empty_line->{'parent'} = $current;
- } elsif (($current->{'type'}
- # FIXME remove this condition
- and $current->{'type'} eq 'menu_entry_description')
- or ($current->{'type'}
+ } elsif ($current->{'type'}
and $current->{'type'} eq 'preformatted'
and $current->{'parent'}->{'type'}
- and $current->{'parent'}->{'type'} eq
'menu_entry_description')) {
+ and $current->{'parent'}->{'type'} eq 'menu_entry_description') {
my $empty_line = pop @{$current->{'contents'}};
if ($current->{'type'} eq 'preformatted') {
my $empty_preformatted = (address@hidden>{'contents'}});
@@ -2285,8 +2277,6 @@
push @{$self->{'context_stack'}}, 'preformatted';
print STDERR "MENU: END DESCRIPTION, OPEN COMMENT\n" if
($self->{'DEBUG'});
} elsif (!$no_paragraph_contexts{$self->{'context_stack'}->[-1]}) {
- # FIXME remove this if an empty line in a brace command
- # is acceptable
$current = _end_paragraph($self, $current, $line_nr);
}
@@ -2349,8 +2339,8 @@
and $current->{'contents'}->[-1]->{'type'} eq 'preformatted') {
$current = $current->{'contents'}->[-1];
} else {
- # FIXME verify that this may happen
- #push @{$self->{'context_stack'}}, 'preformatted';
+ # this should not happen
+ warn "BUG: description or menu comment not in preformatted";
push @{$current->{'contents'}}, {'type' => 'preformatted',
'parent' => $current,
'contents' => [] };
@@ -2485,7 +2475,7 @@
and $current->{'type'} eq 'block_line_arg') {
my $empty_text;
my $context = pop @{$self->{'context_stack'}};
- print STDERR "BUG: $context in block_line_arg ne line\n"
+ warn "BUG: $context in block_line_arg ne line\n"
if ($context ne 'line');
# @multitable args
if ($current->{'parent'}->{'cmdname'}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp/Texinfo Common.pm Parser.pm,
Patrice Dumas <=