Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ir-parser" disasm error #8

Closed
pfalcon opened this issue May 18, 2015 · 3 comments
Closed

"ir-parser" disasm error #8

pfalcon opened this issue May 18, 2015 · 3 comments

Comments

@pfalcon
Copy link

pfalcon commented May 18, 2015

I'm trying to run tests/common/ply/ir_parser.py (for sample code it contains). I get:

$ PYTHONPATH=../../../src python ir_parser.py
Traceback (most recent call last):
  File "ir_parser.py", line 271, in <module>
    print parse(text)
  File "ir_parser.py", line 256, in parse
    return parser.parse(text, lexer=ir_lexer.lexer)
  File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line 269, in parse
    return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
  File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line 1051, in parseopt_notrack
    tok = self.errorfunc(errtoken)
  File "ir_parser.py", line 233, in p_error
    raise RuntimeError("Syntax error in input: %s" % (repr(p), ))
RuntimeError: Syntax error in input: LexToken(:,':',2,8)

Is there more info about this disassembler/syntax?

@pfalcon pfalcon changed the title "ir" disasm error "ir-parser" disasm error May 18, 2015
@EiNSTeiN-
Copy link
Owner

From the looks of that error, at some point I removed the support for named labels so loc_1: should just read 1:. You can see examples of the syntax in tests, for instance: https://github.com/EiNSTeiN-/decompiler/blob/master/tests/unit/test_ssa.py

@pfalcon
Copy link
Author

pfalcon commented May 18, 2015

That's the conclusion I came to a second ago too ;-). So, with #9 in mind, I may suggest re-adding it, otherwise, fixing ir_parser.py would work too ;-).

@EiNSTeiN-
Copy link
Owner

Fixed by 825e996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants