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"
19 using namespace antlrcpptest;
20 using namespace antlr4;
22 int main(int , const char **) {
23 ANTLRInputStream input(u8"๐ด = ๐ + \"๐\";(((x * ฯ))) * ยต + โฐ; a + (x * (y ? 0 : 1) + z);");
25 CommonTokenStream tokens(&lexer);
28 for (auto token : tokens.getTokens()) {
29 std::cout << token->toString() << std::endl;
32 TParser parser(&tokens);
33 tree::ParseTree* tree = parser.main();
35 std::cout << tree->toStringTree(&parser) << std::endl << std::endl;