Page MenuHomeFreeBSD

ddb(4): Add some support for lexing IPv6 addresses
ClosedPublic

Authored by cem on Sep 3 2019, 5:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 10:52 AM
Unknown Object (File)
Sat, Dec 7, 4:34 AM
Unknown Object (File)
Thu, Dec 5, 3:34 AM
Unknown Object (File)
Tue, Nov 26, 1:47 AM
Unknown Object (File)
Nov 22 2024, 11:06 PM
Unknown Object (File)
Nov 22 2024, 6:47 PM
Unknown Object (File)
Nov 17 2024, 4:19 AM
Unknown Object (File)
Nov 10 2024, 11:38 PM
Subscribers

Details

Summary

Allow commands to specify that (hex) numbers may start with A-F, by adding
the command-scoped CS_LEX_HEX flag. As before, numbers containing invalid
digits for the current radix are rejected.

Also, lex ':' and '::' tokens as tCOLON and tCOLONCOLON respectively.

There is a mild conflict here with lexed "identifiers" (tIDENT): ddb
identifiers may contain arbitrary colons, and the ddb lexer is greedy. So
the identifier lex will swallow any colons it finds inside identifiers, and
consumers are still unable to expect the token sequence 'tIDENT tCOLON'.
That limitation does not matter for IPv6 addresses, because the lexer always
attempts to lex numbers before identifiers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable