void Test(){------>
}
then how can we differentiate method and constructor
That's the example I just gave and I did say that you'd then have to check the modifier that was used. e.g if the modifier is public or protected then it's a constructor, if there is no modifier, then it's a constructor again, otherwise it's a method.
However, to get it to work properly you'd need to parse the program first breaking it up into statements so that you have a statement on each line ...
Comment