Add a check for 'Return' in the grammar files
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Corno_Schraverus
Posted On:   Thursday, October 10, 2002 06:53 AM

Hi all,



I've just spend a few hours figuring out why my parser went into an endless loop, stupid me. It turned out that it was caused by a rule that returned a value.
The error I made was that I actively returned that value like this:

------

return valueX;

------


Ofcourse the statement should have been omitted as ANTLR does it for me. It was just a slip of keyboard :) but perhaps it is a nice enhancement to check code blocks for the return keyword and throw a warning when it finds one.



Corno

About | Sitemap | Contact