Changeset 530

Show
Ignore:
Timestamp:
02/25/08 00:02:02 (4 months ago)
Author:
athomas
Message:

cly: Some more doc updates for the 1.0 release.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cly/trunk/doc/developers-guide.rst

    r529 r530  
    88 
    99CLY provides a convenient means to easily build command-line interfaces. This 
    10 is achieved by defining a CLY grammar in either Python or XML then 
     10is achieved by defining a CLY grammar in either XML or Python then 
    1111constructing a CLY parser object from the grammar. The parser parses user 
    12 input against the grammar, executes callbacks, provides completion, and so on. 
     12input against the grammar, executes actions, provides completion, and so on. 
    1313 
    1414A built-in terminal interface based on readline is provided. 
     
    381381    <node name="echo"> 
    382382      <variable name="text" pattern=".+"> 
    383         <action callback="echo()"/> 
     383        <action callback="echo(text)"/> 
    384384      </variable> 
    385385    </node> 
     
    444444  </grammar> 
    445445 
    446 This evaluation can also be forced by using the ``eval`` XML namespace: 
    447  
    448 .. code-block:: xml 
    449  
    450   <?xml version="1.0"?> 
    451   <grammar xmlns="http://swapoff.org/cly/xml" xmlns:eval="http://swapoff.org/cly/xml-eval"> 
    452     <node eval:help="'HELLO WORLD'.title()"/> 
    453       ... 
    454     </node> 
    455   </grammar> 
    456  
     446Extra attribute conversions can be provided to the ``XMLGrammar`` by passing  
     447a dictionary of attribute names to type conversion functions, as the 
     448``attr_type_map`` keyword argument. 
    457449 
    458450Parsing