Hi noix,
thanks for the reply.. It seems like end of file is reached..
I do not know how online judge executes the programs.
can you show some code snippet that how to detect that input is ended in python or avoid EOFError.
I tested my program with all the test cases from actual competition where this problem appeared and it passed all the cases.
In my main method I am doing this. Plese tell me where I am wrong :
def main():
str = raw_input()
while(str):
if(str.find('_') != -1):
if(checkValidCPPIdent(str)):
str = convertCPPtoJava(str)
print str
else:
print 'Error!'
else:
if(checkValidJavaIdent(str)):
str = convertJavatoCPP(str)
print str
else:
print 'Error!'
str = raw_input()
//helper methods
//call to main()