Description
When writing a document explaining the code, I mainly use a Markdown document. I usually list the entire code first and then explain the related code parts again. At this time, if the code has line numbers, it is easy to specify the code and it can help to find it. For this, I use the PLY (Python Lex-Yacc) project to define additional grammar in the code block and develop a Markdown parser that parses it.