Separated implementation of build_syntax_tree into the cpp file.
fixed error in syntax_tree test. Now the test runs correctly,  further tests are necessary.