New Features of Eli Version 4.7
Input character strings are converted into internal representations by
token processors
(see Token Processors of Lexical Analysis).
A token processor should not alter the string that it is converting in any
way, but the original interface specification did not enforce that
restriction because C did not provide a const qualifier.
In many applications, it is important to apply token processors to literal
string constants.
Recent C++ compilers do not allow literal string constants to be passed to
character string parameters that are not const-qualified.
We therefore decided to alter the token processor interface by
const-qualifying its character string parameter.
A string pointer that is not const-qualified can always be passed to
a const-qualified parameter; only the reverse is prohibited by the C
definition.
Thus this change is transparent, unless you have defined your own token
processors.
In the simplest case, you need only add the const qualifier to the first
parameter in your token processor's definition.
If your token processor does, however, alter its argument string (for
example, by planting a null character at the end) then it must be
rewritten.
|