[Kamailio-Users] Question regarding config file operation

Alex Balashov abalashov at evaristesys.com
Tue Nov 11 16:09:22 CET 2008


Siddhardha Garige wrote:

> 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. 

That is not correct.  Bison and flex do not work on the config file. 
They are meta-tools.

Bison and flex take an input in the form of a BNF grammar specification 
and assist in the automatic generation of a C-language parser for that 
grammar.  In other words, they are tools that automate a portion of the 
coding that would otherwise be necessary to make the program understand 
the syntax and grammar (the "config file language") of the config.  The 
programmatic parser that is generated by flex and bison is then used by 
the program to read, understand, and execute the instructions of your 
config file, which is loaded when the program starts.

Thus, the only need to change source code in relation to the config 
would be if you wanted to add additional syntactical/lexical features to 
the configuration process.  Otherwise, they have nothing to do with the 
config file per se.

-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599




More information about the Users mailing list