The original code in PR #23 did not consider multiline comments. We compared and copied the code from OCaml parser which has a similar comment structure and it worked.
The existing test files in test/expected_dir & test/src_dir needed fixing for some mismatch in whitespace characters and expected lines.
When octave comments were nested within mathematica comments, the parser incorrectly detected the file as Octave. To fix this we moved around an If/Else block which placed mathematica at the bottom of the conditional.
We have also tried adding mathematica comments within Octave comments to see if the reverse was true. We found that Octave parsing worked correctly without any further change in code.
The original code in PR #23 did not consider multiline comments. We compared and copied the code from OCaml parser which has a similar comment structure and it worked.
The existing test files in test/expected_dir & test/src_dir needed fixing for some mismatch in whitespace characters and expected lines.
When octave comments were nested within mathematica comments, the parser incorrectly detected the file as Octave. To fix this we moved around an If/Else block which placed mathematica at the bottom of the conditional.
We have also tried adding mathematica comments within Octave comments to see if the reverse was true. We found that Octave parsing worked correctly without any further change in code.