reorganised line parsing to make it easier to use different line-comment syntax
support for different line-comment syntax (e.g. // for Java, C++, etc.)