public override void ReadChar(Char ch) {
this._scanned = this._scanned + ch;
switch (this._state) {
case State.END:
case State.ERROR:
this._state = State.ERROR;
break;
case State.START:
if (IsChar(ch)) {
this._state = State.C;
} else if (ch == '\\') {
this._state = State.S;
} else {
this._state = State.ERROR;
}
break;
case State.C:
this._state = State.END;
break;
case State.S:
if (Utils.IsEscapeChar(ch)) {
this._state = State.C;
} else if (Utils.IsOctDigit(ch)) {
this._state = State.SO;
} else if (ch == 'x' || ch == 'X') {
this._state = State.SX;
} else {
this._state = State.ERROR;
}
break;
case State.SX:
if (Utils.IsHexDigit(ch)) {
this._state = State.SXH;
} else {
this._state = State.ERROR;
}
break;
case State.SXH:
if (Utils.IsHexDigit(ch)) {
this._state = State.SXHH;
} else {
this._state = State.END;
}
break;
case State.SXHH:
this._state = State.END;
break;
case State.SO:
if (Utils.IsOctDigit(ch)) {
this._state = State.SOO;
} else {
this._state = State.END;
}
break;
case State.SOO:
if (Utils.IsOctDigit(ch)) {
this._state = State.SOOO;
} else {
this._state = State.END;
}
break;
case State.SOOO:
this._state = State.END;
break;
default:
this._state = State.ERROR;
break;
}
}