From 5c325b8613a4323ee47bd42ce6d962b9ab9f2d90 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 24 Oct 2016 15:00:55 +0300 Subject: Change ! syntaxt to <- and >- --- build2/test/script/lexer.cxx | 8 ++++---- build2/test/script/script.cxx | 2 +- build2/test/script/token | 4 ++-- build2/test/script/token.cxx | 4 ++-- tests/test/script/testscript | 4 ++-- unit-tests/test/script/parser/command-re-parse.test | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build2/test/script/lexer.cxx b/build2/test/script/lexer.cxx index 1b038c3..d6e35cb 100644 --- a/build2/test/script/lexer.cxx +++ b/build2/test/script/lexer.cxx @@ -229,13 +229,13 @@ namespace build2 { xchar p (peek ()); - if (p == '!' || p == ':' || p == '<') + if (p == '-' || p == ':' || p == '<') { get (); switch (p) { - case '!': return make_token (type::in_null); + case '-': return make_token (type::in_null); case ':': return make_token (type::in_str_nn); case '<': { @@ -261,13 +261,13 @@ namespace build2 { xchar p (peek ()); - if (p == '!' || p == ':' || p == '>') + if (p == '-' || p == ':' || p == '>') { get (); switch (p) { - case '!': return make_token (type::out_null); + case '-': return make_token (type::out_null); case ':': return make_token (type::out_str_nn); case '>': { diff --git a/build2/test/script/script.cxx b/build2/test/script/script.cxx index 4dd47c5..172533c 100644 --- a/build2/test/script/script.cxx +++ b/build2/test/script/script.cxx @@ -40,7 +40,7 @@ namespace build2 switch (r.type) { case redirect_type::none: assert (false); break; - case redirect_type::null: o << '!'; break; + case redirect_type::null: o << '-'; break; case redirect_type::here_string: to_stream_q (o, r.value); break; case redirect_type::here_document: { diff --git a/build2/test/script/token b/build2/test/script/token index c1e05fd..d20309a 100644 --- a/build2/test/script/token +++ b/build2/test/script/token @@ -31,13 +31,13 @@ namespace build2 log_and, // && log_or, // || - in_null, // ! + out_null, // >- out_str, // > out_str_nn, // >: out_doc, // >> diff --git a/build2/test/script/token.cxx b/build2/test/script/token.cxx index 31bfcd5..0a8ecf1 100644 --- a/build2/test/script/token.cxx +++ b/build2/test/script/token.cxx @@ -28,13 +28,13 @@ namespace build2 case token_type::log_and: os << q << "&&" << q; break; case token_type::log_or: os << q << "||" << q; break; - case token_type::in_null: os << q << "!" << q; break; + case token_type::out_null: os << q << ">-" << q; break; case token_type::out_str: os << q << '>' << q; break; case token_type::out_str_nn: os << q << ">:" << q; break; case token_type::out_doc: os << q << ">>" << q; break; diff --git a/tests/test/script/testscript b/tests/test/script/testscript index 9055062..4d5d3b3 100644 --- a/tests/test/script/testscript +++ b/tests/test/script/testscript @@ -1,8 +1,8 @@ $* $* -i 0 foo -$* -o foo >! -$* -e foo 2>! +$* -o foo >- +$* -e foo 2>- $* -o foo -o bar >>EOO foo diff --git a/unit-tests/test/script/parser/command-re-parse.test b/unit-tests/test/script/parser/command-re-parse.test index 5ea2284..3b9ae3e 100644 --- a/unit-tests/test/script/parser/command-re-parse.test +++ b/unit-tests/test/script/parser/command-re-parse.test @@ -2,8 +2,8 @@ # double-quote # $* <>EOO -x = cmd \\">!\\" "'-\\" "'<-'" \$x EOI -cmd ">!" "-" "<-" EOO -- cgit v1.1