roll: pigweed pw_tokenizer: Use domains in the Python tokens.Database class

The token's domain was stored previously, but was not used.

- Add domain to _EntryKey and include it in TokenizedStringEntry's
  __eq__ and __lt__ functions.
- Refactor TokenizedStringEntry to store the _EntryKey rather than
  duplicating its members. This ensures the token, string, and domain
  are immutable.
- Instead of invalidating and recreating a token_to_entries cache,
  maintain token-entries and domain-token-entries dictionaries.
- Don't directly expose the token mappings. Instead, use a read-only
  wrapper class that provides semantics matching existing behavior.
- Various cleanups.

Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/234412
Original-Revision: 08ff555993b8ab250ea03a9f12aaf5c2d1c9c705

Rolled-Repo: https://pigweed.googlesource.com/pigweed/pigweed
Rolled-Commits: 7795cfc2d08139..08ff555993b8ab
Roller-URL: https://ci.chromium.org/b/8736883298988343297
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I2586751ba158c751820f4dd4a6b530657318e3cc
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/235852
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
1 file changed
tree: a1dbf6ee1dc53851ad922e6c309c1aa0cd0b3f3f
  1. .github/
  2. .vscode/
  3. apps/
  4. device/
  5. modules/
  6. system/
  7. targets/
  8. tools/
  9. web_app/
  10. .bazelignore
  11. .bazelrc
  12. .bazelversion
  13. .buildifier.json
  14. .clang-format
  15. .clangd.shared
  16. .gitignore
  17. .pw_console.yaml
  18. AUTHORS
  19. BUILD.bazel
  20. CONTRIBUTING.md
  21. LICENSE
  22. MODULE.bazel
  23. MODULE.bazel.lock
  24. OWNERS
  25. pigweed.json
  26. README.md
README.md

Sense

git clone https://pigweed.googlesource.com/pigweed/showcase/sense

Welcome to Pigweed Sense, a tour of key Pigweed components experienced through an imagined air quality product.

Please visit Sense: An interactive tour through Pigweed to get started.