If I try to run Quex 0.66.2 demo/Cpp/003 on Windows it crashes with run-time exception.
Unhandled exception at 0x00007FFEED4C7788 in 003.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000B7EEF9B908. ->>>>>>>>>>> LexatomLoader.i, line 399:
if( ! me->converter->virginity_f ) {
QUEX_ERROR_EXIT("Converter produced BOM upon not-first call to 'convert'\n"
"Better make sure that converter NEVER produces BOM.\n"
"(May be, by specifiying the endianness of 'FromCoding' or 'ToCoding')\n");
}
The error probably because of Byte-Order-Mark in file since Windows has those??? I looked at demo/Cpp/003 but I can't find the correct input stream to use with Lexer's in demo/Cpp/003, here is what I've tried:
max::Lexer max_lex("example-utf16.txt", "UTF16"); QUEX_TYPE_BOM bom_type = quex::bom_snap(&max_lex);
Here is what I've also tried, this is a modifed demo/cpp/012 sample that uses what you do in demo/cpp/003 to skip the Byte-Order-Mark in Windows. This exits the loop immidiately as the first token is <TERMINATION>:
demo/cpp/003 has the same issue, the first token is <TERMINATION>.
Last edit: Dizzzzy 2016-11-19