Changeset 548

Show
Ignore:
Timestamp:
06/10/08 09:22:39 (6 months ago)
Author:
athomas
Message:

Renamed Group node to Apply. Closes #60.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cly/trunk/cly/builder.py

    r547 r548  
    2222 
    2323 
    24 __all__ = ['Node', 'Alias', 'Group', 'Action', 'Variable', 'Grammar', 
     24__all__ = ['Node', 'Alias', 'Apply', 'Action', 'Variable', 'Grammar', 
    2525           'XMLGrammar', 'Help', 'LazyHelp', 'Word', 'Keyword', 'String', 
    2626           'URI', 'LDAPDN', 'Integer', 'Float', 'IP', 'Hostname', 'Host', 
     
    404404 
    405405 
    406 class Group(Node): 
     406class Apply(Node): 
    407407    """Apply settings to all ancestor nodes. 
    408408 
    409     Terminates application of settings on any deeper Group node. 
     409    Terminates application of settings on any deeper Apply node. 
    410410 
    411411    Before applying settings: 
     
    417417    And after applying settings: 
    418418 
    419     >>> apply = Group(traversals=0)(top) 
     419    >>> apply = Apply(traversals=0)(top) 
    420420    >>> [node.traversals for node in top.walk()] 
    421421    [0, 0, 0, 0] 
     
    431431 
    432432        def stop_on_ancestors(node): 
    433             return node is self or not isinstance(node, Group
     433            return node is self or not isinstance(node, Apply
    434434 
    435435        for child in self.walk(predicate=stop_on_ancestors): 
  • cly/trunk/cly/test.py

    r527 r548  
    5959        <grammar> 
    6060            <node name='echo'> 
    61                 <group traversals='0'> 
     61                <apply traversals='0'> 
    6262                    <variable name='text'> 
    6363                        <alias target='../../*'/> 
    6464                        <action callback='echo(text)'/> 
    6565                    </variable> 
    66                 </group
     66                </apply
    6767            </node> 
    6868        </grammar> 
  • cly/trunk/doc/developers-guide.rst

    r530 r548  
    415415  <grammar xmlns="http://swapoff.org/cly/xml"> 
    416416    <node name="echo"> 
    417       <group traversals="0"> 
     417      <apply traversals="0"> 
    418418        <variable name="text"> 
    419419          <alias target="/echo/*"/> 
    420420          <action callback="echo(text)"/> 
    421421        </variable> 
    422       </group
     422      </apply
    423423    </node> 
    424424  </grammar>