[SimpleParse] How to "compile" the tree
Brought to you by:
mcfletch
|
From: Martin d'A. <Mar...@s2...> - 2003-07-18 19:54:51
|
> or just call the processor object with the tag-tree result-set and the
> data (the string source):
Fantastic. I got my processor it to traverse the entire tree. Now, I would
like to output the result in a C++-like language. What should be the next
step?
For example, I have parsed the following:
car1 at address 723
doors 4
color red
And the final output should look like this:
class car1 {
integer address;
integer color;
integer ndoors[4];
}
task car1::repaint() { ... }
I will have a bunch of tasks and functions doing things to stuff to car1
like setting the color to red and the address to 723, hooks for repainting
etc. There will be lots of tasks, and each task will need to do things to
almost every class member.
Should I put everything in myProcessor, or is there a better suited
approach that SimpleParse provides?
Thanks,
Martin
|