Changeset 904


Ignore:
Timestamp:
Jun 11, 2012 5:23:30 PM (11 years ago)
Author:
jemian
Message:

work-in-progress

Location:
specdomain/src
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • specdomain/src/sphinxcontrib/specdomain.py

    r898 r904  
    4949          ''', re.VERBOSE)
    5050
     51spec_global_sig_re = re.compile(
     52    r'''^ ([\w.]*:)?             # module name
     53          ([A-Z]\w+) $           # thing name
     54          ''', re.VERBOSE)
     55
    5156
    5257spec_var_sig_re = re.compile(
     
    6368
    6469spec_paramlist_re = re.compile(r'([\[\],])')  # split at '[', ']' and ','
     70
     71
     72
     73#### re parts that recognize the start of a macro definition (def or rdef)
     74# # ^
     75# # [\s]*
     76# # [r]?
     77# # def
     78# # [\s]+
     79# # ([a-zA-Z_][\w]*)
     80# #
     81#### re parts that recognize the start of a chained macro definition (cdef)
     82# # ^
     83# # [\s]*
     84# # cdef
     85# # \(
     86#
     87# def _ascan ''
     88#
     89# kohzuMove_PV = "32ida:KohzuPutBO"
     90# Und_Delay = 0.1
     91#
     92# def kohzuE_cmd(mne,key,p1) '{
     93#      if (key == "set_position") {
     94#       return
     95#      }
     96# }'
     97#
     98# def show_und'
     99#    printf("\n%40.40s","Curent Undulator Status")
     100# '
     101#
     102#   # cleanup macro for ^C usage
     103#   rdef _cleanup3 \'resetUSAXS\'
     104#   rdef _cleanup3 \'\'
     105#      cdef("Fheader", fheader,  "UCOL", 0x20)
     106#      rdef Flabel \'""\'
     107
     108
     109#### re parts that recognize a global variable declaration
     110# ^                                    # start of line
     111# ([\s]*)                              # optional preceding white space
     112# global                               # "global" declaration
     113# ([\s]+[@]?[a-zA-Z_][\w]*(\[\])?)+    # one or more variable names
     114# ([\s]+#.*)*                          # optional comment
     115# $                                    # end of line
     116
     117# global  BCDA_GM[]
     118#
     119#    global    billy[]
     120#    global    9billy[]
     121#    global    _billy[]
     122#
     123# global kohzu_PV kohzuMV_PV UND_PV Und_Off UNDE_TRACK_ON
     124# global       kohzuStop_PV kohzuMode_PV      kohzuMove_PV
     125# global CCD_PREFIX            # EPICS PV for CCD server
     126# global CCD_OVERHEAD_SECS        # readout time
     127# global CCD_OVERHEAD_SECS_MEASURED   # measured readout time
     128#
     129#     global @A_name[] @B_name[]
     130#        unglobal @A_name
     131#        unglobal @B_name
     132# global CCD_DARK_NUM CCDDARK CCD_THROW
     133# global MULTI_IMGS # useful 8-ID's imm fileformat; currently not used
    65134
    66135
     
    180249        elif self.objtype == 'macro':
    181250            return _('%s (SPEC macro)') % name
     251        elif self.objtype == 'global':
     252            return _('%s (SPEC global)') % name
    182253        elif self.objtype == 'record':
    183254            return _('%s (SPEC record)') % name
     
    387458        'function': ObjType(l_('function'), 'func'),
    388459        'macro':    ObjType(l_('macro'),    'macro'),
     460        'global':   ObjType(l_('global'),   'global'),
    389461        'record':   ObjType(l_('record'),   'record'),
    390462        'module':   ObjType(l_('module'),   'mod'),
     
    397469        'module':        SpecModule,
    398470        'variable':      SpecVariable,
     471        'global':        SpecVariable,
    399472        'currentmodule': SpecCurrentModule,
    400473    }
     
    402475        'func' :  SpecXRefRole(),
    403476        'macro':  SpecXRefRole(),
     477        'global': SpecXRefRole(),
    404478        'record': SpecXRefRole(),
    405479        'mod':    SpecXRefRole(),
     
    409483        'functions' : {}, # fullname -> arity -> (targetname, docname)
    410484        'modules': {},    # modname -> docname, synopsis, platform, deprecated
     485        'globals': {},    # ??????????
    411486    }
    412487    indices = [
  • specdomain/src/test/autodoc.rst

    r902 r904  
    1919
    2020.. note:: tba
    21 
     21.. awk language support requires Pygments 1.5+
    2222.. literalinclude:: newuser.mac
    2323        :language: guess
    2424        :linenos:
    25 
     25       
  • specdomain/src/test/index.rst

    r902 r904  
    1111   test_doc
    1212   autodoc
    13    
     13   hints
     14
     15
     16Objectives
     17-----------
     18
     19A. Document SPEC macro source code files
     20
     21  #. macro definitions (def, rdef, and cdef)
     22  #. function definitions
     23  #. global variable definitions
     24  #. local variable definitions
     25  #. array variable definitions
     26  #. constant definitions
     27  #. ReST-formatted comments (usually contain API or usage info)
     28  #. optional source code highlighting
     29 
     30B. Build cross-referenced WWW site and PDF documentation
     31C. Provide a test file for development.
     32D. Provide useful examples in documentation.
     33
     34
    1435Indices and tables
    1536==================
  • specdomain/src/test/testbarrier.mac

    r903 r904  
    207207
    208208def show_und'
    209    printf("\n%40.40s","Curent Undulator Status")
     209   printf("\n%40.40s","Current Undulator Status")
    210210'
    211211
Note: See TracChangeset for help on using the changeset viewer.