Changeset 919


Ignore:
Timestamp:
Jun 12, 2012 5:10:09 PM (10 years ago)
Author:
jemian
Message:

refs #8, rest for the night

Location:
specdomain/src/specdomain
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • specdomain/src/specdomain/doc/index.rst

    r912 r919  
    1111   :maxdepth: 2
    1212
     13   objectives
    1314   reference
     15   changes
     16   license
    1417
    1518* :ref:`genindex`
     
    2023
    2124.. include:: ../AUTHORS
    22 
    23 ChangeLog
    24 =========
    25 
    26 .. include:: ../CHANGES
    27 
    28 
    29 License
    30 =======
    31 
    32 .. literalinclude:: ../LICENSE
    33     :linenos:
  • specdomain/src/specdomain/sphinxcontrib/specdomain.py

    r918 r919  
    392392    label = 'SPEC'
    393393    object_types = {
    394         'function': ObjType(l_('function'), 'func'),
    395         'macro':    ObjType(l_('macro'),    'macro'),
    396         'global':   ObjType(l_('global'),   'global'),
    397         'record':   ObjType(l_('record'),   'record'),
    398         'module':   ObjType(l_('module'),   'mod'),
    399         'variable': ObjType(l_('variable'), 'var'),
     394        'def':      ObjType(l_('def'),      'def'),
     395        'rdef':     ObjType(l_('rdef'),     'rdef'),
     396        'cdef':     ObjType(l_('cdef'),     'cdef'),
     397        #'record':   ObjType(l_('record'),   'record'),
     398        #'module':   ObjType(l_('module'),   'mod'),
     399        #'variable': ObjType(l_('variable'), 'var'),
    400400    }
    401401    directives = {
    402         'function':      SpecObject,
    403         'macro':         SpecObject,
    404         'record':        SpecObject,
    405         'module':        SpecModule,
    406         'variable':      SpecVariable,
    407         'global':        SpecVariable,
    408         'currentmodule': SpecCurrentModule,
     402        'def':      SpecObject,
     403        'rdef':     SpecObject,
     404        'cdef':     SpecObject,
     405        #'module':        SpecModule,
     406        #'variable':      SpecVariable,
     407        #'global':        SpecVariable,
     408        #'currentmodule': SpecCurrentModule,
    409409    }
    410410    roles = {
    411         'func' :  SpecXRefRole(),
    412         'macro':  SpecXRefRole(),
    413         'global': SpecXRefRole(),
    414         'record': SpecXRefRole(),
    415         'mod':    SpecXRefRole(),
     411        'def' :     SpecXRefRole(),
     412        'rdef':     SpecXRefRole(),
     413        'cdef':    SpecXRefRole(),
     414        #'record': SpecXRefRole(),
     415        #'mod':    SpecXRefRole(),
    416416    }
    417417    initial_data = {
  • specdomain/src/specdomain/test/conf.py

    • Property svn:eol-style set to native
    • Property svn:keywords set to Id
  • specdomain/src/specdomain/test/index.rst

    r912 r919  
    1818
    1919* :ref:`genindex`
    20 * :ref:`modindex`
    2120* :ref:`search`
    2221
     22*documentation built*:
     23|today|
  • specdomain/src/specdomain/test/test_doc.rst

    r912 r919  
     1.. $Id$
     2
    13===============
    24Acceptance Test
     
    57If all links are valid, test is done successfully.
    68
    7 Global (spec module's contents)
    8 ===============================
    99
    10 .. spec:function:: function_out_of_module
     10Directives
     11==========
    1112
    12 .. spec:module:: test_module
     13A *directive* can be used to define the anchor point of a reference.
     14Index entries will point back to the *directive*.  If the item
     15defined in the directive is not obtained from the source code,
     16then define it here, like these.  All of these directives should
     17have entries in an Index.
    1318
    14 .. define various tests
     19SPEC Macros
     20^^^^^^^^^^^
     21
     22.. spec:def:: example_defined_macro [arg1 [arg2 [...]]]
     23
     24   :param arg1: anything
     25   :type  arg1: str
     26   :param arg2: another thing
     27
     28.. spec:rdef:: example_runtime_defined_macro content
     29
     30   :param content: SPEC code (single or multi-line but typically a single macro)
     31   :type  content: str
     32
     33.. spec:cdef:: example_chained_macro(identifier, content, placement)
     34
     35   :param identifier: one-word name for this macro chain
     36   :type  identifier: str
     37   :param content: SPEC code to be inserted (typically a single macro)
     38   :type  content: str
     39   :param placement: see the manual
     40   :type  placement: str
     41
     42SPEC Variables
     43^^^^^^^^^^^^^^
     44
     45* global variable declaration:
     46* local variable declaration:
     47* array variable declaration:
     48
     49Python example
     50^^^^^^^^^^^^^^
     51
     52.. py:function:: the_time(t = None)
     53
     54   :param t: time_t object or None (defaults to ``now()``)
     55   :type  t: str
     56
     57
     58Roles
     59=====
     60
     61A *role* refers to a *directive* (makes a link to a *directive* defined elsewhere).
     62Each of these items should produce a valid link.
     63
     64SPEC Macros
     65^^^^^^^^^^^
     66
     67* macro definition: :spec:def:`example_defined_macro`
     68* runtime-defined macro definition: :spec:rdef:`example_runtime_defined_macro`
     69* chained macro definition: :spec:cdef:`example_chained_macro`
     70
     71SPEC Variables
     72^^^^^^^^^^^^^^
     73
     74* global variable declaration:
     75* local variable declaration:
     76* array variable declaration:
     77
     78Python example
     79^^^^^^^^^^^^^^
     80
     81See the python method :py:func:`the_time()` (defined above)
Note: See TracChangeset for help on using the changeset viewer.