How to design/implement object(s) model for toy scripting language?
I am trying to make a toy scripting language in c++. I have used boost spirit for the grammar, and hopefully for parser / lexer. The idea is - a language where 'everything is an object' like javascript and some support of prototype based inheritance. I want to know how to design and implement the 'object' and inheritance for it using c++. I saw source codes of engine spidermonkey but mostly it is done using structures, also getting more complex at later stages. I hope I could manage with the stdlib itself. I don't want to think about any optimization at this stage. All I want is a solid idea of how the basic objects have to be implemented and how their properties are created/modified/destroyed at runtime. I tried to take a look at V8, but its really confusing me a lot!
I would like to design four primitive objects -> string, number (double would do), function, list. The list can be a recursive of all four. I had ideas of using templates but pointers would be simple I hope. Any ideas/pointers/links really appreciated, thanx in advance.