diff --git a/.travis.yml b/.travis.yml index 1e8480eb..b65da040 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,13 @@ compiler: addons: apt: + sources: + - ubuntu-toolchain-r-test packages: - libboost-regex-dev + - g++-5 -install: script/configure -D USE_BOOST_REGEX=true -D USE_LIBPROFILER=false +install: +- export CXX="g++-5" +- script/configure -D USE_BOOST_REGEX=true -D USE_LIBPROFILER=false script: script/ci diff --git a/spec/integration/compile_grammar_spec.cc b/spec/integration/compile_grammar_spec.cc index 0d55bd56..d6cbe627 100644 --- a/spec/integration/compile_grammar_spec.cc +++ b/spec/integration/compile_grammar_spec.cc @@ -83,23 +83,25 @@ describe("compile_grammar", []() { {"math_operation_prec_type", "PREC"} }).c_str()); - AssertThat(result.error_message, Equals(dedent(R"MESSAGE( - Unresolved conflict for symbol sequence: + AssertThat(result.error_message, Equals(dedent( + R"MESSAGE( + Unresolved conflict for symbol sequence: - expression '+' expression • '+' … + expression '+' expression • '+' … - Possible interpretations: + Possible interpretations: - (math_operation expression '+' expression) • '+' … + (math_operation expression '+' expression) • '+' … - expression '+' (math_operation expression • '+' expression) + expression '+' (math_operation expression • '+' expression) - Possible resolutions: + Possible resolutions: - Specify left or right associativity in the rules: math_operation + Specify left or right associativity in the rules: math_operation - Add a conflict for the rules: math_operation - )MESSAGE"))); + Add a conflict for the rules: math_operation + )MESSAGE" + ))); result = ts_compile_grammar(fill_template(grammar_template, { {"math_operation_prec_type", "PREC_LEFT"} @@ -194,25 +196,27 @@ describe("compile_grammar", []() { {"function_call_precedence", "0"} }).c_str()); - AssertThat(result.error_message, Equals(dedent(R"MESSAGE( - Unresolved conflict for symbol sequence: + AssertThat(result.error_message, Equals(dedent( + R"MESSAGE( + Unresolved conflict for symbol sequence: - identifier • '{' … + identifier • '{' … - Possible interpretations: + Possible interpretations: - (expression identifier) • '{' … + (expression identifier) • '{' … - (function_call identifier • block) + (function_call identifier • block) - Possible resolutions: + Possible resolutions: - Use different precedences in the rules: expression function_call + Use different precedences in the rules: expression function_call - Specify left or right associativity in the rules: expression + Specify left or right associativity in the rules: expression - Add a conflict for the rules: expression function_call - )MESSAGE"))); + Add a conflict for the rules: expression function_call + )MESSAGE" + ))); // Giving function calls lower precedence than expressions causes `bar` // to be treated as an expression passed to `foo`, not as a function