~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lex_input_stream.h

  • Committer: Olaf van der Spek
  • Date: 2011-07-05 16:20:32 UTC
  • mto: This revision was merged to the branch mainline in revision 2384.
  • Revision ID: olafvdspek@gmail.com-20110705162032-sn2tnssow7xulzvt
Add const

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
    Get the last character accepted.
83
83
    @return the last character accepted.
84
84
  */
85
 
  char yyGetLast()
 
85
  char yyGetLast() const
86
86
  {
87
87
    return m_ptr[-1];
88
88
  }
90
90
  /**
91
91
    Look at the next character to parse, but do not accept it.
92
92
  */
93
 
  char yyPeek()
 
93
  char yyPeek() const
94
94
  {
95
95
    return m_ptr[0];
96
96
  }
99
99
    Look ahead at some character to parse.
100
100
    @param n offset of the character to look up
101
101
  */
102
 
  char yyPeekn(int n)
 
102
  char yyPeekn(int n) const
103
103
  {
104
104
    return m_ptr[n];
105
105
  }
201
201
  }
202
202
 
203
203
  /** Get the token start position, in the raw buffer. */
204
 
  const char *get_tok_start()
 
204
  const char *get_tok_start() const
205
205
  {
206
206
    return m_tok_start;
207
207
  }
208
208
 
209
209
  /** Get the token start position, in the pre-processed buffer. */
210
 
  const char *get_cpp_tok_start()
 
210
  const char *get_cpp_tok_start() const
211
211
  {
212
212
    return m_cpp_tok_start;
213
213
  }
214
214
 
215
215
  /** Get the token end position, in the raw buffer. */
216
 
  const char *get_tok_end()
 
216
  const char *get_tok_end() const
217
217
  {
218
218
    return m_tok_end;
219
219
  }
220
220
 
221
221
  /** Get the token end position, in the pre-processed buffer. */
222
 
  const char *get_cpp_tok_end()
 
222
  const char *get_cpp_tok_end() const
223
223
  {
224
224
    return m_cpp_tok_end;
225
225
  }
226
226
 
227
227
  /** Get the previous token start position, in the raw buffer. */
228
 
  const char *get_tok_start_prev()
 
228
  const char *get_tok_start_prev() const
229
229
  {
230
230
    return m_tok_start_prev;
231
231
  }
232
232
 
233
233
  /** Get the current stream pointer, in the raw buffer. */
234
 
  const char *get_ptr()
 
234
  const char *get_ptr() const
235
235
  {
236
236
    return m_ptr;
237
237
  }
238
238
 
239
239
  /** Get the current stream pointer, in the pre-processed buffer. */
240
 
  const char *get_cpp_ptr()
 
240
  const char *get_cpp_ptr() const
241
241
  {
242
242
    return m_cpp_ptr;
243
243
  }
244
244
 
245
245
  /** Get the length of the current token, in the raw buffer. */
246
 
  uint32_t yyLength()
 
246
  uint32_t yyLength() const
247
247
  {
248
248
    /*
249
249
      The assumption is that the lexical analyser is always 1 character ahead,
254
254
  }
255
255
 
256
256
  /** Get the utf8-body string. */
257
 
  const char *get_body_utf8_str()
 
257
  const char *get_body_utf8_str() const
258
258
  {
259
259
    return m_body_utf8;
260
260
  }
261
261
 
262
262
  /** Get the utf8-body length. */
263
 
  uint32_t get_body_utf8_length()
 
263
  uint32_t get_body_utf8_length() const
264
264
  {
265
265
    return m_body_utf8_ptr - m_body_utf8;
266
266
  }