CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
string match

 



kukkelikuu
New User

Dec 2, 2012, 2:05 AM

Post #1 of 2 (1012 views)
string match Can't Post

I need to print out all functions from c - file, which are
in forms: XXX_YYY ( or XXX_TT_SS_TT( ( so function names will have underscores and the name ends with right side brackets

How i can find the functions, i have tried something like this, but it doesnt work ( starts with letter, then there must be at least one under, and ends with brackets ):

if (/^[a-z]_{1,}[(]$/){


Chris Charley
User

Dec 2, 2012, 9:25 AM

Post #2 of 2 (976 views)
Re: [kukkelikuu] string match [In reply to] Can't Post

I just tried this script out and it worked ok on a C file I had. To use it, you need to install some modules, including Parse-RecDescent.

Update: It won't give you the function bodies, just the signatures.


(This post was edited by Chris Charley on Dec 2, 2012, 9:39 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives