[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24277 - monkey/trunk/seaspider
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24277 - monkey/trunk/seaspider |
Date: |
Thu, 11 Oct 2012 19:26:20 +0200 |
Author: teichm
Date: 2012-10-11 19:26:20 +0200 (Thu, 11 Oct 2012)
New Revision: 24277
Modified:
monkey/trunk/seaspider/db_convert
Log:
scope_end => stack
Modified: monkey/trunk/seaspider/db_convert
===================================================================
--- monkey/trunk/seaspider/db_convert 2012-10-11 16:36:00 UTC (rev 24276)
+++ monkey/trunk/seaspider/db_convert 2012-10-11 17:26:20 UTC (rev 24277)
@@ -41,6 +41,8 @@
# commit changes
conn.commit()
+scope_end = []
+
lines = args.infile.readlines(10000)
while lines:
for line in lines:
@@ -51,16 +53,18 @@
pass
elif rowtype == 'Scope':
(rowfile, scoperange) = remainder.split(':', 1)
- (scope_begin, scope_end) = scoperange.split(' ', 1)
+ (scope_begin, scope_end_tmp) = scoperange.split(' ', 1)
scope_begin = int(scope_begin)
- scope_end = int(scope_end) + 1
- print 'entered new scope: ', scope_begin, '-', scope_end
+ scope_end.append(int(scope_end_tmp) + 1)
+ print 'entered new scope: ', scope_begin, '-',
scope_end[-1]
elif rowtype == 'Expression':
(rowfile, rowexpr) = remainder.split(':', 1)
(lineno, iscall, expression) = rowexpr.split(' ', 2)
lineno = int(lineno)
iscall = int(iscall)
- vals = (rowfile, expression, lineno, scope_end, iscall)
+ if lineno > scope_end[-1]:
+ scope_end.pop()
+ vals = (rowfile, expression, lineno, scope_end[-1],
iscall)
c.execute('INSERT INTO Expression VALUES
(NULL,?,?,?,?,?)', vals)
else:
print 'unknown entry type: ' + rowtype
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24277 - monkey/trunk/seaspider,
gnunet <=