1 ๏ปฟ/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2 * Use of this file is governed by the BSD 3-clause license that
3 * can be found in the LICENSE.txt file in the project root.
10 // Created by Mike Lischke on 13.03.16.
15 #include "antlr4-runtime.h"
21 #pragma execution_character_set("utf-8")
23 using namespace antlrcpptest;
24 using namespace antlr4;
26 int main(int argc, const char * argv[]) {
28 ANTLRInputStream input("๐ด = ๐ + \"๐\";(((x * ฯ))) * ยต + โฐ; a + (x * (y ? 0 : 1) + z);");
30 CommonTokenStream tokens(&lexer);
32 TParser parser(&tokens);
33 tree::ParseTree *tree = parser.main();
35 std::wstring s = antlrcpp::s2ws(tree->toStringTree(&parser)) + L"\n";
37 OutputDebugString(s.data()); // Only works properly since VS 2015.
38 //std::wcout << "Parse Tree: " << s << std::endl; Unicode output in the console is very limited.