Include character even in "anywhere" transitions

This commit is contained in:
Keith Winstein
2011-01-10 04:25:00 -05:00
parent 3174e4f659
commit 06697abb23
+3 -7
View File
@@ -29,18 +29,14 @@ Transition State::anywhere_rule( wchar_t ch )
Transition State::input( wchar_t ch ) Transition State::input( wchar_t ch )
{ {
Transition any = anywhere_rule( ch ); Transition ret = anywhere_rule( ch );
if ( any.next_state ) { if ( !ret.next_state ) {
return any;
}
Transition ret;
if ( ch >= 0xA0 ) { if ( ch >= 0xA0 ) {
ret = this->input_state_rule( 0x41 ); ret = this->input_state_rule( 0x41 );
} else { } else {
ret = this->input_state_rule( ch ); ret = this->input_state_rule( ch );
} }
}
ret.action.char_present = true; ret.action.char_present = true;
ret.action.ch = ch; ret.action.ch = ch;