class documentation
Undocumented
Class Method | isnum |
Whether the next character is part of a number |
Class Method | isspace |
Whether the next character is whitespace |
Class Method | isword |
Whether or not the next character is part of a word |
Class Method | split |
Undocumented |
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __next__ |
Undocumented |
Method | get |
This function breaks the time string into lexical units (tokens), which can be parsed by the parser. Lexical units are demarcated by changes in the character set, so any continuous string of letters is considered one unit, any continuous string of numbers is considered one unit. |
Method | next |
Undocumented |
Instance Variable | charstack |
Undocumented |
Instance Variable | eof |
Undocumented |
Instance Variable | instream |
Undocumented |
Instance Variable | tokenstack |
Undocumented |
Class Variable | _split |
Undocumented |
This function breaks the time string into lexical units (tokens), which can be parsed by the parser. Lexical units are demarcated by changes in the character set, so any continuous string of letters is considered one unit, any continuous string of numbers is considered one unit. The main complication arises from the fact that dots ('.') can be used both as separators (e.g. "Sep.20.2009") or decimal points (e.g. "4:30:21.447"). As such, it is necessary to read the full context of any dot-separated strings before breaking it into tokens; as such, this function maintains a "token stack", for when the ambiguous context demands that multiple tokens be parsed at once.