dasm-assembler / dasm-assembler/dasm
include without quoted filename misbehaving
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 257
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
If you include a file without quotes surrounding the filename, dasm does actually include the file correctly...
but it also lists the filename as an unresolved symbol.
The manual, and here I'm being a bit self-referential, specifies that the include uses quotes around the name. Or more specifically it does not list the format without quotes.
My preference is to require quotes and flag non-quotes as an error... but this would probably break a lot of stuff.
The next best is to fix things up so that includes without quotes do not generate "unresolved symbol" warnings.
--- Unresolved Symbol List
NO_ILLEGAL_OPCODES 0000 ???? (R )
vcs.h 0000 ???? (R )
RowGfx.h 0000 ???? (R )
macro.h 0000 ???? (R )
Colors.h 0000 ???? (R )
--- 5 Unresolved Symbols
It's pretty clear what the includes were.
One argument for requiring quotes - let's say I had a weird filename like + (the symbol + without anything else). In this case
include +
Will fail with an error, whereas the quoted form will work just fine.
Another way of saying this, it seems that dasm is parsing the line without quotes as if the parameter was a symbol, and so it is thus required to obey symbol syntax/rules -- which is definitely not the case with filenames.
So, I believe this is an issue that needs addressing as a bug, not just lacking documentation.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files, tests, or entry points. Start by locating the parser and unresolved-symbol reporting for include directives, then reproduce the unquoted and quoted cases described here. Done means unquoted filenames no longer appear as unresolved symbols while quoted includes continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100