I didn't have problem with parsing "for loop" syntax but with semantic action on it
Type: Posts; User: grygus
I didn't have problem with parsing "for loop" syntax but with semantic action on it
I managed to do this but I really dislike this solution;
When i recognize for loop, I am making new grammar object and in c++ loop parse my for with this grammar. Somhow it is working correct.
...
Doumentation only shows in simple way how to use file iterators and position iterators, but i want to use this within grammar structure. I came across some problems with trying to do this.
I would like to know how to parse part of file multiple times within grammar structure.
I need this for example to interpret file like this;
$i = 1;
for 1 to 10
i += 1;
endfor
I want to write interpreter using spirit library but i have a little problem. I don't know how to write loop for example "for" with syntax "for 1 to 10 endfor". Can someone tell me how to use...