X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=t%2Fmoe%2Fconfig_parser.py;h=6dec8c9cd2a13d91e6a91b5ba32c5d7a8c933a7e;hb=b5ef6bb91d88949931339721484770bfecc109f4;hp=217cd9177a5003cbea0a05d540eab0e2f2052e83;hpb=b07a7c4bf08db2928e1845c4e60798f7c9ad8b65;p=moe.git diff --git a/t/moe/config_parser.py b/t/moe/config_parser.py index 217cd91..6dec8c9 100644 --- a/t/moe/config_parser.py +++ b/t/moe/config_parser.py @@ -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)