Back to index

python3.2  3.2.2
Namespaces | Functions | Variables
fixcid.py File Reference

Go to the source code of this file.

Namespaces

namespace  fixcid

Functions

def fixcid.usage
def fixcid.main
def fixcid.wanted
def fixcid.recursedown
def fixcid.fix
def fixcid.initfixline
def fixcid.fixline
def fixcid.setdocomments
def fixcid.setreverse
def fixcid.addsubst

Variables

 fixcid.err = sys.stderr.write
 fixcid.dbg = err
 fixcid.rep = sys.stdout.write
string fixcid.Wanted = '^[a-zA-Z0-9_]+\.[ch]$'
 fixcid.f = sys.stdin
 dbg('fix(r)
' % (filename,))
 fixcid.g = sys.stdout
tuple fixcid.tempname = os.path.join(head, '@' + tail)
int fixcid.lineno = 0
tuple fixcid.line = f.readline()
 else: print 'Substituting in comment:', print found, '-->', subst print 'Line:', line,
tuple fixcid.nextline = f.readline()
tuple fixcid.newline = fixline(line)
tuple fixcid.statbuf = os.stat(filename)
string fixcid.Identifier = '\(struct \)?[a-zA-Z_][a-zA-Z0-9_]+'
string fixcid.String = '"\([^\n\\"]\|\\\\.\)*"'
string fixcid.Char = '\'\([^\n\\\']\|\\\\.\)*\''
string fixcid.CommentStart = '/\*'
string fixcid.CommentEnd = '\*/'
string fixcid.Hexnumber = '0[xX][0-9a-fA-F]*[uUlL]*'
string fixcid.Octnumber = '0[0-7]*[uUlL]*'
string fixcid.Decnumber = '[1-9][0-9]*[uUlL]*'
string fixcid.Intnumber = '\|'
string fixcid.Exponent = '[eE][-+]?[0-9]+'
string fixcid.Pointfloat = '\([0-9]+\.[0-9]*\|\.[0-9]+\)\('
string fixcid.Expfloat = '[0-9]+'
string fixcid.Floatnumber = '\|'
string fixcid.Number = '\|'
tuple fixcid.OutsideComment = (Identifier, Number, String, Char, CommentStart)
string fixcid.OutsideCommentPattern = '('
tuple fixcid.OutsideCommentProgram = re.compile(OutsideCommentPattern)
tuple fixcid.InsideComment = (Identifier, Number, CommentEnd)
string fixcid.InsideCommentPattern = '('
tuple fixcid.InsideCommentProgram = re.compile(InsideCommentPattern)
int fixcid.i = 0
 print '-->', repr(line)
tuple fixcid.found = Program.group(0)
 fixcid.Program = InsideCommentProgram
 if Program is InsideCommentProgram: print '...', else: print ' ', print found
tuple fixcid.n = len(found)
list fixcid.subst = Dict[found]
 print 'Ignored in comment:', print found, '-->', subst print 'Line:', line,
int fixcid.Docomments = 0
int fixcid.Reverse = 0
dictionary fixcid.Dict = {}
dictionary fixcid.NotInComment = {}