Functions | |
| def | main |
| def | parseDir |
| def | parseFile |
| def | parseSource |
| def | walkAst |
| def | writeIndex |
Variables | |
| string | __author__ = "Dean Hall" |
| string | __copyright__ = "Copyright 2006 Dean Hall. See LICENSE for details." |
| string | __date__ = "2007/12/25" |
| string | __version__ = "0.3" |
| string | __usage__ |
| string | MARK_FILE = "\t@" |
| string | MARK_FUNC_DEF = "\t$" |
| string | MARK_FUNC_CALL = "\t`" |
| string | MARK_FUNC_END = "\t}" |
| string | MARK_INCLUDE = "\t~<" |
| string | MARK_ASGN = "\t=" |
| string | MARK_CLASS = "\tc" |
| string | MARK_GLOBAL = "\tg" |
| string | MARK_FUNC_PARM = "\tp" |
| tuple | tok_name_lookup = dict((v,k) for k,v in token.tok_name.iteritems()) |
| list | TOK_NEWLINE = tok_name_lookup["NEWLINE"] |
| list | TOK_NAME = tok_name_lookup["NAME"] |
| list | TOK_LPAR = tok_name_lookup["LPAR"] |
| list | TOK_ENDMARKER = tok_name_lookup["ENDMARKER"] |
| list | TOK_INDENT = tok_name_lookup["INDENT"] |
| list | TOK_DEDENT = tok_name_lookup["DEDENT"] |
| tuple | sym_name_lookup = dict((v,k) for k,v in symbol.sym_name.iteritems()) |
| list | SYM_TRAILER = sym_name_lookup["trailer"] |
| list | SYM_VARARGSLIST = sym_name_lookup["varargslist"] |
| kwlist = keyword.kwlist | |
| int | latestnewline = 1 |
| string | latestsymbol = "" |
| string | latesttoken = "" |
| string | prevtoken = "" |
| string | mark = "" |
| infuncdef = False | |
| int | indentcount = 0 |
2007/12/25: Improvements contributed by K. Rader of Google:
| def pycscope::main | ( | void | ) |
Parse command line args and act accordingly.
| def pycscope::parseDir | ( | basepath, | ||
| relpath, | ||||
| indexbuff, | ||||
| recurse, | ||||
| fnamesbuff | ||||
| ) |
Parses all files in the directory and recurses into subdirectories if requested.
| def pycscope::parseFile | ( | basepath, | ||
| relpath, | ||||
| indexbuff, | ||||
| fnamesbuff | ||||
| ) |
Parses a source file and puts the resulting index into the buffer.
| def pycscope::parseSource | ( | sourcecode, | ||
| indexbuff | ||||
| ) |
Parses python source code and puts the resulting index into the buffer.
| def pycscope::walkAst | ( | astlist, | ||
| indexbuff | ||||
| ) |
Scan the AST for tokens, write out index lines.
| def pycscope::writeIndex | ( | basepath, | ||
| indexfn, | ||||
| indexbuff, | ||||
| fnamesbuff | ||||
| ) |
Write the index buffer to the output file.
| string pycscope::__usage__ |
Initial value:
"""Usage: pycscope.py [-R] [-f reffile] [-i srclistfile] [files ...] -R Recurse directories for files. -f reffile Use reffile as cross-ref file name instead of cscope.out. -i srclistfile Use a file that contains a list of source files to scan."""
1.5.9