Page MenuHomeFreeBSD

config(8): Add support for factoring the optional keywords.
AbandonedPublic

Authored by hselasky on Dec 1 2021, 12:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 30 2024, 9:21 PM
Unknown Object (File)
Jan 24 2024, 7:20 PM
Unknown Object (File)
Jan 14 2024, 2:19 PM
Unknown Object (File)
Dec 20 2023, 4:28 AM
Unknown Object (File)
Nov 13 2023, 2:51 PM
Unknown Object (File)
Nov 6 2023, 10:53 PM
Unknown Object (File)
Oct 22 2023, 4:51 PM
Unknown Object (File)
Oct 5 2023, 9:54 PM
Subscribers
None

Details

Reviewers
bz
imp
Summary

Any logical expression can be expressed by repeatedly using logical and,
logical or and logical not. But sometimes expressions may look nicer if
common keywords can be factored out, instead of repeating them.
Introduce support for factoring expressions using parenthesis.

For optional config keywords, space means logical and. "|" means logical
or and has precedence over logical and. "!" means invert the following
keyword. Anything enclosed within parenthesis is parsed like a single
keyword.

While at it convert some integers to booleans.

Before example:
dev/foo/foo.c optional a d | b d | c d

After example:
dev/foo/foo.c optional ( a | b | c ) d

MFC after: 1 week
Sponsored by: NVIDIA Networking

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hselasky created this revision.
hselasky edited the summary of this revision. (Show Details)

Make sure magic characters like ! () and | are only applied when we are looking for such keywords.

hselasky retitled this revision from config(8): Add support for factoring the optional keywords. to config(8): Add support for factoring the optional keywords..Dec 2 2021, 10:26 AM