Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5554 closed Bugs (worksforme)

wave slex parser eof without eol skips the last line

Reported by: József Mihalicza <jmihalicza@…> Owned by: Hartmut Kaiser
Milestone: To Be Determined Component: wave
Version: Boost 1.46.1 Severity: Problem
Keywords: Cc:

Description

Running cpp_tokens on the attached file produces empty output.

Attachments (2)

sx3.c (25 bytes ) - added by József Mihalicza <jmihalicza@…> 11 years ago.
sx3.cpp_tokens.txt (165 bytes ) - added by József Mihalicza <jmihalicza@…> 11 years ago.

Download all attachments as: .zip

Change History (4)

by József Mihalicza <jmihalicza@…>, 11 years ago

Attachment: sx3.c added

by József Mihalicza <jmihalicza@…>, 11 years ago

Attachment: sx3.cpp_tokens.txt added

comment:1 by Hartmut Kaiser, 11 years ago

Resolution: worksforme
Status: newclosed

Sorry, but I'm not able to reproduce this problem. The output I get is:

matched INT              (#334) at test.cpp (  1/ 1): >int<
matched SPACE            (#392) at test.cpp (  1/ 4): > <
matched IDENTIFIER       (#380) at test.cpp (  1/ 5): >f<
matched LEFTPAREN        (#277) at test.cpp (  1/ 6): >(<
matched RIGHTPAREN       (#294) at test.cpp (  1/ 7): >)<
matched SPACE            (#392) at test.cpp (  1/ 8): > <
matched LEFTBRACE        (#274) at test.cpp (  1/ 9): >{<
matched SPACE            (#392) at test.cpp (  1/10): > <
matched RETURN           (#345) at test.cpp (  1/11): >return<
matched SPACE            (#392) at test.cpp (  1/17): > <
matched IDENTIFIER       (#380) at test.cpp (  1/18): >z<
matched QUESTION_MARK    (#292) at test.cpp (  1/19): >?<
matched PP_NUMBER        (#403) at test.cpp (  1/20): >0<
matched COLON            (#265) at test.cpp (  1/21): >:<
matched PP_NUMBER        (#403) at test.cpp (  1/22): >1<
matched SEMICOLON        (#297) at test.cpp (  1/23): >;<
matched SPACE            (#392) at test.cpp (  1/24): > <
matched RIGHTBRACE       (#293) at test.cpp (  1/25): >}<
matched NEWLINE          (#394) at test.cpp (  1/26): >\n<
matched EOF              (#401) at test.cpp (  2/ 1): ><

comment:2 by Hartmut Kaiser, 11 years ago

After some tinkering I realized that the problem you reported manifests itself only for files which are not terminated with a newline character. That has been properly fixed now in SVN (rev. [72062]).

Note: See TracTickets for help on using tickets.