Trace task (constructing a function graph) - page 6

 
jartmailru:
Actually, the lexer + parser combination is a classic of the genre.
I can't advise on lex/flex/bison/ant-lr (I don't even know their names ;-D)-.
I wrote specifically hand-made.

A book on the subject: http://www.piter.com/book.phtml?978546900378

I recommend it :)

 
jartmailru:
Choosing the wrong means of implementation indicates unprofessionalism.

Only if it is the choice of an implementer (in this case, a professional programmer).

Different specialists (professionals) solve the same task in different ways. A welder will weld a handle to a metal part of the gate, a carpenter will bolt it to a wooden part, a locksmith will bolt it to any of them...

 
tara:

Here's a snippet of the magazine:

Right. Almost there. Here I am:

2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->->-2->->-3->->-> IN odd
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->> IN decomp
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->>-3->>-4->> IN odd
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->-3->>> IN decomp
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->-3->>> IN even
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->> IN decomp
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->-3->> IN odd
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->> IN decomp
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->->-2->->-3->->-4->->-5->->-> IN odd
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->->-2->->-3->->-4->->> IN decomp
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->->-2->->-3->->-4->>> IN even
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->->-2->->-3->->->> IN decomp
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->-3->>> IN even
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->> IN decomp
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->-3->> IN odd
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>-2->> IN decomp
2011.01.23 02:22:31 RetTest (NZDUSD,M10) >-1->>> IN OnStart

The output trace bracket can be omitted. But it should be.

Files:
calltest.mq5  2 kb
 
lea:

A book on the subject: http://www.piter.com/book.phtml?978546900378
I recommend it :)

Oh, the things people do not think of to avoid making money...
 
sergeev:

1. When parsing - calls will be detected by themselves. Who is with whom and from where...

2. So this is the only complete solution idea so far.


1. Will not be detected. If called by condition, it will only be detected at RunTime.

2. :-)) That depends on what you need. The expression tree at the compiler's input and call stack at runtime are quite different objects. No?

 
jartmailru:
Oh, people will think of anything not to make money...
+1
 
MetaDriver:

1. Will not be detected. If called by condition, it will only be detected at RunTime.

2. :-)) It depends upon what you need. The expression tree at the compiler's input and call stack at runtime are quite different objects. No?

1. Yes.

2. Yes.

But the way gives at least some structure to the code, without changing the code itself.
 

I still need to finalise this task. I will be sure to report the results in the codebase.
So if you have any ideas for a solution to the problem, please post in this thread.

 
sergeev:

I still need to finalise this task. I'll be sure to report the results in the codebase.
So if you have any ideas for a solution according to the condition, please post in this thread.

You won't be able to keepvirginity . :-)

Wisdom ::= The ability to distinguish the possible from the impossible.

Keep in the trailer the latest version possible. Gives out in the "Experts" tab pretty much what was asked for (just prints from bottom to top)


In the log, the direction is exactly right. From top to bottom.
Files:
calltrace.mq5  2 kb