diff --git a/fsabuilder/morfeuszbuilder/segrules/separatorChars.py b/fsabuilder/morfeuszbuilder/segrules/separatorChars.py new file mode 100644 index 0000000..a964154 --- /dev/null +++ b/fsabuilder/morfeuszbuilder/segrules/separatorChars.py @@ -0,0 +1,21 @@ +''' +Created on 3 kwi 2014 + +@author: mlenart +''' + +from morfeuszbuilder.utils import exceptions + +def parseSeparatorChars(segtypesConfigFile): + res = [] + for lineNum, line in segtypesConfigFile.enumerateLinesInSection('separator chars', ignoreComments=True): + try: + cp = int(line) + res.append(cp) + except ValueError as ex: + raise exceptions.ConfigFileException( + segtypesConfigFile.filename, + lineNum, + str(ex)) + return res + \ No newline at end of file