Basically I want to trace the path for function call and assignment. I am thinking of using Antlr to generate the control flow path.
Consider the following snippet:
1. function abc(myVar) {
2. console.out(myVar);
3. }
4.
5. x = getAttributes();
6. abc(x);
If I start from getAttributes() as the keyword, I would want to print out the following:
1. getAttributes is an assignment to x - line 5
2. x is the 1st argument to function call abc - line 6
3. myVar is the 1st parameter of function definition - line 1
4. myVar is the 1st argument to console.out - line 2
Is there a systematic way to achieve this using Antlr or any other way without using Antlr?
