]> mj.ucw.cz Git - moe.git/blobdiff - t/moe/config_parser.py
Fixed dummy task type
[moe.git] / t / moe / config_parser.py
index 217cd9177a5003cbea0a05d540eab0e2f2052e83..6dec8c9cd2a13d91e6a91b5ba32c5d7a8c933a7e 100644 (file)
@@ -1,7 +1,4 @@
 r"""
-config_parser.py
-----------------
-
 Simple Moe configuration file syntax parser. 
 
 Generally, whitespace and comments are alowed everywhere except in variable names and inside expressions. 
@@ -239,8 +236,10 @@ class ConfigParser(object):
       op = 'SET'
     elif self.nexts(self.c_append):
       op = 'APPEND'
+    elif self.eof():
+      self.syntax_error('Unexpected end of file.')
     else:
-      self.syntax_error('Unknown operation.')
+      self.syntax_error('Unknown operation: %r...', self.peek(10))
     self.p_WS()
     exp = self.p_EXPRESSION()
     vname = (self.prefix+self.c_varname_sep+varname).lstrip(self.c_varname_sep)