enbiri / unpyc

Automatically exported from code.google.com/p/unpyc
0 stars 0 forks source link

Syntax error at or near `STORE_FAST' token at offset 30 #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

File "C:\Python26\lib\site-packages\unpyc\__init__.py", line 183, in main
    unpyc_file(infile, outstream, showasm, showast)
  File "C:\Python26\lib\site-packages\unpyc\__init__.py", line 120, in 
unpyc_fil
e
    unpyc(version, co, outstream, showasm, showast)
  File "C:\Python26\lib\site-packages\unpyc\__init__.py", line 113, in 
unpyc
    walker.gen_source(ast, customize)
  File "C:\Python26\lib\site-packages\unpyc\Walker.py", line 832, in 
gen_source
    self.print_(self.traverse(ast, isLambda=isLambda))
  File "C:\Python26\lib\site-packages\unpyc\Walker.py", line 362, in 
traverse
    self.preorder(node)
  File "C:\Python26\lib\site-packages\unpyc\spark.py", line 682, in 
preorder
    self.preorder(kid)
  File "C:\Python26\lib\site-packages\unpyc\spark.py", line 682, in 
preorder
    self.preorder(kid)
  File "C:\Python26\lib\site-packages\unpyc\spark.py", line 677, in 
preorder
    self.default(node)
  File "C:\Python26\lib\site-packages\unpyc\Walker.py", line 630, in 
default
    self.engine(table[key], node)
  File "C:\Python26\lib\site-packages\unpyc\Walker.py", line 598, in engine
    self.preorder(node[entry[arg]])
  File "C:\Python26\lib\site-packages\unpyc\spark.py", line 675, in 
preorder
    func(node)
  File "C:\Python26\lib\site-packages\unpyc\Walker.py", line 489, in 
n_mkfunc
    self.make_function(node, isLambda=0)
  File "C:\Python26\lib\site-packages\unpyc\Walker.py", line 733, in 
make_functi
on
    ast = self.build_ast(code._tokens, code._customize)
  File "C:\Python26\lib\site-packages\unpyc\Walker.py", line 843, in 
build_ast
    raise ParserError(e, tokens)
unpyc.Walker.ParserError: --- This code section failed: ---
0       LOAD_CONST        ''
3       STORE_FAST        'i1'
6       BUILD_LIST_0      ''
9       STORE_FAST        'result'
12      SETUP_LOOP        '115'
15      LOAD_FAST         'where'
18      LOAD_ATTR         'find'
21      LOAD_FAST         'start'
24      LOAD_FAST         'i1'
27      CALL_FUNCTION_2   ''
30      STORE_FAST        'i0'
33      LOAD_FAST         'where'
36      LOAD_ATTR         'find'
39      LOAD_FAST         'end'
42      LOAD_FAST         'i0'
45      CALL_FUNCTION_2   ''
48      STORE_FAST        'i1'
51      LOAD_FAST         'i0'
54      LOAD_CONST        -1
57      COMPARE_OP        '=='
60      JUMP_IF_TRUE      '76'
63      POP_TOP           ''
64      LOAD_FAST         'i1'
67      LOAD_CONST        -1
70      COMPARE_OP        '=='
73      JUMP_IF_FALSE     '81'
76_0    COME_FROM         ''
76      POP_TOP           ''
77      BREAK_LOOP        ''
78      JUMP_FORWARD      '82'
81_0    COME_FROM         ''
81      POP_TOP           ''
82_0    COME_FROM         ''
82      LOAD_FAST         'result'
85      LOAD_ATTR         'append'
88      LOAD_FAST         'where'
91      LOAD_FAST         'i0'
94      LOAD_GLOBAL       'len'
97      LOAD_FAST         'start'
100     CALL_FUNCTION_1   ''
103     BINARY_ADD        ''
104     LOAD_FAST         'i1'
107     SLICE+3           ''
108     CALL_FUNCTION_1   ''
111     POP_TOP           ''
112     JUMP_ABSOLUTE     '15'
115_0   COME_FROM         ''
115     LOAD_FAST         'result'
118     RETURN_VALUE      ''

Syntax error at or near `STORE_FAST' token at offset 30

how can I fix it?

Original issue reported on code.google.com by anver...@gmail.com on 13 Mar 2010 at 6:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have a similar, but slightly different, problem with list comprehensions.  It 
looks like your code could be caused by the poor list comp support...

Original comment by lok...@gmail.com on 12 Aug 2010 at 7:15