import types, itertools, re, bisect
import logging as log
+from moe import MoeError
"Allowed depth of recursion - includes ALL recursive calls, so should quite high."
c_maxdepth = 256
debug_maxdepth = depth
-class ConfigError(Exception):
+class ConfigError(MoeError):
pass
class UndefinedError(ConfigError):
v.dependants.remove(self)
# Remove the dependency on the conditions (if not used in another operation)
if operation.condition and operation.condition not in [op.condition for op in self.operations]:
- condition.dependants.remove(self)
+ operation.condition.dependants.remove(self)
def evaluate(self, depth=0):
"""
Find the last 'SET' operation that applies and return the result of concatenating with all
OR = FORMULA WS 'or' FORMULA
NOT = WS 'not' FORMULA
+NOTE: ';' or '\n' is currently required even after CONDITION and SUBTREE block
+ TODO: change to OPERATION only
NOTE: Formula may contain additional/extra parentheses
EXPRESSION = '"' ( ECHAR | '{' VARNAME '}' )* '"' | re"'[^'\\n]*'"
import re, types, itertools, logging as log
import traceback
-import conf
+import moe.conf
class ConfigSyntaxError(conf.ConfigError):
def __init__(self, msg, fname='<unknown>', line=None, column=None):