Title: PythonTree.getCharStopIndex() does not include the last character for FunctionDef
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, pjenvey, waves2d
Priority: normal Keywords:

Created on 2010-12-13.10:56:56 by waves2d, last changed 2013-02-19.23:29:33 by fwierzbicki.

File name Uploaded Description Edit Remove waves2d, 2010-12-23.06:03:33
unnamed waves2d, 2010-12-23.06:03:33
msg6276 (view) Author: Sampathkumar R (waves2d) Date: 2010-12-13.10:56:55
The getCharStopIndex method in org.python.antlr.PythonTree is missing the last character while getting the count for a FunctionDef.
This happens only when there are no more statements after the method definition is finished. It appears to be a End Of File handling issue.
msg6291 (view) Author: Philip Jenvey (pjenvey) Date: 2010-12-22.20:15:51
Can you provide an example of the problem, how to reproduce it?
msg6294 (view) Author: Sampathkumar R (waves2d) Date: 2010-12-23.06:03:33

In the attached zip, have a look at and  
The has two methods method1 and method2. getCharStopIndex  
gets the caret position of the first method properly but it fails to  
get that of second method; it will always be one less than the  
expected value. This happens only when the method definition is at the  
end of file, that is there are no further statements after the  
definition. I guess this might be something to do with End Of File  

With regards,
Sampathkumar R
Date User Action Args
2013-02-19 23:29:33fwierzbickisetversions: + Jython 2.5, - 2.5.2rc
2013-02-19 23:29:20fwierzbickisetpriority: normal
assignee: fwierzbicki
nosy: + fwierzbicki
2010-12-23 06:03:34waves2dsetfiles: +, unnamed
messages: + msg6294
2010-12-22 20:15:51pjenveysetnosy: + pjenvey
messages: + msg6291
2010-12-13 10:56:56waves2dcreate