Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC6
hi all,
i need to identify all the function calls in a c++ file.i have seen that,it is possible with lex and yacc grammar.but i dont know to write appropriate grammar file to identify all the function calls correctly.
how can i move with this?
 
thank you in advance..
Posted 4-Jun-12 21:55pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You should know a bit of theory and read some tutorials.
A starting point might be "The LEX & YACC Page"[^].
I found this (available for free) book: "Compiler Construction using Flex and Bison"[^] pretty interesting.
  Permalink  
Comments
Jijesh Balakrishnan at 5-Jun-12 3:55am
   
ya,i know some theory parts and i have tried to write some grammar.but it is not working correctly
CPallini at 5-Jun-12 4:03am
   
You may find many examples of grammars on the web.
It is worth noting that identifying C++ function calls is a bit tricky.
Jijesh Balakrishnan at 5-Jun-12 4:21am
   
okay.
thank you for your help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 200
1 PIEBALDconsult 150
2 BillWoodruff 148
3 Jochen Arndt 135
4 DamithSL 130
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 5 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100