Hi, I'm totally new to flex and just received a project that is due in a few days. I want to ask you if it is a hard one to solve and if anyone can give me some help. i'm guessing it is a prety standard one and maybe someone already has something similar. The project is something like this: Give one ore more C files.For each file generate a txt file containing the functions found in the C files and for each function : its type, its name, the nomber of parameters and their name. This is the example:
#include <stdio.h> int suma(int v[], int n) { int suma = 0; for(int i = 0; i < n; i++) /* rebuild suma */ suma += v[i]; return suma; } void main() { int a[] = {1, 2, 3}, i = 0; while (i < 3) { int s = suma(a, 3); printf(%d \n, s); i++; } }
Output: function: int suma(int v[], int n) return type: int name: suma number of parameters: 2 list of parameters:
int v[], int n function: void main() return type: void name: main number of parameters: 0 list of parameters: -
So? Is it hard or has anyone done something like this already? Please send me , on this e-mail, any source examples taht might help me keeping in mind I have never seen a Flex source code :( Thanks a lot, Alex