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)
Thu, Mar 14, 6:52 AM
Unknown Object (File)
Thu, Mar 14, 6:52 AM
Unknown Object (File)
Thu, Mar 14, 6:52 AM
Unknown Object (File)
Thu, Mar 14, 6:52 AM
Unknown Object (File)
Sun, Mar 10, 10:37 PM
Unknown Object (File)
Feb 7 2024, 10:19 PM
Unknown Object (File)
Jan 16 2024, 10:25 AM
Unknown Object (File)
Jan 10 2024, 10:20 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