class Lexer: (source)
Method | __init__ |
Undocumented |
Method | gettoken |
Get next token from text and return its type and value. |
Instance Variable | offset |
Undocumented |
Instance Variable | text |
Undocumented |
Instance Variable | type |
Undocumented |
Instance Variable | value |
Undocumented |
Get next token from text and return its type and value.
Return (None,None) if no more text.
Identifiers letter ( letter | digit | _ )* Numbers digit ( digit | , | . ) * Operators - + * / ^ ** x
x can be a name or an operator
x preceded and followed by a digit is taken as if preceded and followed by a space. i.e 5x3 is seen as 5 x 3.