Home | History | Annotate | Download | only in importer

Lines Matching refs:line

121   std::string line;
122 if (!ReadLine(&line) ||
123 line.compare("// <!-- <mdb:mork:z v=\"1.4\"/> -->") != 0)
127 while (ReadLine(&line)) {
130 size_t len = line.size();
131 while (idx < len && line[idx] == ' ')
136 // Look at the line to figure out what section type this is
137 if (StartsWithASCII(&line[idx], "< <(a=c)>", true)) {
140 ParseMap(line, idx, &column_name_map);
155 } else if (StartsWithASCII(&line[idx], "<(", true)) {
157 ParseMap(line, idx, &value_map_);
158 } else if (line[idx] == '{' || line[idx] == '[') {
160 ParseTable(line, idx, &column_map);
173 // If the first line is the a=c line (column map), just skip over it.
174 std::string line(first_line);
175 if (StartsWithASCII(line, "< <(a=c)>", true))
176 ReadLine(&line);
181 size_t len = line.size();
185 switch (line[idx++]) {
194 while (idx < len && line[idx] != '=')
196 key.assign(&line[token_start], idx - token_start);
207 while (idx < len && line[idx] != ')') {
208 if (line[idx] == '\\')
216 std::string(&line[token_start], token_end - token_start));
229 // We should start reading the next line at the beginning.
231 } while (ReadLine(&line));
246 std::string line(first_line);
259 size_t len = line.size();
262 switch (line[idx++]) {
267 while (idx < len && line[idx] != '[') {
268 if (line[idx] == '{') {
270 } else if (line[idx] == '}') {
291 if (idx < len && line[idx] == '-') {
301 line[idx] != '(' &&
302 line[idx] != ']' &&
303 line[idx] != ':') {
307 while (idx < len && line[idx] != '(' && line[idx] != ']') {
317 IDString row_id(&line[token_start], token_end - token_start);
348 if (line[idx] == '^') {
355 while (idx < len && line[idx] != '^' && line[idx] != '=') {
356 if (line[idx] == '\\')
365 column.assign(&line[token_start], token_end - token_start);
367 column = MorkUnescape(line.substr(token_start,
387 bool value_is_atom = (line[idx - 1] == '^');
389 while (idx < len && line[idx] != ')') {
390 if (line[idx] == '\\')
398 (*current_row)[column_index].assign(&line[token_start],
402 MorkUnescape(line.substr(token_start, token_end - token_start));
410 // Start parsing the next line at the beginning.
412 } while (current_row && ReadLine(&line));
415 bool MorkReader::ReadLine(std::string* line) {
416 line->resize(256);
417 std::getline(stream_, *line);
421 while (!line->empty() && (*line)[line->size() - 1] == '\\') {
422 // There is a continuation for this line. Read it and append.
427 line->erase(line->size() - 1);
428 line->append(new_line);