-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplifies quotation in the comment parser
This commit makes the comment parser more robust. Instead of trying to support both kind of quotes (single and double) we now switch to the double quotes as the only method to delimit a token that has non-wordy symbols. A signle quote is no longer considered a special symbol and should not be escaped. For the future pioneers of comment parsing I added a debug option, that will be passed to the underlying shlex lexer (where all the problems usually happen). If `debug=3`, then it will print every single state. In case even if this robust version will fail, I've added a final line of defense - if a comment cannot be parsed the BAP comments View will not fail, but will just ignore the failed comment (of course a diagnostic message will be printed into the message box).
- Loading branch information
Showing
3 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters