a utility class: dictionary of prefixes
should be generalized to allow upcasing of keyword matches
Methods
|
|
Dump
__getitem__
__init__
__setitem__
hasPrefix
has_key
|
|
Dump
|
Dump ( self )
|
|
__getitem__
|
__getitem__ ( self, key )
|
|
__init__
|
__init__ ( self, caseInsensitive=0 )
Evaluate determines whether rules should be evaluated
after reductions. Context is an argument passed to the
list reduction function
|
|
__setitem__
|
__setitem__ (
self,
key,
value,
)
set item assumes value has correct case already, if case sensitive
|
|
hasPrefix
|
hasPrefix (
self,
String,
StartPosition,
punctuationlist,
)
if String has a registered keyword at start position
return its canonical representation and offset, else 0
keywords that are not punctuations should be
recognized only if followed
by a punctuation or whitespace char
|
|
has_key
|
has_key ( self, key )
|
|