Changeset 439
- Timestamp:
- 05/27/07 23:23:25 (2 years ago)
- Files:
-
- cly/trunk/doc/developers-guide.rst (modified) (3 diffs)
- cly/trunk/doc/tutorial.rst (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cly/trunk/doc/developers-guide.rst
r438 r439 40 40 This CLY grammar is equivalent to the following EBNF-style grammar:: 41 41 42 ONE := 'one' (ONE_ONE | ONE_TWO) 42 TOP := ONE | TWO 43 ONE := 'one', (ONE_ONE | ONE_TWO) 43 44 TWO := 'two' 44 45 ONE_ONE := 'one_one' … … 156 157 hostname=Variable('Host name')( 157 158 Action('Add host', add_host, valid=lambda context: 'ip' in context.vars), 158 Traversals(0)(159 159 ip=Node('IP address', traversals=0)( 160 160 ip=IP('IP address', traversals=0)( … … 171 171 ) 172 172 173 Which corresponds to something like this command syntax:: 174 175 add <hostname> ip <ip> [ip <ip> [ip <ip> ...]] [comment <comment>] 176 173 177 .. _API documentation: http://swapoff.org/cly/docs cly/trunk/doc/tutorial.rst
r438 r439 159 159 Variables can have extra intelligence built into them to customise their 160 160 behaviour. To make life a bit easier for the end developer a selection of 161 variables are available in ``cly. variables``. This includes a ``File`` class162 which we will use to provide file completion .161 variables are available in ``cly.builder``. This includes a ``File`` class 162 which we will use to provide file completion: 163 163 164 164 .. code-block:: python
