diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-11-17 01:35:29 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-11-22 18:52:21 +0300 |
commit | d52c1fb406b1cef82c5f5a28fc1804d7d99a49d8 (patch) | |
tree | 89236d3dcdf6245c75d761fde09040d9d2a56480 /tests/parser/driver.cxx | |
parent | be3dc4cee63da92cfa1fa44a0bf90ab11ec7aaca (diff) |
Add support for build2 for tests and examples
Diffstat (limited to 'tests/parser/driver.cxx')
-rw-r--r-- | tests/parser/driver.cxx | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/parser/driver.cxx b/tests/parser/driver.cxx deleted file mode 100644 index bc963b5..0000000 --- a/tests/parser/driver.cxx +++ /dev/null @@ -1,46 +0,0 @@ -// file : tests/parser/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : MIT; see accompanying LICENSE file - -#include <fstream> -#include <iostream> - -#include <parser.hxx> -#include <semantics.hxx> -#include <traversal.hxx> - -using namespace std; - -int -main (int argc, char* argv[]) -{ - if (argc != 2) - { - cerr << "usage: " << argv[0] << " file.cli" << endl; - return 1; - } - - try - { - semantics::path path (argv[1]); - - ifstream ifs; - ifs.exceptions (ifstream::failbit | ifstream::badbit); - ifs.open (path.string ().c_str ()); - - parser::paths include_paths; - parser p (include_paths); - p.parse (ifs, path); - } - catch (semantics::invalid_path const& e) - { - cerr << "error: '" << e.path () << "' is not a valid filesystem path" - << endl; - return 1; - } - catch (parser::invalid_input const&) - { - return 1; - } -} |