SIMPLE PARSER in MQL5

MQL5 Other Consultation

Job finished

Execution time 2 days
Feedback from customer
Professional developer. I recommend his service to everyone.

Specification

I'm after super super SIMPLE PARSER : ( MQL5 )


Below is messy explanation what I'm after. Purpose of this i to learn about Ctree Class and how to use it. I created for my self a problem and try to understand it but there is NON about this in MQL, and I do not like to spend a month to solve it, and also if I will have a solution from professional programmer then this approach will be better them my approach, but : I'M NOT AFTER Professional / Fastest …I'M AFTER SIMPLE SOURCE CODE TO UNDERSTAND :) :)


goal :

to create parsing tree by using CTree class and CTreeNode class  from Standard Library

example input is a string


example :

(1+2)*(3+4)*(5+(6*(7+8)*9)+10)*(11+12)*3


the result is = 1195425 (this is not a main goal but necessary to make sure the result is correct)


simpler example is :


(1+2)*3


tokens:

(    type : bracketL           value: (

1   type : number             value: 1

+   type : operatorADD     value: +

2   type : number             value: 2

)   type : bracketL            value: )

*   type : operatorMULT    value: *

3   type : number             value: 3



I'm after :

1. example of usage of class Ctree from standard library, for storage of parsed / evaluated operation in nodes


2. and also printout to the separate file of this tree (example file name : parsingTree.txt)

example:


       *

     /  \

    +    3

  /  \

1      2

__________

= 9 (to be sure all is calculating correctly)


I do not care if this is horizontal or vertical, just tree has to be created from nodes, if You have ready (similar) project awesome ...I'm after simple example to learn about this in MQL


  1. obviously I'm AFTER SOURCE CODE with enough descriptions to be able to understand it

  2. as simple code as is OK to use it in solving problem like this one

  3. again ...we using class CTree and CTreeNode from MQL5

  4. end result has to calculate correct value and we using only addition, substr, multipl, division



ENDING

To be super clear :) ..I'm after SIMPLE SOURCE CODE for creating parsing tree of similar operations (as above) by using CTree class and CTreeNode class and whatever is necessary :) from MQL5 Standard Library and displaying / printing this tree to a separate file ..the tree can be horizontal or vertical or any other way for displaying tree but HAS to be created from parsing tree and calculation of the result also has to be calculated from parsing tree


Regards and thank You

Responded

1
Developer 1
Rating
(49)
Projects
77
43%
Arbitration
6
33% / 50%
Overdue
22
29%
Free
2
Developer 2
Rating
(51)
Projects
66
30%
Arbitration
2
0% / 0%
Overdue
0
Free

Project information

Budget
30 - 80 USD
For the developer
27 - 72 USD
Deadline
to 7 day(s)