SIMPLE PARSER in MQL5

MQL5 다른 컨설팅

작업 종료됨

실행 시간 2 일
고객의 피드백
Professional developer. I recommend his service to everyone.

명시

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

응답함

1
개발자 1
등급
(49)
프로젝트
77
43%
중재
6
33% / 50%
기한 초과
22
29%
무료
2
개발자 2
등급
(51)
프로젝트
66
30%
중재
2
0% / 0%
기한 초과
0
무료

프로젝트 정보

예산
30 - 80 USD
기한
로 7 일