Today, I tried step by step approach to solve all problems:
- First problem was that I was not able to read string to parse data. I tried to solve it but failed. so, instead to sticking to this problem I thought to first read data from different file and check the grammar of parser.
- Then I tried to read data from file and correct the grammar errors in the parser.
so, know I have correct grammar for parsing. I tried to read data from string and after little more search I was able to achieve it.
- Then tested different cases that thingiverse support and added rules to support [value:description,value:description…].
- Now was the work to get comment string from the main parser and pass it to comment_parser to make parameters and It Just required some work and it was done.
Problems left to solve :
- To read parse all string as single word not just pieces of text which I thought is done by new parser but in reality its not happening and causing system to crash.
- At present :
//description1 variable1=value1; //parameter1 //description2 variable2=value2; //parameter2
- for following code if we deleted //parameter1 then //description2 becomes parameter of varaiable1 which should not happen.
To solve this problem required little bit thinking.