Package tdi :: Package markup :: Package text :: Module parser :: Class TextLexer
[frames] | no frames]

Class TextLexer

source code

object --+
         |
        TextLexer

Text Lexer
Instance Methods
 
__init__(self, listener)
Initialization
source code
 
feed(self, food)
Feed the lexer with new data
source code
 
finalize(self)
Finalize the lexer
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  COMMENT = 6
  ENDTAG = 4
  FINAL = 0
  MARKUP = 2
  PI = 5
  STARTTAG = 3
  TEXT = 1
Properties

Inherited from object: __class__

Method Details

__init__(self, listener)
(Constructor)

source code 
Initialization
Parameters:
Overrides: object.__init__

feed(self, food)

source code 
Feed the lexer with new data
Parameters:
  • food (str) - The data to process

finalize(self)

source code 

Finalize the lexer

This processes the rest buffer (if any)

Raises:

Class Variable Details

COMMENT

Value:
6

ENDTAG

Value:
4

FINAL

Value:
0

MARKUP

Value:
2

PI

Value:
5

STARTTAG

Value:
3

TEXT

Value:
1