 }
 
 public extension Token {
+    /**
+     Creates a rule which will generate this token if matched
+     
+     - Parameter rule:The rule which must be matched in order to generate the tokekn
+     - Returns: An instance of the rule
+     */
     func `if`(_ rule:BehaviouralRule)->BehaviouralRule{
         if rule.behaviour.cardinality == .one {
             return rule.instanceWith(behaviour: Behaviour(.structural(token: self), cardinality: rule.behaviour.cardinality, negated: rule.behaviour.negate, lookahead: rule.behaviour.lookahead), annotations: rule.annotations)

        return Precidence.annotation(annotations).modify(self)
    }
    
    public var one : BehaviouralRule{
        return newBehaviour(cardinality: 1...1)
    }

    public var oneOrMore : BehaviouralRule{
        return newBehaviour(cardinality: 1...)
    }

    public var zeroOrMore : BehaviouralRule{
        return newBehaviour(cardinality: 0...)
    }

    public var optional : BehaviouralRule {
        return newBehaviour(cardinality: 0...1)
    }
}

public prefix func >>(rule:BehaviouralRule)->BehaviouralRule{
    if rule.behaviour.cardinality == .one {
        return rule.newBehaviour(nil, negated: nil, lookahead: true)

    return Precidence.lookahead(true).modify(rule)
}

/**
 Creates a new instance of the rule which negates its match.
 Note that negate does not "toggle", that is !!rule != rule
 
 // Creates a negated version of of the rule
 let notLetter = !CharacterSet.letters.skip()
 
 - Parameter rule:The rule to apply to
 - Returns: A new version of the rule
 */
public prefix func !(rule:BehaviouralRule)->BehaviouralRule{
    if rule.behaviour.cardinality == .one {
        return rule.newBehaviour(nil, negated: true, lookahead: nil)
