Original Post
I'm starting to think about adding scripting to my small engine. Actually I have been thinking of it for a while, and it was only until a week ago that I started revisiting the topic. Taking a quick glance at the articles and topics I notice that Lua seems to be a popular scripting language amongst most people. Now, what about Lex & Yacc? (I'll hold the phrase scripting language very loosely because I'm still not entirely sure what I can do with it) A while ago I was talking about game scripting with a friend of mine, and he recommended me a book called "Lex & Yacc - O'Reilly by John Levine, Tony Mason, & Doug Brown". I started reading through it and saw plenty of material that I could apply, but is this a wise choice when it comes to scripting? It's been a while since I've gone through the book, but from what I can recall it takes a script file and generates a C file out of it. I was just wondering if I could use it as well to run methods at run time from a script file, as part of some on the spot debugging. Also, on a side note... Right now I have my engine laid out where you have to initialize the graphics class before any other graphics linked classes can be used (texture, etc). The problem I have with it is that I have it so the graphics class is passed to each created object that requires the use of the device. Would it be in my best interest to have a global pointer to the graphics class seeing as there will only be one initialized? (May be easier for a scripting engine to handle a global pointer.) Thanks