Missing key ("CMD =VALUE") is not detected by TokenClassifier #126

Closed
opened 2026-04-25 13:37:50 +02:00 by lars.winzer · 4 comments
lars.winzer commented 2026-04-25 13:37:50 +02:00 (Migrated from git.scicore.unibas.ch)

Bug Report

Environment

  • Branch & Commit: main - d4a3ebb487
  • Operating system: macOS
  • How was execution started (Gradle task / IDE debug / IDE run): Not applicable
  • Java version: 25
  • Gradle version: 9.3.1

Summary

While creating the unit tests for the tokenizer (#4) I discovered that the following statement is valid:

CMD =VALUE

Even though no KEY is associated with the VALUE.

Expected Behavior

The TokenClassifier should throw a TokenizerException with the "Expected KEY before '='" message.

Actual Behavior

Its considered valid, even though it does not conform to our protocol specification.

Steps to Reproduce

  1. Let the Tokenizer tokenize the CMD =VALUE string
  2. Let the TokenClassifier classify the list of RawTokens
  3. Observe that no exception is thrown

Stack Trace / Error Message

None

Possible Cause / Notes

None

Checklist

  • I reproduced the problem using the steps above
  • I searched documentation for relevant information
  • I added relevant labels
## Bug Report <!--The reccommended type is: Issue--> ### Environment - **Branch & Commit:** main **-** d4a3ebb487edd3488026db9a8594f8db88e1fec6 - **Operating system:** macOS - **How was execution started (Gradle task / IDE debug / IDE run):** Not applicable - **Java version:** `25` - **Gradle version**: `9.3.1` ### Summary While creating the unit tests for the tokenizer (#4) I discovered that the following statement is valid: ``` CMD =VALUE ``` Even though no `KEY` is associated with the `VALUE`. ### Expected Behavior The TokenClassifier should throw a TokenizerException with the "Expected KEY before '='" message. ### Actual Behavior Its considered valid, even though it does not conform to our protocol specification. ### Steps to Reproduce 1. Let the Tokenizer tokenize the `CMD =VALUE` string 2. Let the TokenClassifier classify the list of RawTokens 3. Observe that no exception is thrown ### Stack Trace / Error Message ``` None ``` ### Possible Cause / Notes None ### Checklist - [x] I reproduced the problem using the steps above - [x] I searched documentation for relevant information - [x] I added relevant labels
lars.winzer commented 2026-04-25 13:37:50 +02:00 (Migrated from git.scicore.unibas.ch)

assigned to @lars.winzer

assigned to @lars.winzer
lars.winzer commented 2026-04-25 14:14:15 +02:00 (Migrated from git.scicore.unibas.ch)

created branch fix/126-missing-key-is-not-detected-by-tokenclassifier to address this issue

created branch [`fix/126-missing-key-is-not-detected-by-tokenclassifier`](/cs108-fs26/Gruppe-13/-/compare/main...fix%2F126-missing-key-is-not-detected-by-tokenclassifier) to address this issue
lars.winzer commented 2026-04-25 14:31:05 +02:00 (Migrated from git.scicore.unibas.ch)

mentioned in merge request !150

mentioned in merge request !150
lars.winzer commented 2026-04-25 14:33:13 +02:00 (Migrated from git.scicore.unibas.ch)

mentioned in commit 5ded42abe6

mentioned in commit 5ded42abe6adf5c569099ab029517922387469ac
lars.winzer (Migrated from git.scicore.unibas.ch) closed this issue 2026-04-25 14:33:14 +02:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: University-of-Basel-Studentprojects/Programmierprojekt#126