Changeset 904
- Timestamp:
- Jun 11, 2012 5:23:30 PM (11 years ago)
- Location:
- specdomain/src
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
specdomain/src/sphinxcontrib/specdomain.py
r898 r904 49 49 ''', re.VERBOSE) 50 50 51 spec_global_sig_re = re.compile( 52 r'''^ ([\w.]*:)? # module name 53 ([A-Z]\w+) $ # thing name 54 ''', re.VERBOSE) 55 51 56 52 57 spec_var_sig_re = re.compile( … … 63 68 64 69 spec_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 65 134 66 135 … … 180 249 elif self.objtype == 'macro': 181 250 return _('%s (SPEC macro)') % name 251 elif self.objtype == 'global': 252 return _('%s (SPEC global)') % name 182 253 elif self.objtype == 'record': 183 254 return _('%s (SPEC record)') % name … … 387 458 'function': ObjType(l_('function'), 'func'), 388 459 'macro': ObjType(l_('macro'), 'macro'), 460 'global': ObjType(l_('global'), 'global'), 389 461 'record': ObjType(l_('record'), 'record'), 390 462 'module': ObjType(l_('module'), 'mod'), … … 397 469 'module': SpecModule, 398 470 'variable': SpecVariable, 471 'global': SpecVariable, 399 472 'currentmodule': SpecCurrentModule, 400 473 } … … 402 475 'func' : SpecXRefRole(), 403 476 'macro': SpecXRefRole(), 477 'global': SpecXRefRole(), 404 478 'record': SpecXRefRole(), 405 479 'mod': SpecXRefRole(), … … 409 483 'functions' : {}, # fullname -> arity -> (targetname, docname) 410 484 'modules': {}, # modname -> docname, synopsis, platform, deprecated 485 'globals': {}, # ?????????? 411 486 } 412 487 indices = [ -
specdomain/src/test/autodoc.rst
r902 r904 19 19 20 20 .. note:: tba 21 21 .. awk language support requires Pygments 1.5+ 22 22 .. literalinclude:: newuser.mac 23 23 :language: guess 24 24 :linenos: 25 25 -
specdomain/src/test/index.rst
r902 r904 11 11 test_doc 12 12 autodoc 13 13 hints 14 15 16 Objectives 17 ----------- 18 19 A. 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 30 B. Build cross-referenced WWW site and PDF documentation 31 C. Provide a test file for development. 32 D. Provide useful examples in documentation. 33 34 14 35 Indices and tables 15 36 ================== -
specdomain/src/test/testbarrier.mac
r903 r904 207 207 208 208 def show_und' 209 printf("\n%40.40s","Cur ent Undulator Status")209 printf("\n%40.40s","Current Undulator Status") 210 210 ' 211 211
Note: See TracChangeset
for help on using the changeset viewer.