Package rxpy :: Package graph :: Module opcode :: Class Character
[hide private]
[frames] | no frames]

Class Character

source code


Match a single character. Currently the __contains__ method should be used for testing; that will call the BaseAlphabet as required.

How can this be improved?

Instance Methods [hide private]
 
__init__(self, intervals, alphabet, classes=None, inverted=False, complete=False)
Subclasses should pay attention to the relationship between constructor kargs and attributes assumed in .clone.
source code
 
_kargs(self)
Generate a list of arguments used for cloning.
source code
 
append_interval(self, interval) source code
 
append_class(self, class_, label, inverted=False) source code
 
visit(self, visitor, state=None)
The visitor pattern - used to evaluate the graph by an interpreter, for example.
source code
 
invert(self) source code
 
__contains__(self, character) source code
 
__str__(self)
This returns (the illegal) [^] for all and [] for none.
source code
 
__hash__(self)
hash(x)
source code
 
__bool__(self) source code
 
__nonzero__(self) source code
 
simplify(self) source code

Inherited from support.BaseNode: __repr__, clone, concatenate, consumer, deep_eq, size, start

Inherited from support.BaseNode (private): _node_eq

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, intervals, alphabet, classes=None, inverted=False, complete=False)
(Constructor)

source code 
Subclasses should pay attention to the relationship between constructor kargs and attributes assumed in .clone.
Overrides: object.__init__
(inherited documentation)

_kargs(self)

source code 
Generate a list of arguments used for cloning. Subclasses can over-ride this if necessary, but probably shouldn't (instead, they should have attributes that correspond to kargs).
Overrides: support.BaseNode._kargs
(inherited documentation)

visit(self, visitor, state=None)

source code 
The visitor pattern - used to evaluate the graph by an interpreter, for example. Calls back to the visitor via the interface described in rxpy.parser.visitor.Visitor.
Overrides: support.BaseNode.visit
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
This returns (the illegal) [^] for all and [] for none.
Overrides: object.__str__

__hash__(self)
(Hashing function)

source code 
hash(x)
Overrides: object.__hash__
(inherited documentation)