Include character even in "anywhere" transitions
This commit is contained in:
+3
-7
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user