antlr4 icon indicating copy to clipboard operation
antlr4 copied to clipboard

runtime-cpp-demo does not build as C++20

Open pjonsson opened this issue 2 years ago β€’ 1 comments

When tryng to build runtime-cpp-demo in runtime/Cpp/demo/Linux/main.cpp as C++20, I get the following error message:

src/antlr4/runtime/Cpp/demo/Linux/main.cpp:24:104: error: no matching function for call to β€˜antlr4::ANTLRInputStream::ANTLRInputStream(const char8_t [73])’
   24 |   ANTLRInputStream input(u8"🍴 = 🍐 + \"😎\";(((x * Ο€))) * Β΅ + ∰; a + (x * (y ? 0 : 1) + z);");
      |                                                                                                        ^
...

The remaining u8 prefixes besides this after commit 09eb905332c3abe are in the Mac cpp-runtime-demo, but unfortunately I cannot test that. I tried removing the u8 prefix in the Linux demo and that made it build for me as C++20.

pjonsson avatar Apr 09 '22 09:04 pjonsson

When tryng to build runtime-cpp-demo in runtime/Cpp/demo/Linux/main.cpp as C++20, I get the following error message:

src/antlr4/runtime/Cpp/demo/Linux/main.cpp:24:104: error: no matching function for call to β€˜antlr4::ANTLRInputStream::ANTLRInputStream(const char8_t [73])’
   24 |   ANTLRInputStream input(u8"🍴 = 🍐 + \"😎\";(((x * Ο€))) * Β΅ + ∰; a + (x * (y ? 0 : 1) + z);");
      |                                                                                                        ^
...

The remaining u8 prefixes besides this after commit 09eb905 are in the Mac cpp-runtime-demo, but unfortunately I cannot test that. I tried removing the u8 prefix in the Linux demo and that made it build for me as C++20.

I build failed in C++11, can you help me? The error message is under: make[2]: *** No rule to make target '/opt/antlr4/runtime/Cpp/demo/demo/TParser.g4', needed by '/opt/antlr4/runtime/Cpp/demo/demo/generated/TLexer.cpp'. Stop. CMakeFiles/Makefile2:83: recipe for target 'CMakeFiles/GenerateParser.dir/all' failed make[1]: *** [CMakeFiles/GenerateParser.dir/all] Error 2 Makefile:135: recipe for target 'all' failed make: *** [all] Error 2

shiyi23 avatar Sep 06 '22 11:09 shiyi23