docstring_parser icon indicating copy to clipboard operation
docstring_parser copied to clipboard

Please use FSM to analyze the docstring, do not use regular expression.

Open qkxie opened this issue 8 months ago • 1 comments

I originally thought that you would use lexical analysis and syntactic analysis from the principles of compilation, and analyze docstring through a finite state machine. However, when I took a look at the source code, I found that you were actually using regular expressions. The use of regular expressions will lead to a significant reduction in flexibility.

qkxie avatar Apr 22 '25 06:04 qkxie

Creating a fully manual lexer and parser can be a tough task. While adding a library like parsimonious or lark could simplify things a lot, it would also add extra bulk to the package which I think should be avoided. That being said, I'm open to any pull requests if you'd like to explore different approaches.

rr- avatar Jul 20 '25 23:07 rr-