proflib: krb5.conf lexer proposal
Joseph Calzaretta
saltine at MIT.EDU
Thu Dec 1 15:44:10 EST 2005
Hello,
I've made a minor change to this lexer (
http://mailman.mit.edu/pipermail/krbdev/2005-November/003892.html ), due to
the existince of "FILE=" and "DEVICE=" relation values under [logging] in
krb5.conf files. This means that an unquoted equal sign is not always
treated as a special character (even though I wouldn't be comfortable using
an equal sign in a text token with today's parser). So, at least for now:
The new lexer does this:
>The proposed lexer assumes that text tokens do not contain (unquoted):
> '=' (equal signs) preceded or followed by whitepsace. (So "foo=bar"
> can be a text token but neither "foo= bar" nor "foo =bar" are text tokens)
and specifically:
>Tokens of type TT_TEXT follow a more complicated rule:
> When outside a quoted string, they terminate in any of the following
> cases:
> (1) when an LB character is encountered. The token is terminated
> just before the LB.
> (2) when an '{' or '}' character is encountered. The token is
> terminated just before the '{' or '}'.
> (3) when an ']', '#', ';', or '=' is encountered, followed by an LW
> character. The token is terminated just before the ']', '#', ';', or '='.
> (4) when an WS character is encountered, followed by an '[' or
> '='. The token is terminated just before the '[' or '='.
Earlier I said:
>The (old) proposed lexer assumes that text tokens do not contain
>(unquoted) '=' (equal signs)
and:
>Tokens of type TT_TEXT follow a more complicated rule:
> When outside a quoted string, they terminate in any of the following
> cases:
> (2) when an '{', '}', or '=' character is encountered. The token is
> terminated just before the '{', '}', or '='.
--Joe
Joe Calzaretta
Software Development & Integration Team
MIT Information Services & Technology
More information about the krbdev
mailing list