class documentation

class Lexer: (source)

View In Hierarchy

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
def __init__(self, text): (source)

Undocumented

def gettoken(self): (source)

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.

offset = (source)

Undocumented

text = (source)

Undocumented

type: str = (source)

Undocumented

value = (source)

Undocumented