Unterminated string literals should be rejected by the lexer
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by reproducing the quoted input with an embedded newline and tracing the Wave lexer path that emits the shown token sequence. Identify the lexer handling for string literals and the existing lexer-exception tests or test entry point. Done means the unterminated literal raises a lexer exception instead of producing separate tokens.
Written by the indexing model from the issue text.
Description
At the moment Wave accepts text like this:
"A
B"
which a user might accidentally write, intending to create a multi-line string literal with an embedded newline. In fact these "classic" (pre C++11) string literals disallow newlines.
Unfortunately, Wave has been turning these into a series of tokens:
<UnknownToken> (#34 ) at /tmp/blah.c ( 1/ 1): >"<
IDENTIFIER (#380) at /tmp/blah.c ( 1/ 2): >A<
NEWLINE (#394) at /tmp/blah.c ( 1/ 3): >\n<
IDENTIFIER (#380) at /tmp/blah.c ( 2/ 1): >B<
<UnknownToken> (#34 ) at /tmp/blah.c ( 2/ 2): >"<
It can then go on to do work on these tokens, like directive evaluation, as described in bug #225.
Wave should produce a lexer exception in this case instead.
- Dominant language
- C++
- Stars
- 29
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
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.
More from boostorg/wave
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Is it possible? Dumping preprocessor state at end of output so that preprocessing can be resumed? Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·