summaryrefslogtreecommitdiffstats
path: root/cobbler/yaml/inline.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/yaml/inline.py')
-rw-r--r--cobbler/yaml/inline.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/cobbler/yaml/inline.py b/cobbler/yaml/inline.py
deleted file mode 100644
index d4f6439a..00000000
--- a/cobbler/yaml/inline.py
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-pyyaml legacy
-Copyright (c) 2001 Steve Howell and Friends; All Rights Reserved
-(see open source license information in docs/ directory)
-"""
-
-import re
-import string
-
-class InlineTokenizer:
- def __init__(self, data):
- self.data = data
-
- def punctuation(self):
- puncts = [ '[', ']', '{', '}' ]
- for punct in puncts:
- if self.data[0] == punct:
- self.data = self.data[1:]
- return punct
-
- def up_to_comma(self):
- match = re.match('(.*?)\s*, (.*)', self.data)
- if match:
- self.data = match.groups()[1]
- return match.groups()[0]
-
- def up_to_end_brace(self):
- match = re.match('(.*?)(\s*[\]}].*)', self.data)
- if match:
- self.data = match.groups()[1]
- return match.groups()[0]
-
- def next(self):
- self.data = string.strip(self.data)
- productions = [
- self.punctuation,
- self.up_to_comma,
- self.up_to_end_brace
- ]
- for production in productions:
- token = production()
- if token:
- return token
-