FunctionList update: Add parser for Pascal/Delphi#3663
FunctionList update: Add parser for Pascal/Delphi#3663dinkumoil wants to merge 1 commit intonotepad-plus-plus:masterfrom dinkumoil:master
Conversation
MAPJe71
left a comment
There was a problem hiding this comment.
Please provide appropriate example source to be able to test/verify parser.
|
@MAPJe71 Thank you for your response.
I will do that after my holidays. Do you also need a file with the expected results of the parser? I was not able to generate a parser result file with the following command line (Npp v7.5):
The resulting file |
👍 Enjoy your holdays!
👍 That would be great! Try |
|
After spending a lot of time trying to get the Delphi parser working (with no success) I close this PR. I was not able to write regular expressions which are suitable for all features and coding variants of the Delphi language. Additionally there seem to be bugs in the underlying regex engine (Boost?). IMHO it`s worth to think about the whole concept of a parser engine based on regular expressions. In the issue tracker one can find a lot of entries concerning malfunctions of various language parsers. |
You could write a parser for each coding variant and activate just one with the right association.
IMO the regular expressions itself are not the root problem, it's more the Function List engine, how it uses RE's and expectations of users (compared to other editors and IDE's with a tag/function list implementation).
Yep, I'm trying to work on them as much as possible but it takes time. |
In Delphi there doesn't exist different coding standards (with different file extensions) like e.g. in Fortran. With coding variants I meant for instance
There are a lot more of detail problems (and their interconnections) I don't remember at the moment. I am frustrated and fed up with this whole thing and I already deleted all my test cases and trials, so don't ask for them. Maybe somebody who is better in regular expressions will implement a parser some day. |
|
Hi Thanks in advance and Happy New Year |
But note that the provided parser has some deficiencies and does not cover all possible coding variants and features of Delphi. I was not able to solve these problems and stopped development to avoid constantly emerging support and enhancement requests. So you are on your own if you use this parser. |
Closes #3664.