More additions to unlang
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Fri May 17 17:47:15 CEST 2013
On 17 May 2013, at 08:33, Alan DeKok <aland at deployingradius.com> wrote:
> Jakob Hirsch wrote:
>> So it seem there's quite a lot of good stuff coming :)
>
> Yeah.
>
>> Btw, if you are still looking for more ideas, what about this:
>>
>> - ternary logic, like C's "condition ? yes : no"
>
> That's hard. Mostly because the configuration file parser is bad.
>
>> Not sure how easy this is to parse, though. Maybe something like
>> "%{cond ? true : false}" would be better.
>
> Hmm... that may be easier to do.
*sigh*, please no, no pointless variations, this isn't Perl.
>
>> - regex-like comparison operators
>> E.g. =^ and =$ would be true if the LHS starts/ends with the RHS string.
>> I.e.,
>>
>> ( "foobar" =^ "foo") -> true
>> ( "foobar" =^ "bar") -> false
>> ( "foobar" =$ "foo") -> false
>> ( "foobar" =$ "bar") -> true
>>
>> This would elimate the need for a lot of regex matches.
>
> Sure... but regex matches work for now.
and the new xlat parser may eventually allow pre-compilation of static expressions so the performance hit should go down significantly.
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team
More information about the Freeradius-Devel
mailing list