|
-
Feb 9th, 2020, 09:29 AM
#11
Thread Starter
PowerPoster
Re: The 1001 questions about vbRichClient5 (2020-02-08)
 Originally Posted by wqweto
I don't think it's possible as most regexp engines use back-tracking while PEG does not (although it can recurse). Usually to get rid of back-tracking one has to re-write some of the rules of the grammar in question. There are some whitepapers that attempt mapping regexp to PEG augmented grammars, that is PEG with some more features (not the original B. Ford implementation). VbPeg is already enhanced PEG generator as it understands custom actions in VB6 and allows special rules for error handling but it's not meant as regexp replacement (it cannot produce parsers at run-time).
Understand. Thank you for your detailed explanation.
 Originally Posted by wqweto
Also note, that it's very hard to come up with a regexp that can remove whitespace *only* outside of string literals in JS. It is probably at this point when most folks give up on regexp and start exploring real lexers/parsers as their needs outgrow regexp capabilties.
Agree completely. I'm already trying to write a lexer/parser. But I still need to use some regular expressions in the lexer/parser.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|