   Can you recommend bison?
  HiI want to implement a solid parser for the gamedev library I am working on.Since its a lot easier to define the textual structure of a file with a grammar, I decided to use a parser generator. The first generator I found was bison.So a few question which someone can hopefully answer:1. Can I use bison in commercial software? The license states you may do so if you generate a C sourcefile, but what about a C++ sourcefile?2. I had a look at the way they define tokens, in other parser generators you define the tokes for the lexer with all the characters that are allows,for bison you use a union%union{int inttype;double doubletype;customtype  ctype; /*do you need to implement the conversion operators from string to customtype? or just a proper copy constructor?*/}%token <inttype> TOKEN_INTEGER%token <doubletype> TOKEN_DOUBLEis there a way to define tokens the way lex/yacc or ANTLR does it?3. The manual states, bison is upward compatible with yacc grammer and lexer files, do you know how reliable their yacc/lex support is?4. Is there a free for commercial use version of yacc/lex that runs on windows?I really appreciate any help you can providethx in advance   
  Im not familiar with those parsers, but what I would recommend is TinyXML and just using XML files instead. You will find more information about this format, and I beleive it is more straight forward to implement into your code.  I dont really understand your question. Is this a bison specific question. If so as stated earlier, I assume that this parser is not used widely and it will be hard for you to find answers. I also see you mention the use of unions, which if possible, I would advice you to avoid. Basically if your looking for a specific parser that you can load things into codebase, I would say look into XML. If implementing in C++ a free solution is TinyXML, simply google for it.   ;  Well, I dont think they are going to care if its C or C++, your most likely going to be compiling C code with a C++ compiler anyways.  So in other words, yes your allowed.As for what the AP was talking about.  You havent really given us any indication the type of data your file format holds.  Typicaly lex parsers and the like are used for LANGUAGES, or proceduaral type definitions.  If you are refering to just very structured objects or files, , you should look into XML.   ;  for now they are just structures file describing the effect and shader classes used in the engineeffect class define the effectsshader class defines the shader.dlls properties and how they can be assiciated with the effect classes to get optimal results or to satiesfy the users quality settingsthe effect files have the some syntax as the shader files for now, but later on i plan to enhance their syntax with a little scripting language to define for example particle effects *just the initialization of the particle effects*the physics are still left to the engine;  Using a Lex parser is inappropriate for your needs.  You do not need semantic results of an entire language set, you need structured data inputted into your program easily.  Look more into XML or even LUA on your project, an entire lex parser is not what you want.   ;  Even if XML has its drawbacks (huge mount of overhead due to highly redundant meta-data), this sounds like a suitable domain for it.You can also define a simpler XML-like syntax (e.g. a LISP-like approach) for reducing meta-data and make it easier to parse and reduce the overhead caused by the DOM. You can take a look at Eric Malafeew's GDC 2005 presentation "Data driven Programming Made Easy" for some hints on how to implement such system.HTH,Pat.   ;  Hm i think lua is easy to use judging from their manualI will definitly integrate it into the engine to allow easy modding of the game   ;  Although it's highly recommended to look into using an existing "solid" script library, there is a free "Parser Generator" that I've personally used and found to be quite solid, at [a]http://www.devincook.com/GOLDParser[/a].Although the guy who developed it did so in VB, you can download implementations in several languages, C++ etc., as well as a grammar file editor that works quite well (though a little quirky).  This will allow you to specify your grammar definition in a pseudo-EBNF format, and compile it to a table that can be used to drive your parser.I would highly recommend the GOLD parser to anyone, even if you only have an intellectual interest in parsers and don't actually intend to implement it in your own system.;  Looking for a parser framework?You should try Boost::Spirit:http://spirit.sourceforge.net/   ;  thx for the links, spirit looks interesting, they use the template meta features of c++ compilers to generate the parser code, however it looks a little bit tricky  at the first glanceI will read into their documentation   