[SR-Users] [sr-dev] support for 'include' in cfg file

Daniel-Constantin Mierla miconda at gmail.com
Wed Aug 26 12:25:50 CEST 2009



On 26.08.2009 12:03 Uhr, Jan Janak wrote:
> On Wed, Aug 26, 2009 at 10:55 AM, Daniel-Constantin
> Mierla<miconda at gmail.com> wrote:
>   
>> On 26.08.2009 11:44 Uhr, Jan Janak wrote:
>>     
>>> On Wed, Aug 26, 2009 at 9:47 AM, Daniel-Constantin
>>> Mierla<miconda at gmail.com> wrote:
>>>
>>>       
>>>> On 26.08.2009 1:51 Uhr, Klaus Darilion wrote:
>>>>
>>>>         
>>>>> Great!
>>>>>
>>>>> ...added to wiki ....
>>>>> http://sip-router.org/wiki/cookbooks/core-cookbook/devel#include
>>>>>
>>>>>           
>>>> thanks, I was wondering if this really belongs to parameters section,
>>>> since
>>>> it can be used in route blocks as well. Maybe a new section is better --
>>>> not
>>>> sure how to name it now.
>>>>
>>>>         
>>> Maybe we should have a section about general config file syntax, such
>>> as comments, identifiers, reserved keywords, included files. This
>>> directive would then fit in nicely.
>>>
>>> By the way, wouldn't it make more sense to require that the filename
>>> is enclosed between a pair of quotes? Unix filenames may contain
>>> pretty much anything except '/' and that could result in all kinds of
>>> strange errors when not quoted. Also it would be consistend with
>>> loadmodule and loadpath.
>>>
>>>       
>> yes, enclosing in quotes would be recommended. Shall we force all the time
>> the double quotes?
>>     
>
> Yes, please. That way it would be obvious that what the include
> directive expects is a string and not an expression to be evaluated.
>   
done. Just that it cannot be a string like elsewhere in the config for 
now. Expanding grammar to support hex, octet representation of chars, 
whitespace, etc. is a bit more complex to implement in order to cope 
with comments on the same line after the include. But I have it in mind 
for future.

Cheers,
Daniel


-- 
Daniel-Constantin Mierla
* http://www.asipto.com/





More information about the sr-users mailing list