Sure, will add instructions to the README. Basically, you can either run reflex/bin/reflex.exe from the command line or use a "custom-build step" from MSVC++ (will explain) to run reflex.exe on a .l file. Then to compile your program with MSVC++, make sure to drag the C++ header files
located in reflex/include/reflex to "Header Files" in the "Solution Explorer"
panel, and drag the C++ source files located in reflex/lib and reflex/unicode to the "Source Files" in the "Solution Explorer" panel. reflex/unicode.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I'm adding to this old thread. I'm wanted to give re/flex a try and currently I'm little annoyed by the comments with the line numbers for error messages in generated lexer files. When I specify a file with native Windows path separators, the comments in the generated output keep the native separator, which causes warnings (and other subtle problems in IDE).
I'm using QtCreator with VisualC compiler and custom rules for generating the output and can't find a way to send the path with forward slashes to the compiler...
Example input:
reflex.exe -o sample.l.cpp ..\src\sample.l
Output in file sample.l.cpp:
...
#line 2 "..\src\sample.l"
...
VisualC complains:
C4129: 's': unrecognized character escape sequence
C4129: 'c': unrecognized character escape sequence
Would it be possible for reflex.exe to either escape the backslashes, or convert them to forward slashes?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a new project. Tell us what you think. What parts are good and what can be improved?
The code is thoroughly tested. But if you find a bug then we want to know! Post your ticket in the project tracker https://sourceforge.net/p/re-flex/tickets/
Hello Robert,
Wanted to try reflex, but am not able to use it with Visual Studio.Could provide a detailed explanation for Windows users.
Thank You.
Sure, will add instructions to the README. Basically, you can either run
reflex/bin/reflex.exe
from the command line or use a "custom-build step" from MSVC++ (will explain) to runreflex.exe
on a .l file. Then to compile your program with MSVC++, make sure to drag the C++ header fileslocated in
reflex/include/reflex
to "Header Files" in the "Solution Explorer"panel, and drag the C++ source files located in
reflex/lib
andreflex/unicode
to the "Source Files" in the "Solution Explorer" panel.reflex/unicode
.Hello, I'm adding to this old thread. I'm wanted to give re/flex a try and currently I'm little annoyed by the comments with the line numbers for error messages in generated lexer files. When I specify a file with native Windows path separators, the comments in the generated output keep the native separator, which causes warnings (and other subtle problems in IDE).
I'm using QtCreator with VisualC compiler and custom rules for generating the output and can't find a way to send the path with forward slashes to the compiler...
Example input:
Output in file sample.l.cpp:
VisualC complains:
Would it be possible for reflex.exe to either escape the backslashes, or convert them to forward slashes?
Thanks.
I am happy to report that this problem was fixed a while ago in version 1.1.2 based on your feedback. Thanks!