/// <summary>
        /// handles escaped identifiers
        /// ch will always be translated i.e. normalized.
        /// </summary>
        internal Token HandleEscapedIdentifiers()
        {
            char ch = YYText[0];

            while (ch != YY_EOF)
            {
                if (ch == ']')
                {
                    yy_mark_end();
                    ch = yy_advance();
                    if (ch != ']')
                    {
                        yy_to_mark();
                        ResetSymbolAsIdentifierState(true);
                        return(MapIdentifierOrKeyword(YYText.Replace("]]", "]")));
                    }
                }
                ch = yy_advance();
            }
            Debug.Assert(ch == YY_EOF, "ch == YY_EOF");
            throw EntityUtil.EntitySqlError(_query, System.Data.Entity.Strings.InvalidEscapedIdentifierUnbalanced(YYText), _iPos);
        }
示例#2
0
        // <summary>
        // handles escaped identifiers
        // ch will always be translated i.e. normalized.
        // </summary>
        internal Token HandleEscapedIdentifiers()
        {
            var ch = YYText[0];

            while (ch != YY_EOF)
            {
                if (ch == ']')
                {
                    yy_mark_end();
                    ch = yy_advance();
                    if (ch != ']')
                    {
                        yy_to_mark();
                        ResetSymbolAsIdentifierState(true);
                        return(MapIdentifierOrKeyword(YYText.Replace("]]", "]")));
                    }
                }
                ch = yy_advance();
            }
            Debug.Assert(ch == YY_EOF, "ch == YY_EOF");
            var errorMessage = Strings.InvalidEscapedIdentifierUnbalanced(YYText);

            throw EntitySqlException.Create(_query, errorMessage, _iPos, null, false, null);
        }