MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / read

Method read

src/runtime/CL/mlgo/MLGOParser.cpp:157–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 pos.col -= 1;
156}
157void TokenStream::read()
158{
159 char ch;
160 // Skip any leading space and delim characters
161 do
162 {
163 // Reached eof
164 if (!_istream.get(ch))
165 {
166 if (!reached_end())
167 {
168 _tokens.emplace_back(TokenType::End, "", _lookahead_pos);
169 }
170 return;
171 }
172 advance(_lookahead_pos, ch);
173 } while (std::isspace(ch) || is_delim(ch));
174 // Read chars until we hit a delim or eof
175 auto orig_pos = _lookahead_pos;
176 auto tok = recognize_tok(ch);
177 rewind(orig_pos);
178 tok.pos = orig_pos;
179 // Trim leading and trailing white spaces
180 trim(tok.value);
181 _tokens.push_back(tok);
182}
183
184Token TokenStream::recognize_tok(char ch)
185{

Callers 15

is_tflite_modelFunction · 0.80
get_rowMethod · 0.80
fill_tensorMethod · 0.80
load_trained_dataFunction · 0.80
update_dox_fileMethod · 0.80
add_copyright.pyFile · 0.80
check_fileFunction · 0.80
mainFunction · 0.80

Calls 5

advanceFunction · 0.85
rewindFunction · 0.85
push_backMethod · 0.80
trimFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected