PrestoSoft Blog :: Home

Saturday, December 31, 2016

Better Detection of Programming Languages Comments in the next ExamDiff Pro

A much requested improvement that we will be introducing in the next version of ExamDiff Pro is better detection of comments in various programming language to allow for better and precise ignoring of these comments.

In the past, comments would be detected by programming language specific regular expression patterns. Unfortunately, this method is insufficient for detecting comments in several programming languages and use cases. For example, in previous versions of ExamDiff Pro, a URL string that includes "http://" would mark everything after the two slashes as comments in languages that use that character combination to denote single line comments. This problem can be seen below:



In the next ExamDiff Pro, comments for various syntaxes are no longer parsed with regular expressions, but rather using a programming language specific code parser, the same one that used to provide syntax highlighting. As a result, these failures of regular expression matching will be fixed in newer versions of our software. The same case that caused the previous version to fail can be seen working correctly below:



Labels: ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home