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
F82999491: D21509.id61849.diff
Sun, May 5, 1:20 AM
F82969059: D21509.id.diff
Sat, May 4, 3:36 PM
F82933368: D21509.id61609.diff
Sat, May 4, 4:14 AM
Unknown Object (File)
Thu, May 2, 4:02 AM
Unknown Object (File)
Mar 14 2024, 6:52 AM
Unknown Object (File)
Mar 14 2024, 6:52 AM
Unknown Object (File)
Mar 14 2024, 6:52 AM
Unknown Object (File)
Mar 14 2024, 6:52 AM
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26267
Build 24755: arc lint + arc unit