topazproject / topaz

A high performance ruby, written in RPython
topazruby.com
BSD 3-Clause "New" or "Revised" License
1k stars 84 forks source link

Parse error: ! nil.respond_to? :asdf #799

Closed jstepien closed 11 years ago

jstepien commented 11 years ago
not nil.respond_to? :asdf

is parsed correctly as of f8507a319f945570fa7d41c7189c0c6ab2a6b979, but

! nil.respond_to? :asdf

causes both the translated and untranslated version to break:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/jan/topaz/topaz/__main__.py", line 14, in <module>
    sys.exit(entry_point(sys.argv))
  File "topaz/main.py", line 66, in entry_point
    return _entry_point(space, argv)
  File "topaz/main.py", line 313, in _entry_point
    space.execute(source, filepath=path)
  File "topaz/objspace.py", line 314, in execute
    bc = self.compile(source, filepath, initial_lineno=initial_lineno)
  File "topaz/objspace.py", line 306, in compile
    astnode = self.parse(source, initial_lineno=initial_lineno, symtable=symtable)
  File "topaz/objspace.py", line 292, in parse
    return parser.parse().getast()
  File "topaz/parser.py", line 19, in parse
    return self.parser.parse(l, state=self)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rply/parser.py", line 22, in parse
    current_state = self._reduce_production(t, symstack, statestack, state)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rply/parser.py", line 75, in _reduce_production
    value = p.func(state, targ)
  File "topaz/parser.py", line 704, in expr_bang_command_call
    raise NotImplementedError(p)
NotImplementedError: [<rply.token.Token object at 0x10bb72790>, <topaz.parser.BoxAST object at 0x10ba41950>]