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, Jan 24, 7:13 PM
Unknown Object (File)
Thu, Jan 23, 7:00 PM
Unknown Object (File)
Sat, Jan 18, 10:08 PM
Unknown Object (File)
Dec 29 2024, 1:07 PM
Unknown Object (File)
Dec 13 2024, 10:52 AM
Unknown Object (File)
Dec 7 2024, 4:34 AM
Unknown Object (File)
Dec 5 2024, 3:34 AM
Unknown Object (File)
Nov 26 2024, 1:47 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

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