Issue1116

classification
Title: parser NPE on dotted (more than 1) attribute decorators
Type: crash Severity: major
Components: Core Versions: 2.5alpha1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, pjenvey
Priority: Keywords:

Created on 2008-08-30.20:57:52 by pjenvey, last changed 2008-08-31.01:05:35 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
dotted_decorator.py pjenvey, 2008-08-30.20:57:51
Messages
msg3461 (view) Author: Philip Jenvey (pjenvey) Date: 2008-08-30.20:57:51
A decorator with 1 dot parses ok:

@test_support.run_with_locale('LC_ALL', '')
def foo():
    print 'foo'

but NPEs with 2 dots:

@test.test_support.run_with_locale('LC_ALL', '')
def bar():
    print 'bar'

Traceback (most recent call last):
  (no code object) at line 0
java.lang.NullPointerException
	at 
org.python.antlr.GrammarActions.makeDottedAttr(GrammarActions.java:217)
	at 
org.python.antlr.PythonParser.dotted_attr(PythonParser.java:931)
	at 
org.python.antlr.PythonParser.decorator(PythonParser.java:1069)
	at 
org.python.antlr.PythonParser.decorators(PythonParser.java:1245)
	at org.python.antlr.PythonParser.funcdef(PythonParser.java:1341)
	at 
org.python.antlr.PythonParser.compound_stmt(PythonParser.java:6268)
	at org.python.antlr.PythonParser.stmt(PythonParser.java:2360)
	at 
org.python.antlr.PythonParser.file_input(PythonParser.java:625)
	at 
org.python.antlr.ModuleParser.file_input(ModuleParser.java:39)
	at org.python.core.ParserFacade.parse(ParserFacade.java:114)
	at org.python.core.Py.compile_flags(Py.java:1669)
	at 
org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:155)
	at org.python.util.jython.run(jython.java:224)
	at org.python.util.jython.main(jython.java:111)

NullPointerException: java.lang.NullPointerException

Example attached
msg3462 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2008-08-31.01:05:34
Fixed in r5276
History
Date User Action Args
2008-08-31 01:05:35fwierzbickisetstatus: open -> closed
resolution: fixed
messages: + msg3462
2008-08-30 20:57:52pjenveycreate