3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-19 10:29:30 +01:00

CGrammar: Translate ' ' to "a space"; touch up translation of "the result of the expression the result of the function" to just "the result of the function"

This commit is contained in:
Pragmatic Software 2014-07-16 13:36:40 +00:00
parent ed73046d6b
commit 46a0184791
2 changed files with 5 additions and 3 deletions

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 734, BUILD_REVISION => 735,
BUILD_DATE => "2014-07-15", BUILD_DATE => "2014-07-16",
}; };
1; 1;

View File

@ -585,7 +585,7 @@ logical_OR_AND_expression:
{ {
if (defined $arg{context} and $arg{context} eq 'for conditional') { print STDERR "hmm2\n"; } if (defined $arg{context} and $arg{context} eq 'for conditional') { print STDERR "hmm2\n"; }
my $expression = join('', @{$item[1]}); my $expression = join('', @{$item[1]});
if($arg{context} =~ /initializer expression$/ and $expression =~ / / and $expression !~ /^the .*? number \S+$/i) { if($arg{context} =~ /initializer expression$/ and $expression =~ / / and $expression !~ /^the .*? number \S+$/i and $expression !~ /^the result of the/) {
$return = 'the result of the expression ^L'; $return = 'the result of the expression ^L';
} }
$return .= $expression; $return .= $expression;
@ -1835,6 +1835,8 @@ constant:
$return = 'a backspace character'; $return = 'a backspace character';
} elsif ($constant eq q('\'')) { } elsif ($constant eq q('\'')) {
$return = 'a single-quote'; $return = 'a single-quote';
} elsif ($constant eq q(' ')) {
$return = 'a space';
} else { } else {
$return = $constant; $return = $constant;
} }