[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24438 - monkey/trunk/seaspider
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24438 - monkey/trunk/seaspider |
Date: |
Sat, 20 Oct 2012 18:34:48 +0200 |
Author: teichm
Date: 2012-10-20 18:34:48 +0200 (Sat, 20 Oct 2012)
New Revision: 24438
Modified:
monkey/trunk/seaspider/seasp2_convert
Log:
seasp2_convert small fixes
Modified: monkey/trunk/seaspider/seasp2_convert
===================================================================
--- monkey/trunk/seaspider/seasp2_convert 2012-10-20 10:39:33 UTC (rev
24437)
+++ monkey/trunk/seaspider/seasp2_convert 2012-10-20 16:34:48 UTC (rev
24438)
@@ -70,24 +70,24 @@
scope_end.append(32767)
parameters = deque()
prevtype = ""
+ seafile_lineno = 0
try:
infile = open(filename, 'r')
- print '======'
print 'reading file: ',filename
except IOError:
- print '======'
print 'could not read file: ',filename
infile.close()
return
(tmp, ext) = os.path.splitext(filename)
- (crap, filename) = os.path.split(tmp)
- filename += '.c'
+ (crap, cfilename) = os.path.split(tmp)
+ cfilename += '.c'
lines = infile.readlines(10000)
while lines:
for line in lines:
+ seafile_lineno += 1
try:
(rowtype, remainder) = line.split(': ', 1)
except ValueError:
@@ -95,7 +95,7 @@
if rowtype == 'SystemGlobal':
(rowfile, rowglob) = remainder.split(':', 1)
(lineno, globalvar) = rowglob.split(' ', 1)
- vals = (filename, globalvar, 0, 32767, 0)
+ vals = (cfilename, globalvar, 0, 32767, 0)
sql_cur.execute('INSERT INTO Expression VALUES
(NULL,?,?,?,?,?)', vals)
elif rowtype == 'Global':
(rowfile, rowglob) = remainder.split(':', 1)
@@ -124,7 +124,7 @@
break
vals = (rowfile, para, lineno,
scope_end[-1], 0)
sql_cur.execute('INSERT INTO Expression
VALUES (NULL,?,?,?,?,?)', vals)
- print 'entered new scope: ', scope_begin, '-',
scope_end[-1]
+# print 'entered new scope: ', scope_begin, '-',
scope_end[-1]
elif rowtype == 'Expression':
(rowfile, rowexpr) = remainder.split(':', 1)
(lineno, iscall, expression) = rowexpr.split('
', 2)
@@ -135,7 +135,7 @@
vals = (rowfile, expression, lineno,
scope_end[-1], iscall)
sql_cur.execute('INSERT INTO Expression VALUES
(NULL,?,?,?,?,?)', vals)
else:
- print 'unknown entry type: ', rowtype
+ print 'unknown entry type: ', filename, ' on
line ', seafile_lineno
prevtype = rowtype
sql_conn.commit()
lines = infile.readlines(10000)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24438 - monkey/trunk/seaspider,
gnunet <=