Ini¶
A streaming parser for INI formatted lines of text.
Lines are pulled from the iterator one at a time and dispatched to an
IniNotify handler as section headers, key/value pairs, or errors. The
current section name is the only piece of parsed input that persists
across handler calls; everything else (the line number reported with
errors, the running success/failure status returned at the end) is
internal bookkeeping the handler does not see.
Constructors¶
create¶
Returns¶
- Ini val^
Public Functions¶
apply¶
Parse lines and call f for each section header and key/value pair.
Returns true when parsing finishes with no errors, false otherwise.
When the parser hits a malformed line it calls f.errors. If errors
returns true parsing continues, but the final return value is still
false. If errors returns false parsing stops immediately and
apply returns false.
f.apply and f.add_section can also stop parsing early by returning
false. In that case apply returns whatever the parse status was at
the point of the stop: true if no errors had been seen, false if any
had.
Parameters¶
Returns¶
- Bool val
eq¶
Parameters¶
- that: Ini val
Returns¶
- Bool val
ne¶
Parameters¶
- that: Ini val
Returns¶
- Bool val