Lines Matching +full:1 +full:d
15 list[#list + 1] = key
69 return s:gsub("^[" .. what .. "]*(.-)["..what.."]*$", "%1")
73 stack[#stack + 1] = item
124 {"timestamp", "^(%d%d%d%d)-(%d%d?)-(%d%d?)%s+(%d%d?):(%d%d):(%d%d)%s+(%-?%d%d?):(%d%d)"},
125 {"timestamp", "^(%d%d%d%d)-(%d%d?)-(%d%d?)%s+(%d%d?):(%d%d):(%d%d)%s+(%-?%d%d?)"},
126 {"timestamp", "^(%d%d%d%d)-(%d%d?)-(%d%d?)%s+(%d%d?):(%d%d):(%d%d)"},
127 {"timestamp", "^(%d%d%d%d)-(%d%d?)-(%d%d?)%s+(%d%d?):(%d%d)"},
128 {"timestamp", "^(%d%d%d%d)-(%d%d?)-(%d%d?)%s+(%d%d?)"},
129 {"timestamp", "^(%d%d%d%d)-(%d%d?)-(%d%d?)"},
140 {"pipe", "^(|)(%d*[+%-]?)", sep = "\n"},
141 {"pipe", "^(>)(%d*[+%-]?)", sep = " "},
168 local str2 = str:gsub(tokens[i][2], "", 1)
169 token.raw = str:sub(1, #str - #str2)
172 if token[1] == "{" or token[1] == "[" then
177 token.raw = token.raw:sub(1, #token.raw - #token[2][2])
178 elseif token[1] == "id" then
181 token.raw = token.raw:sub(1, #token.raw - #token[2][2])
183 token[2][1] = string_trim(token[2][1])
184 elseif token[1] == "string" then
186 local snip = token[2][1]
188 if snip:match("^(-?%d+%.%d+)$") or snip:match("^(-?%d+)$") then
189 token[1] = "number"
193 elseif token[1] == "comment" then
195 elseif token[1] == "indent" then
196 row = row + 1
200 indentAmount = #token[2][1]
204 indents = (#token[2][1] / indentAmount);
214 elseif indents > lastIndents + 1 then
220 while lastIndents > indents + 1 do
221 lastIndents = lastIndents - 1
225 end -- if token[1] == XXX
247 offset = offset or 1
252 self.current = self.current + 1
257 return self:advance()[2][1]
268 error(msg .. context(self:peek()[1].input))
277 return self:peek(offset) and self:peek(offset)[1] == val
305 local char = self:peek()[2][1]:sub(1,1)
307 ref = self:peek()[2][1]:sub(2)
311 ref = self:peek()[2][1]:sub(2)
318 indent = self:accept("indent") and 1 or 0,
323 if c.token[1] == "doc" then
325 elseif c.token[1] == "-" then
327 elseif c.token[1] == "{" then
329 elseif c.token[1] == "[" then
331 elseif c.token[1] == "id" then
333 elseif c.token[1] == "string" then
335 elseif c.token[1] == "timestamp" then
337 elseif c.token[1] == "number" then
339 elseif c.token[1] == "pipe" then
345 error("ParseError: unexpected token '" .. c.token[1] .. "'" .. context(c.token.input))
350 c.indent = c.indent - 1
351 local term = "term "..c.token[1]..": '"..c.token[2][1].."'"
376 inline[self:peek(i)[1]] = true
377 i = i - 1
388 level = level or 1
393 return self:parent(level) and self:parent(level).token[1] == type
413 a: 1
433 a: 1
460 token.row = token.row + 1
462 if newtoken[1] == "indent" then
463 indents = indents + 1
464 elseif newtoken[1] == "dedent" then
465 indents = indents - 1
482 indents = indents + 1
487 indents = indents + 1
503 indents = indents - 1
532 i = i + 1
541 list[#list + 1] = self:parse()
559 list[#list + 1] = self:parse()
561 i = i + 1
571 year = capture[1],
578 } - os.time{year=1970, month=1, day=1, hour=8}