Boo.Lang.Parser.BooLexer.mSESC C# (CSharp) Method

mSESC() protected method

protected mSESC ( bool _createToken ) : void
_createToken bool
return void
        protected void mSESC(bool _createToken)
        {
            int _ttype; IToken _token=null; int _begin=text.Length;
            _ttype = SESC;

            switch ( cached_LA1 )
            {
            case 'r':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('r');
                text.Length = _saveIndex;
                if (0==inputState.guessing)
                {
                    text.Length = _begin; text.Append("\r");
                }
            }
            break;
            }
            case 'n':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('n');
                text.Length = _saveIndex;
                if (0==inputState.guessing)
                {
                    text.Length = _begin; text.Append("\n");
                }
            }
            break;
            }
            case 't':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('t');
                text.Length = _saveIndex;
                if (0==inputState.guessing)
                {
                    text.Length = _begin; text.Append("\t");
                }
            }
            break;
            }
            case 'a':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('a');
                text.Length = _saveIndex;
                if (0==inputState.guessing)
                {
                    text.Length = _begin; text.Append("\a");
                }
            }
            break;
            }
            case 'b':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('b');
                text.Length = _saveIndex;
                if (0==inputState.guessing)
                {
                    text.Length = _begin; text.Append("\b");
                }
            }
            break;
            }
            case 'f':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('f');
                text.Length = _saveIndex;
                if (0==inputState.guessing)
                {
                    text.Length = _begin; text.Append("\f");
                }
            }
            break;
            }
            case '0':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('0');
                text.Length = _saveIndex;
                if (0==inputState.guessing)
                {
                    text.Length = _begin; text.Append("\0");
                }
            }
            break;
            }
            case 'u':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('u');
                text.Length = _saveIndex;
                mHEXDIGIT(false);
                mHEXDIGIT(false);
                mHEXDIGIT(false);
                mHEXDIGIT(false);
                if (0==inputState.guessing)
                {

                                            char ch = (char)int.Parse(text.ToString(_begin, 4), System.Globalization.NumberStyles.HexNumber);
                                            text.Length = _begin;
                                            text.Append(ch);

                }
            }
            break;
            }
            case '\\':
            {
            {
                int _saveIndex = 0;
                _saveIndex = text.Length;
                match('\\');
                text.Length = _saveIndex;
                if (0==inputState.guessing)
                {
                    text.Length = _begin; text.Append("\\");
                }
            }
            break;
            }
            default:
            {
            throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());
            }
             }
            if (_createToken && (null == _token) && (_ttype != Token.SKIP))
            {
            _token = makeToken(_ttype);
            _token.setText(text.ToString(_begin, text.Length-_begin));
            }
            returnToken_ = _token;
        }