<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Siddhardha,<div><br></div><div>you're very brave for trying to understand the yacc/flex part of kamailio ! in fact that took me the most effort but also was very rewarding :)</div><div><br></div><div>in fact the cfg.y defines a parser for configuration files, the parser is integrated into kamailio executable by linking kamailio with cfg.tag.o and lex.yy.o. Then kamailio will be able to interpret whatever config file you tell it, and when it parses the config file, it generates the correct 'routing structures' internally.... you can think of it as a domain-specific programming-language in which Kamailio is the interpreter: every configuration file you feed kamailio with is like a small 'program' that tells it how to create the internal routes.... and this is at run-time, not compile time. if you look, you'll see that kamailio does _not_ link to kamailio.cfg that is where the routes are defined: this file is scanned when you start kamailio.</div><div><br></div><div>as you'll know, yacc (or bison) is used to create parsers for programming languages and other 'complex' configuration files (usually when they need to have recursive structures, otherwise you should have enough with a lexer and something simpler).</div><div><br></div><div><br></div><div>so: you don't need to rebuild openser when you change openser.cfg. You would need to rebuild it if you changed cfg.y or cfg.lex (in that case, you would be changing the grammar for configuration files).</div><div><br></div><div>hope it helps.</div><div><br></div><div>ELias</div><div><br></div><div><br></div><div><div><div>El 11/11/2008, a las 15:59, Siddhardha Garige escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: inherit;"><br>Hello all,<br><br>I have a basic question regarding config file operation. <br><br>Here is my understanding. At build time bison and flex work on config file and generates cfg.tab.c. This file is equivalent to c version of config file. Make uses cfg.tab.c along with other files and loads a series of actions into action structures. These actions will be performed on messages in a predefined order.<br><br>If i make a change to config file, do I have to rebuild openser? But I do see just by stopping and starting these changes get reflected in operation. How does these changes get into action structure with out bison and flex generating cfg.tab.c file and make compiling with other files?<br><br>Any help in this regard is appreciated.<br><br>Thanks<br>Sid<br><div><font style="font-family: arial;" size="4"><font style="font-family: arial;" size="3"><a rel="nofollow" style="font-weight: bold;" target="_blank" href="http://www.luminepixels.com/"><font color="#407f00"></font></a></font><br style="font-weight: bold;"></font><br></div></td></tr></tbody></table><br> _______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.kamailio.org">Users@lists.kamailio.org</a><br>http://lists.kamailio.org/cgi-bin/mailman/listinfo/users<br></blockquote></div><br></div></body></html>