|
-
April 4th, 2012, 04:41 PM
#1
Regular Expressions and C++ Syntax
Hi guys, I'm currently writing a Visual Studio extension for a class project. Part of that extension's functionality will be the ability to do a few simple whitespace refactorings. For instance, ensure that there is a blank line after every function definition. Well, there's my problem.
The regular expression for recognizing a C++ function declaration is obviously VERY complicated. But I know that I can't be the first person to want to write one. I've searched but couldn't find any. Can you point me to some place that might have such a regular expression? Or if you can't do that, at least a full specification of the Visual C++ syntax so I can write my own, and have it be complete.
Despite the fact that regular expressions are powerful, writing them quickly becomes messy and difficult. I would really appreciate any kind of help. And in the future, I'll be needing ones for function and variable definitions as well, so I'd take some info on those too.
Thanks in advance.
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
|