Module yeanpypa :: Class NoneOf
[show private | hide private]
[frames | no frames]

Class NoneOf

Rule --+
       |
      NoneOf


Match if the next character is NOT in the given set.
Method Summary
  __init__(self, set)
Initialize the rule with the given set.
  __str__(self)
Return a human readable representation of the rule.
  match(self, input_reader)
Match the rule against the input.
    Inherited from Rule
  __add__(self, second_rule)
Define an operator to concat two rules.
  __or__(self, second_rule)
Define an operator to concat two rules via OR.
  callAction(self, param)
Call the action attached to this rule.
  hide(self)
Tell this rule to not produce any token output.
  returnToken(self, token)
Helper function encapsulating the hide()-functionality.
  setAction(self, action)
Set the action to execute on a rule match.

Class Variable Summary
    Inherited from Rule
NoneType action = None                                                                  
bool hide_token = False

Method Details

__init__(self, set)
(Constructor)

Initialize the rule with the given set.
Parameters:
set - The char set the rule should NOT match on.
           (type=str)

__str__(self)
(Informal representation operator)

Return a human readable representation of the rule.

@return A string describing the rule

match(self, input_reader)

Match the rule against the input.
Parameters:
input_reader - The input reader to read the next character from.
           (type=InputReader)
Returns:
The matched char not in the set.
Overrides:
yeanpypa.Rule.match

Generated by Epydoc 2.1 on Sat Feb 10 16:11:43 2007 http://epydoc.sf.net