03-08-2009
Finding opening and closing braces
I am reading a cpp file thru shell script . There are many fuctions inside the cpp file
eg
pvvd_fncn_name1
{
..... something
}
pvvd_fncn_name2
{
..... something
}
what I require is a method to find the first opening brace and the coresponding last brace and search for a pattern in that part between braces ...
Pls help
Thanks and Regards
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Please send an email to the administrator(s) of the board with thead ID and forum for any thread that is closed that you want open (or open that you want closed). All requested considered. Our apologies if sometimes threads are closed early. If this happens, please email :)
Nobody is perfect... (0 Replies)
Discussion started by: Neo
0 Replies
2. Post Here to Contact Site Administrators and Moderators
Hi all,
Just thought I'd mention something I've noticed since joining this forum :)
Would it be a good idea to close threads once the initial question that was posted has been answered?
I notice a few posts where people go on and on and as soon as you post a reply to one question they... (2 Replies)
Discussion started by: _Spare_Ribs_
2 Replies
3. Shell Programming and Scripting
Hi,I am new to shell scripting and i want to find the line numbers of matching braces.
The file contents are as follows
File XXX.dat
1 ( CLASS "FRUIT"
2 (TYPE "PERSISTENT")
3 (MESSAGE_TYPE "M")
4 (GET_REQRD "Y")
5 (SET_REQRD "Y")
6 )
7 ( CLASS... (3 Replies)
Discussion started by: Rajendra_1510
3 Replies
4. Shell Programming and Scripting
#include<header.h>
void classname :: pvvd_init
( abcd
,efgh
,ijkl
,mnop )
{
rvcl_tabl_name_tabl.pvvd_init
( xxxx
,"tabl_mame" ) ;
... (2 Replies)
Discussion started by: ultimatix
2 Replies
5. OS X (Apple)
Might anyone have an idea on how to mount an xserve share via ssh, then close the share connection? (3 Replies)
Discussion started by: unimachead
3 Replies
6. Shell Programming and Scripting
Hi,
I have files named as
energy.dat.1
energy.dat.2
energy.dat.3
...
energy.dat.2342
I would like to find the file with maximum number in the filename (ex. energy.dat.2342) and open it.
Would you please share your expertize in writing the script?
Thanks in advance. (8 Replies)
Discussion started by: rpd25
8 Replies
7. Shell Programming and Scripting
Hello everyone,
What is the difference between these two tcl commands:
(A) --> puts "ERROR!!! ${current_name}/${opt} is not found."
(B) --> puts "ERROR!!! $current_name/$opt is not found."
Are the braces needed to be put? Or both A and B has the same output? (5 Replies)
Discussion started by: mar85
5 Replies
8. Shell Programming and Scripting
REALLY new to this stuff, sorry.
So I want a shell script to open a program, wait 45 minutes, close it, and then do it all again. I want to do this because I am running an iMacros Script for a long period of time and if Firefox is not constantly restarted, memory leaks start to happen.
Anyway... (6 Replies)
Discussion started by: plsbbg
6 Replies
9. Shell Programming and Scripting
Hi
I have a file called tmp with the content as belowmore tmp
NAMELIST(Hari)
NAMELIST(Raju)
I want to get the values between the brackets.
When I executed the below command on zlinux I get the output which I wantedmore tmp |awk -F'' '{print $2}'
But when I execute the same in... (3 Replies)
Discussion started by: harimhkr
3 Replies
10. Shell Programming and Scripting
Hi,
I have below command in one of the script. Can you please let me know what does the curly braces do over here \{1,\}. The remaining part of the code atleast I am able to understand.
sed -n 's/.*\-\()\{1,\}\)\-.*/\1/p' (13 Replies)
Discussion started by: tostay2003
13 Replies
LEARN ABOUT OSX
ppi::structure::unknown
PPI::Structure::Unknown(3) User Contributed Perl Documentation PPI::Structure::Unknown(3)
NAME
PPI::Structure::Unknown - An unknown or unresolved brace structure
INHERITANCE
PPI::Structure::Unknown
isa PPI::Structure
isa PPI::Node
isa PPI::Element
DESCRIPTION
"PPI::Structure::Unknown" is class for braces whose type is unknown, or temporarily unknown.
It primarily exists temporarily inside the lexer. Although some types of braces can be determined immediately at opening, there are a
number of different brace types that can only be correctly identified after the braces are closed.
A structure is typed as unknown during this period it is indeterminate.
A "PPI::Structure::Unknown" object should not ever make it out of the lexer without being converted to it's final type. Any time you
encounter this class in a PDOM tree it should be considered a bug and reported accordingly.
METHODS
"PPI::Structure::Unknown" has no methods beyond those provided by the standard PPI::Structure, PPI::Node and PPI::Element methods.
Got any ideas for methods? Submit a report to rt.cpan.org!
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.2 2011-02-25 PPI::Structure::Unknown(3)