lit/ShUtil.py: Deprecate '!' in shell expression. It is not sh-compatible.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 25 Jan 2013 06:30:36 +0000 (06:30 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 25 Jan 2013 06:30:36 +0000 (06:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173421 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/lit/ShUtil.py

index dda622a48a8487cbede5ad84d926210865eb0f66..5d65dc0d3d9caa5782dea53ed88e662fee98bd3e 100644 (file)
@@ -129,7 +129,7 @@ class ShLexer:
         lex_one_token - Lex a single 'sh' token. """
 
         c = self.eat()
-        if c in ';!':
+        if c == ';':
             return (c,)
         if c == '|':
             if self.maybe_eat('|'):
@@ -219,9 +219,6 @@ class ShParser:
 
     def parse_pipeline(self):
         negate = False
-        if self.look() == ('!',):
-            self.lex()
-            negate = True
 
         commands = [self.parse_command()]
         while self.look() == ('|',):
@@ -317,10 +314,6 @@ class TestShParse(unittest.TestCase):
                                    Command(['c'], [])],
                                   False))
 
-        self.assertEqual(self.parse('! a'),
-                         Pipeline([Command(['a'], [])],
-                                  True))
-
     def test_list(self):        
         self.assertEqual(self.parse('a ; b'),
                          Seq(Pipeline([Command(['a'], [])], False),