[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5201] * tp/Texinfo/Parser.pm: allow more characters in flags.
From: |
Patrice Dumas |
Subject: |
[5201] * tp/Texinfo/Parser.pm: allow more characters in flags. |
Date: |
Sat, 23 Feb 2013 23:43:47 +0000 |
Revision: 5201
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5201
Author: pertusus
Date: 2013-02-23 23:43:47 +0000 (Sat, 23 Feb 2013)
Log Message:
-----------
* tp/Texinfo/Parser.pm: allow more characters in flags.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Parser.pm
trunk/tp/t/50value.t
trunk/tp/t/55conditionals.t
trunk/tp/t/results/value/bad_syntax.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2013-02-23 22:58:27 UTC (rev 5200)
+++ trunk/ChangeLog 2013-02-23 23:43:47 UTC (rev 5201)
@@ -5,8 +5,9 @@
Report in http://savannah.gnu.org/bugs/?38380.
* tp/Makefile.am, tp/maintain/*: modularize and rename scripts
associated to standalone modules handling.
- * tp/Convert/Plaintext.pm: use OPEN_QUOTE_SYMBOL and
+ * tp/Texinfo/Convert/Plaintext.pm: use OPEN_QUOTE_SYMBOL and
CLOSE_QUOTE_SYMBOL.
+ * tp/Texinfo/Parser.pm: allow more characters in flags.
2013-02-22 Karl Berry <address@hidden>
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2013-02-23 22:58:27 UTC (rev 5200)
+++ trunk/tp/Texinfo/Parser.pm 2013-02-23 23:43:47 UTC (rev 5201)
@@ -4612,7 +4612,7 @@
my $ifvalue_true = 0;
if ($command eq 'ifclear' or $command eq 'ifset') {
# REVALUE
- if ($line =~ /^\s+([\w\-]+)\s*(\@(c|comment)((\@|\s+).*)?)?$/) {
+ if ($line =~
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/) {
my $name = $1;
if ((exists($self->{'values'}->{$name}) and $command eq
'ifset')
or (!exists($self->{'values'}->{$name})
@@ -5308,9 +5308,9 @@
if ($command eq 'set') {
# REVALUE
#if ($line =~ s/^\s+([\w\-]+)(\s+(.*?))\s*$//) {
- if ($line =~ /^\s+([\w\-]+)(\@(c|comment)((\@|\s+).*)?|\s+(.*?))?\s*$/) {
+ if ($line =~
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)(\@(c|comment)((\@|\s+).*)?|\s+(.*?))?\s*$/) {
$line =~ s/\@(c|comment)((\@|\s+).*)?$//;
- $line =~ /^\s+([\w\-]+)(\s+(.*?))?\s*$/;
+ $line =~ /^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)(\s+(.*?))?\s*$/;
my $name = $1;
my $arg = $3;
$arg = '' if (!defined($arg));
@@ -5326,7 +5326,7 @@
}
} elsif ($command eq 'clear') {
# REVALUE
- if ($line =~ /^\s+([\w\-]+)\s*(\@(c|comment)((\@|\s+).*)?)?$/) {
+ if ($line =~
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/) {
$args = [$1];
delete $self->{'values'}->{$1}
unless(_ignore_global_commands($self));
Modified: trunk/tp/t/50value.t
===================================================================
--- trunk/tp/t/50value.t 2013-02-23 22:58:27 UTC (rev 5200)
+++ trunk/tp/t/50value.t 2013-02-23 23:43:47 UTC (rev 5201)
@@ -15,10 +15,12 @@
@set
@set ?
@set :-/ hey!
address@hidden a#b
address@hidden address@hidden
address@hidden :-" bad
address@hidden } no
@clear aaa ggg
address@hidden and&other
address@hidden and{other
@value{gurgl
Modified: trunk/tp/t/55conditionals.t
===================================================================
--- trunk/tp/t/55conditionals.t 2013-02-23 22:58:27 UTC (rev 5200)
+++ trunk/tp/t/55conditionals.t 2013-02-23 23:43:47 UTC (rev 5201)
@@ -307,7 +307,7 @@
@end ifset
'],
['bad_ifset_argument',
-'@ifset a&b
+'@ifset a|b
Ra&b
@end ifset
'],
Modified: trunk/tp/t/results/value/bad_syntax.pl
===================================================================
--- trunk/tp/t/results/value/bad_syntax.pl 2013-02-23 22:58:27 UTC (rev
5200)
+++ trunk/tp/t/results/value/bad_syntax.pl 2013-02-23 23:43:47 UTC (rev
5201)
@@ -48,12 +48,28 @@
{
'cmdname' => 'set',
'extra' => {
- 'arg_line' => ' a#b
+ 'arg_line' => ' address@hidden
'
},
'parent' => {}
},
{
+ 'cmdname' => 'set',
+ 'extra' => {
+ 'arg_line' => ' :-" bad
+'
+ },
+ 'parent' => {}
+ },
+ {
+ 'cmdname' => 'set',
+ 'extra' => {
+ 'arg_line' => ' } no
+'
+ },
+ 'parent' => {}
+ },
+ {
'parent' => {},
'text' => '
',
@@ -70,7 +86,7 @@
{
'cmdname' => 'clear',
'extra' => {
- 'arg_line' => ' and&other
+ 'arg_line' => ' and{other
'
},
'parent' => {}
@@ -125,21 +141,25 @@
$result_trees{'bad_syntax'}{'contents'}[7]{'parent'} =
$result_trees{'bad_syntax'};
$result_trees{'bad_syntax'}{'contents'}[8]{'parent'} =
$result_trees{'bad_syntax'};
$result_trees{'bad_syntax'}{'contents'}[9]{'parent'} =
$result_trees{'bad_syntax'};
-$result_trees{'bad_syntax'}{'contents'}[10]{'contents'}[0]{'parent'} =
$result_trees{'bad_syntax'}{'contents'}[10];
$result_trees{'bad_syntax'}{'contents'}[10]{'parent'} =
$result_trees{'bad_syntax'};
$result_trees{'bad_syntax'}{'contents'}[11]{'parent'} =
$result_trees{'bad_syntax'};
+$result_trees{'bad_syntax'}{'contents'}[12]{'contents'}[0]{'parent'} =
$result_trees{'bad_syntax'}{'contents'}[12];
$result_trees{'bad_syntax'}{'contents'}[12]{'parent'} =
$result_trees{'bad_syntax'};
+$result_trees{'bad_syntax'}{'contents'}[13]{'parent'} =
$result_trees{'bad_syntax'};
$result_trees{'bad_syntax'}{'contents'}[14]{'parent'} =
$result_trees{'bad_syntax'};
+$result_trees{'bad_syntax'}{'contents'}[16]{'parent'} =
$result_trees{'bad_syntax'};
$result_texis{'bad_syntax'} = '
@set
@set
@set ?
@set :-/ hey!
address@hidden a#b
address@hidden address@hidden
address@hidden :-" bad
address@hidden } no
@clear aaa ggg
address@hidden and&other
address@hidden and{other
gurgl
@@ -201,46 +221,64 @@
'type' => 'error'
},
{
- 'error_line' => ':8: bad name for @clear
+ 'error_line' => ':7: bad name for @set
',
'file_name' => '',
+ 'line_nr' => 7,
+ 'macro' => '',
+ 'text' => 'bad name for @set',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => ':8: bad name for @set
+',
+ 'file_name' => '',
'line_nr' => 8,
'macro' => '',
- 'text' => 'bad name for @clear',
+ 'text' => 'bad name for @set',
'type' => 'error'
},
{
- 'error_line' => ':9: bad name for @clear
+ 'error_line' => ':10: bad name for @clear
',
'file_name' => '',
- 'line_nr' => 9,
+ 'line_nr' => 10,
'macro' => '',
'text' => 'bad name for @clear',
'type' => 'error'
},
{
- 'error_line' => ':11: bad syntax for @value
+ 'error_line' => ':11: bad name for @clear
',
'file_name' => '',
'line_nr' => 11,
'macro' => '',
+ 'text' => 'bad name for @clear',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => ':13: bad syntax for @value
+',
+ 'file_name' => '',
+ 'line_nr' => 13,
+ 'macro' => '',
'text' => 'bad syntax for @value',
'type' => 'error'
},
{
- 'error_line' => ':11: misplaced {
+ 'error_line' => ':13: misplaced {
',
'file_name' => '',
- 'line_nr' => 11,
+ 'line_nr' => 13,
'macro' => '',
'text' => 'misplaced {',
'type' => 'error'
},
{
- 'error_line' => ':13: warning: undefined flag: unknown
+ 'error_line' => ':15: warning: undefined flag: unknown
',
'file_name' => '',
- 'line_nr' => 13,
+ 'line_nr' => 15,
'macro' => '',
'text' => 'undefined flag: unknown',
'type' => 'warning'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5201] * tp/Texinfo/Parser.pm: allow more characters in flags.,
Patrice Dumas <=