Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Parser quirks: open picks a matching item before the exit; examine's two steps read words differently

Open
#421 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
backend

Research direction

Read the parser paths in src/interpre.cpp:1925-1931 and src/act_info.cpp:1115,1528, then compare the keyword matching behavior in src/handler.cpp:2443. The issue asks for coordinated parsing changes and checks of open/close plus lock/unlock and pick; completion means exit name matching and examine container lookup use consistent intended parsing without changing the usual target order elsewhere. No tests are named in the issue.

Written by the indexing model from the issue text.

Description

Two old command-parsing quirks, to be handled together in one parser follow-up (not in feature branches).

1. open <exit name> picks a matching item before the exit

A player types open stone to open an exit named "stone" while wearing an item that also answers to "stone". The item is chosen, not the exit. The workaround today is open stone east.

Why:

  • open and close (src/interpre.cpp:1925-1931 on release-frodo) list items in the room, inventory and equipment as the first target group. Exit names (TAR_DIR_NAME) come only as an alternative, after that group fails.
  • Items match on any keyword (and worn gear by the start of its name, src/handler.cpp:2443). Exits need an exact keyword match.
  • So any item that shares a word with the exit wins.

lock and unlock use a different target list and were not checked.

To consider: let an exact exit-name match win over a loose item match for open/close (and check lock/unlock, pick), while keeping the usual order everywhere else (people, then gear, then the rest).

2. examine the bag describes the bag, then says it isn't there

do_examine (src/act_info.cpp:1528) works in two steps that read the words differently:

  • Step 1 finds the target with one_argument, which skips filler words (in, from, with, the, on, at, to) and quotes. So examine the bag describes the bag.
  • Step 2 shows a container's contents by calling look with "in <argument>". That goes through argument_split_2 (src/act_info.cpp:1115), which does not skip filler words. So it looks for "the" and prints "You do not see that item here."

To consider: give both steps the same parsed word.

Raised during the keyring branch review. That branch keeps both behaviors as they are on purpose.

Dominant language
C++
Stars
3
Forks
4
Avg merge
18h 36m
Merged PRs (30d)
87

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from returnoftheshadow/RotS_Live

All issues in returnoftheshadow/RotS_Live

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.