The jison grammar file describes a parser that recognizes HTML style comments. It should be simple to change the grammar to recognize any other markup for multiline comments. I've put a lot of notes in the grammar file about it's structure and links to where I found the information.
To generate the comment parser you'll need jison installed. Then run commentsParserGenerator.js
through Node, it will read comments.jison
and generate the parser as comments.js
. It will then run comments.js
over comments.txt
and display the results.