~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.cc

  • Committer: Olaf van der Spek
  • Date: 2011-10-29 16:01:50 UTC
  • mto: This revision was merged to the branch mainline in revision 2456.
  • Revision ID: olafvdspek@gmail.com-20111029160150-pgioq08jmw7vg8hb
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
                  m_cpp_utf8_processed_ptr will be set in the end of the
118
118
                  operation.
119
119
*/
120
 
void Lex_input_stream::body_utf8_append(const char *ptr,
121
 
                                        const char *end_ptr)
 
120
void Lex_input_stream::body_utf8_append(const char *ptr, const char *end_ptr)
122
121
{
123
122
  assert(m_cpp_buf <= ptr && ptr <= m_cpp_buf + m_buf_length);
124
123
  assert(m_cpp_buf <= end_ptr && end_ptr <= m_cpp_buf + m_buf_length);
751
750
        }
752
751
        lip->yySkip();                  // next state does a unget
753
752
      }
754
 
      yylval->lex_str=get_token(lip, 0, length);
 
753
      yylval->lex_str= get_token(lip, 0, length);
755
754
 
756
755
      lip->body_utf8_append(lip->m_cpp_text_start);
757
756
 
777
776
          if ((lip->yyLength() >= 3) && !ident_map[c])
778
777
          {
779
778
            /* skip '0x' */
780
 
            yylval->lex_str=get_token(lip, 2, lip->yyLength()-2);
 
779
            yylval->lex_str= get_token(lip, 2, lip->yyLength()-2);
781
780
            return (HEX_NUM);
782
781
          }
783
782
          lip->yyUnget();
816
815
          {
817
816
            lip->yySkip();
818
817
            while (cs->isdigit(lip->yyGet())) ;
819
 
            yylval->lex_str=get_token(lip, 0, lip->yyLength());
 
818
            yylval->lex_str= get_token(lip, 0, lip->yyLength());
820
819
            return(FLOAT_NUM);
821
820
          }
822
821
        }
851
850
      yylval->lex_str= get_token(lip, 0, lip->yyLength());
852
851
 
853
852
      lip->body_utf8_append(lip->m_cpp_text_start);
854
 
 
855
853
      lip->body_utf8_append_literal(yylval->lex_str, lip->m_cpp_text_end);
856
854
 
857
855
      return(result_state);