Lines Matching full:cursor
75 * keeps a separate size, pointer, and cursor so that we can move
79 int cursor; member in dtc::input_buffer
85 cursor(c) {} in input_buffer()
110 bool finished() { return cursor >= size; } in finished()
119 input_buffer() : buffer(0), size(0), cursor(0) {} in input_buffer()
123 input_buffer(const char* b, int s) : buffer(b), size(s), cursor(0){} in input_buffer()
138 * the cursor is out of range.
142 if (cursor >= size) { return '\0'; } in operator *()
143 if (cursor < 0) { return '\0'; } in operator *()
144 return buffer[cursor]; in operator *()
148 * index offset from the current cursor. The offset may be negative,
150 * cursor plus offset is outside of the range, this returns a nul
155 if (cursor + offset >= size) { return '\0'; } in operator []()
156 if (cursor + offset < 0) { return '\0'; } in operator []()
157 return buffer[cursor + offset]; in operator []()
160 * Increments the cursor, iterating forward in the buffer.
164 cursor++; in operator ++()
176 * Consumes a character. Moves the cursor one character forward if the
191 * argument appears in the input, advances the cursor to the end and
198 * the cursor to the end of the integer if the cursor points to an
199 * integer, returns false and does not move the cursor otherwise.
212 * and advances the cursor. If not, then returns false and leaves the
213 * cursor in place.
218 * from the input stream. Returns true and advances the cursor if
220 * all values must be natively aligned, and so advances the cursor to
228 if (cursor % type_size != 0) in consume_binary()
230 align = type_size - (cursor % type_size); in consume_binary()
232 if (size < cursor + align + type_size) in consume_binary()
236 cursor += align; in consume_binary()
237 assert(cursor % type_size == 0); in consume_binary()
241 if (size < cursor) in consume_binary()
246 out |= (((T)buffer[cursor++]) & 0xff); in consume_binary()
252 * Dumps the current cursor value and the unconsumed values in the
265 if (size < cursor + 1) in consume_binary()
269 out = buffer[cursor++]; in consume_binary()
281 * The cursor is the input into the input stream where we are currently reading.
283 int cursor = 0; member in dtc::text_input_buffer
368 * Increments the cursor, iterating forward in the buffer.
376 cursor++; in operator ++()
386 * Consumes a character. Moves the cursor one character forward if the
401 * argument appears in the input, advances the cursor to the end and
417 * the cursor to the end of the integer if the cursor points to an
418 * integer, returns false and does not move the cursor otherwise.
440 * and advances the cursor. If not, then returns false and leaves the
441 * cursor in place.
455 * current cursor and composed entirely of characters that are valid in
461 * current cursor and composed entirely of characters that are valid in
478 * Advances the cursor to the start of the next token, skipping
479 * comments and whitespace. If the cursor already points to the start
502 int cursor; member in dtc::text_input_buffer::source_location
506 cursor(b ? b->cursor : 0) {} in source_location()
515 buffer.parse_error(msg, *b, cursor); in report_error()