[Date Prev][Date Next]
documents or examples on defining / adding a new syntax?
Here is what I can find about defining / adding a new syntax.
Peter Marschall wrote on Sat, 5 Jul 2003
Defining a new syntax means defining a new form of data structure that the
server must know about. This is not possible using only configration
options. You need to code it into the server. Of course the same holds
for matching rules.
Howard Chu wrote on 2002-10-25
if you had originally configured with --enable-modules, You need to create
a dynamic module that calls register_syntax() with your new syntax
definition, and then use moduleload in slapd.conf to load your module.
My question is:
1. is there a module that introduces a new syntax, from which I could
observe how that is done?
2. Is there any document on what-to-be-aware-of if you design a new syntax?
3. Do I need to design a new syntax at all? My requirement is the following:
I need a new syntax for ranged-values. Examples are:
- netWeight: 12~13kg
- ISOSensitivity: 800~1600
- heightAdjustableRange: 1.2m~1.5m
The spec of ranged-value is a numeric, optionally followed by a
measurement unit, followed by a tild as seperatorâ, followed by
The syntax needs its own comparison rules, so that you can filter a
range, and get entries who offer values ranging in that range.
â quote from http://en.wikipedia.org/wiki/~
In some languages (though not English), a tilde-like wavy dash may
be used as punctuation (instead of an unspaced hyphen or en-dash)
between two numbers, to indicate a range rather than subtraction or
a hyphenated number (such as a part number or model number).