The “Assignment operator likes and dislikes” thread made me believe that it’s a good idea to use Java/C syntax elements instead of the Pascal ones. On the other hand there is currently an amount of Basic mixed in, since that seemed easier to parse.
Janino looks really interesting. For programmers it sure will be the easiest to just write a class that contains all the code to create a plant.
I feel very uncertain at this point. I want to include non-programmer users too, but the current scripting language is already to complex for that - I’m not sure if people who don’t have a scientfic background can imagine the results of a series of roll/turn/pitch commands for the turtle. I don’t want my own syntax just to have a new syntax, but I wanted to have a higher level syntax which makes plant design easier. I must admit, I failed at this so far.
Findings so far:
- It was good to refresh my parser design knowledge. I had forgottten too much of it.
- The script interpreter is a bug-nest and time consuming to debug. It’s a one-time effort though.
- The script language is too complex for the desired goal.
- Performance isn’t an issue for the scripts, parsing time to tracing time has a relation of about 1:1000
- Updating the existing scripts after language changes becomes a pain.
- Language changes will become additionally difficult once other people made scripts and want compatibility/upgrade paths for their scripts.
- The raytracer has some elusive bugs which do not show in the plants, but annoy me because I can’t track them down.
On the plus side, it’s the first time that I have a higher level tool to describe and render plant structures. So I think it was worth all the effort. And it seems to have potential.