A finite state machine to parse efficiently and correctly po file
format.
|
|
|
|
|
parse(self)
Run the state machine, parse the file line by line and call process()
with the current matched symbol. |
source code
|
|
|
|
add(self,
symbol,
states,
next_state)
Add a transition to the state machine. |
source code
|
|
|
|
process(self,
symbol,
linenum)
Process the transition corresponding to the current state and the
symbol provided. |
source code
|
|
|
|
|
|
|
handle_tc(self)
Handle a translator comment. |
source code
|
|
|
|
handle_gc(self)
Handle a generated comment. |
source code
|
|
|
|
handle_oc(self)
Handle a file:num occurence. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handle_mc(self)
Handle a msgid or msgstr continuation line. |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|