YYERROR_VERBOSE = {1:s}
{2:s}{3:s}{4:s}# GENERATE END
'''.format(
- 'True' if _ast[0].debug else 'False',
- 'True' if _ast[0].error_verbose else 'False',
+ 'True' if _ast.children[0].debug else 'False',
+ 'True' if _ast.children[0].error_verbose else 'False',
''.join(
[
'''def yy_action{0:d}():
'''# GENERATE SECTION3 BEGIN
{0:s}# GENERATE END
'''.format(
- '' if len(_ast) < 3 else ast_text_to_python(_ast[2], '')
+ '' if len(_ast.children) < 3 else ast_text_to_python(_ast.children[2], '')
)
)
else:
lex_yy_code.unput($2)
lex_yy_code.sc_context = lex_yy_code.SC_SYMBOL_ACTION # CODE_PROPS_SYMBOL_ACTION
lex_yy_code.yylex(t_def.AST.Text)
- assert isinstance(yy_element_stack[-1][0], t_def.AST.Section1.InitialAction)
- assert isinstance(yy_element_stack[-1][0][0], t_def.AST.Text)
- tail = element.get_text(yy_element_stack[-1][0], 1)
- yy_element_stack[-1][0][0] = lex_yy_code.yy_element_space
- element.set_text(yy_element_stack[-1][0], 1, tail)
+ assert isinstance(yy_element_stack[-1].children[0], t_def.AST.Section1.InitialAction)
+ assert isinstance(yy_element_stack[-1].children[0].children[0], t_def.AST.Text)
+ tail = element.get_text(yy_element_stack[-1].children[0], 1)
+ yy_element_stack[-1].children[0].children[0] = lex_yy_code.yy_element_space
+ element.set_text(yy_element_stack[-1].children[0], 1, tail)
}
| %space (?E{t_def.AST.Section1.Language}"%language" STRING)
| %space (?E{t_def.AST.Section1.NamePrefix}"%name-prefix" STRING)
lex_yy_code.unput($2)
lex_yy_code.sc_context = lex_yy_code.SC_SYMBOL_ACTION # CODE_PROPS_SYMBOL_ACTION
lex_yy_code.yylex(t_def.AST.Text)
- assert isinstance(yy_element_stack[-1][0], t_def.AST.Section1Or2.CodeProps)
- assert isinstance(yy_element_stack[-1][0][0], t_def.AST.Text)
- tail = element.get_text(yy_element_stack[-1][0], 1)
- yy_element_stack[-1][0][0] = lex_yy_code.yy_element_space
- element.set_text(yy_element_stack[-1][0], 1, tail)
+ assert isinstance(yy_element_stack[-1].children[0], t_def.AST.Section1Or2.CodeProps)
+ assert isinstance(yy_element_stack[-1].children[0].children[0], t_def.AST.Text)
+ tail = element.get_text(yy_element_stack[-1].children[0], 1)
+ yy_element_stack[-1].children[0].children[0] = lex_yy_code.yy_element_space
+ element.set_text(yy_element_stack[-1].children[0], 1, tail)
}
| %space (?E{t_def.AST.Section1Or2.DefaultPrec, value = True}"%default-prec")
| %space (?E{t_def.AST.Section1Or2.DefaultPrec}"%no-default-prec")
| %space (?E{t_def.AST.Section1Or2.Code}"%code" (?E{t_def.AST.ID}) %space (?E{t_def.AST.BracedCode}"{...}") )
{
# most egregious (leftover from when we used to run code scanner on it):
- assert isinstance(yy_element_stack[-1][0], t_def.AST.Section1Or2.Code)
- assert isinstance(yy_element_stack[-1][0][1], t_def.AST.BracedCode)
- assert isinstance(yy_element_stack[-1][0][1][0], t_def.AST.Text)
+ assert isinstance(yy_element_stack[-1].children[0], t_def.AST.Section1Or2.Code)
+ assert isinstance(yy_element_stack[-1].children[0].children[1], t_def.AST.BracedCode)
+ assert isinstance(yy_element_stack[-1].children[0].children[1].children[0], t_def.AST.Text)
element.set_text(
- yy_element_stack[-1][0][1][0],
+ yy_element_stack[-1].children[0].children[1].children[0],
0,
- element.get_text(yy_element_stack[-1][0][1][0], 0)[1:-1] # remove { }
+ element.get_text(yy_element_stack[-1].children[0].children[1].children[0], 0)[1:-1] # remove { }
)
element.set_text(
- yy_element_stack[-1][0][1],
+ yy_element_stack[-1].children[0].children[1],
0,
- element.get_text(yy_element_stack[-1][0][1], 0) + '{'
+ element.get_text(yy_element_stack[-1].children[0].children[1], 0) + '{'
)
element.set_text(
- yy_element_stack[-1][0][1],
+ yy_element_stack[-1].children[0].children[1],
1,
- '}' + element.get_text(yy_element_stack[-1][0][1], 1)
+ '}' + element.get_text(yy_element_stack[-1].children[0].children[1], 1)
)
}
/* the BracedCode should be removed altogether, put here for compatibility */
| %space (?E{t_def.AST.Section1Or2.Code}"%code" ID %space (?E{t_def.AST.BracedCode}"{...}") )
{
# most egregious (leftover from when we used to run code scanner on it):
- assert isinstance(yy_element_stack[-1][0], t_def.AST.Section1Or2.Code)
- assert isinstance(yy_element_stack[-1][0][1], t_def.AST.BracedCode)
- assert isinstance(yy_element_stack[-1][0][1][0], t_def.AST.Text)
+ assert isinstance(yy_element_stack[-1].children[0], t_def.AST.Section1Or2.Code)
+ assert isinstance(yy_element_stack[-1].children[0].children[1], t_def.AST.BracedCode)
+ assert isinstance(yy_element_stack[-1].children[0].children[1].children[0], t_def.AST.Text)
element.set_text(
- yy_element_stack[-1][0][1][0],
+ yy_element_stack[-1].children[0].children[1].children[0],
0,
- element.get_text(yy_element_stack[-1][0][1][0], 0)[1:-1] # remove { }
+ element.get_text(yy_element_stack[-1].children[0].children[1].children[0], 0)[1:-1] # remove { }
)
element.set_text(
- yy_element_stack[-1][0][1],
+ yy_element_stack[-1].children[0].children[1],
0,
- element.get_text(yy_element_stack[-1][0][1], 0) + '{'
+ element.get_text(yy_element_stack[-1].children[0].children[1], 0) + '{'
)
element.set_text(
- yy_element_stack[-1][0][1],
+ yy_element_stack[-1].children[0].children[1],
1,
- '}' + element.get_text(yy_element_stack[-1][0][1], 1)
+ '}' + element.get_text(yy_element_stack[-1].children[0].children[1], 1)
)
}
;
: %space (?E{t_def.AST.Section1Or2.Union}"%union" union_name %space (?E{t_def.AST.BracedCode}"{...}") )
{
# most egregious (leftover from when we used to run code scanner on it):
- assert isinstance(yy_element_stack[-1][0], t_def.AST.Section1Or2.Union)
- assert isinstance(yy_element_stack[-1][0][1], t_def.AST.BracedCode)
- assert isinstance(yy_element_stack[-1][0][1][0], t_def.AST.Text)
+ assert isinstance(yy_element_stack[-1].children[0], t_def.AST.Section1Or2.Union)
+ assert isinstance(yy_element_stack[-1].children[0].children[1], t_def.AST.BracedCode)
+ assert isinstance(yy_element_stack[-1].children[0].children[1].children[0], t_def.AST.Text)
element.set_text(
- yy_element_stack[-1][0][1][0],
+ yy_element_stack[-1].children[0].children[1].children[0],
0,
- element.get_text(yy_element_stack[-1][0][1][0], 0)[1:-1] # remove { }
+ element.get_text(yy_element_stack[-1].children[0].children[1].children[0], 0)[1:-1] # remove { }
)
element.set_text(
- yy_element_stack[-1][0][1],
+ yy_element_stack[-1].children[0].children[1],
0,
- element.get_text(yy_element_stack[-1][0][1], 0) + '{'
+ element.get_text(yy_element_stack[-1].children[0].children[1], 0) + '{'
)
element.set_text(
- yy_element_stack[-1][0][1],
+ yy_element_stack[-1].children[0].children[1],
1,
- '}' + element.get_text(yy_element_stack[-1][0][1], 1)
+ '}' + element.get_text(yy_element_stack[-1].children[0].children[1], 1)
)
}
;
lex_yy_code.unput($2)
lex_yy_code.sc_context = lex_yy_code.SC_RULE_ACTION # CODE_PROPS_RULE_ACTION
lex_yy_code.yylex(t_def.AST.Text)
- assert isinstance(yy_element_stack[-1][0], t_def.AST.Production.Action)
- assert isinstance(yy_element_stack[-1][0][0], t_def.AST.Text)
- tail = element.get_text(yy_element_stack[-1][0], 1)
- yy_element_stack[-1][0][0] = lex_yy_code.yy_element_space
- element.set_text(yy_element_stack[-1][0], 1, tail)
+ assert isinstance(yy_element_stack[-1].children[0], t_def.AST.Production.Action)
+ assert isinstance(yy_element_stack[-1].children[0].children[0], t_def.AST.Text)
+ tail = element.get_text(yy_element_stack[-1].children[0], 1)
+ yy_element_stack[-1].children[0].children[0] = lex_yy_code.yy_element_space
+ element.set_text(yy_element_stack[-1].children[0], 1, tail)
}
| rhs "%?{...}"
{
lex_yy_code.unput($2[4:-1])
lex_yy_code.sc_context = lex_yy_code.SC_RULE_ACTION # CODE_PROPS_RULE_ACTION
lex_yy_code.yylex(t_def.AST.Text)
- assert isinstance(yy_element_stack[-1][0], t_def.AST.Production.GroupElement)
- assert isinstance(yy_element_stack[-1][0][0], t_def.AST.Text)
- tail = element.get_text(yy_element_stack[-1][0], 1)
- yy_element_stack[-1][0][0] = lex_yy_code.yy_element_space
- element.set_text(yy_element_stack[-1][0], 1, tail)
+ assert isinstance(yy_element_stack[-1].children[0], t_def.AST.Production.GroupElement)
+ assert isinstance(yy_element_stack[-1].children[0].children[0], t_def.AST.Text)
+ tail = element.get_text(yy_element_stack[-1].children[0], 1)
+ yy_element_stack[-1].children[0].children[0] = lex_yy_code.yy_element_space
+ element.set_text(yy_element_stack[-1].children[0], 1, tail)
}
/* Nick added %space */
| rhs %space (?E{t_def.AST.Production.Space}"%space")
last_grouped_pos
):
assert production.precedence_terminal == -1
- _, production.precedence_terminal = self[0].post_process(
+ _, production.precedence_terminal = self.children[0].post_process(
_ast,
section,
character_to_symbol,
):
_ast.n_productions += int(last_action) # midrule action production
production.n_symbols += int(last_action) + 1 # midrule action symbol
- _, self.symbol = self[0].post_process(
+ _, self.symbol = self.children[0].post_process(
_ast,
section,
character_to_symbol,
has_space,
last_grouped_pos
):
- for i in self[1:]:
+ for i in self.children[1:]:
last_action, has_space, last_grouped_pos = i.post_process(
_ast,
section,
last_action = False
has_space = False
last_grouped_pos = 0
- for i in self:
+ for i in self.children:
last_action, has_space, last_grouped_pos = i.post_process(
_ast,
section,
string_to_symbol,
name_to_tag
):
- name = self[0].get_text()
+ name = self.children[0].get_text()
if len(name) == 0: # do the same as Section1.Prologue
(
_ast.before_union_text
if len(_ast.union_text) == 0 else
_ast.after_union_text
- ).append(self[1][0])
+ ).append(self.children[1].children[0])
elif name == 'top':
- _ast.top_text.append(self[1][0])
+ _ast.top_text.append(self.children[1].children[0])
elif name == 'requires':
- _ast.requires_text.append(self[1][0])
+ _ast.requires_text.append(self.children[1].children[0])
else:
assert False
@method(AST.Section1Or2.CodeProps)
string_to_symbol,
name_to_tag
):
- for i in self[1:]:
+ for i in self.children[1:]:
_, j = i.post_process(
_ast,
section,
)
tag_or_symbol = _ast.symbols[j] if j >= 0 else _ast.tags[~j]
assert tag_or_symbol.code_props[self._type] is None
- tag_or_symbol.code_props[self._type] = self[0]
+ tag_or_symbol.code_props[self._type] = self.children[0]
@method(AST.Section1Or2.NTerm)
def post_process(
self,
name_to_tag
):
_tag = -1
- for i in self:
+ for i in self.children:
_tag, _ = i.post_process(
_ast,
section,
name_to_tag
):
_tag = -1
- for i in self:
+ for i in self.children:
_tag, _ = i.post_process(
_ast,
section,
string_to_symbol,
name_to_tag
):
- _, _ast.start_nonterminal = self[0].post_process(
+ _, _ast.start_nonterminal = self.children[0].post_process(
_ast,
section,
character_to_symbol,
name_to_tag
):
_tag = -1
- for i in self:
+ for i in self.children:
_tag, _ = i.post_process(
_ast,
section,
name_to_tag
):
_tag = -1
- for i in self:
+ for i in self.children:
_tag, _ = i.post_process(
_ast,
section,
string_to_symbol,
name_to_tag
):
- name = self[0].get_text()
+ name = self.children[0].get_text()
if len(name):
assert len(_ast.union_name) == 0
_ast.union_name = name
- _ast.union_text.append(self[1][0])
+ _ast.union_text.append(self.children[1].children[0])
@method(AST.Section1Or2)
def post_process(
self,
string_to_symbol,
name_to_tag
):
- for i in self:
+ for i in self.children:
i.post_process(
_ast,
self,
string_to_symbol,
name_to_tag
):
- name = self[0].get_text()
+ name = self.children[0].get_text()
value = (
''
- if len(self) < 2 else
+ if len(self.children) < 2 else
(
- self[1]
- if isinstance(self[1], AST.ID) else
- self[1][0] # String or BracedCode
+ self.children[1]
+ if isinstance(self.children[1], AST.ID) else
+ self.children[1].children[0] # String or BracedCode
).get_text()
)
if name == 'api.prefix':
string_to_symbol,
name_to_tag
):
- assert len(self) == 0
+ assert len(self.children) == 0
section.defines = True
@method(AST.Section1.ErrorVerbose)
def post_process(
string_to_symbol,
name_to_tag
):
- assert isinstance(self[0], AST.Text) # temporary
- _ast.initial_action_text.append(self[0])
+ assert isinstance(self.children[0], AST.Text) # temporary
+ _ast.initial_action_text.append(self.children[0])
@method(AST.Section1.Locations)
def post_process(
self,
string_to_symbol,
name_to_tag
):
- section.name_prefix = self[0][0].get_text()
+ section.name_prefix = self.children[0].children[0].get_text()
@method(AST.Section1.Prologue)
def post_process(
self,
_ast.before_union_text
if len(_ast.union_text) == 0 else
_ast.after_union_text
- ).append(self[0])
+ ).append(self.children[0])
@method(AST.Section1.PureParser)
def post_process(
self,
string_to_symbol,
name_to_tag
):
- _, lhs_nonterminal = self[0].post_process(
+ _, lhs_nonterminal = self.children[0].post_process(
_ast,
section,
character_to_symbol,
)
if _ast.first_nonterminal == -1:
_ast.first_nonterminal = lhs_nonterminal
- for i in self[1:]:
+ for i in self.children[1:]:
i.post_process(
_ast,
section,
_tag,
precedence
):
- name = self[0].get_text()
+ name = self.children[0].get_text()
if name in name_to_tag:
_tag = name_to_tag[name]
else:
_tag,
precedence
):
- if isinstance(self[0], AST.Char):
- character = ord(self[0][0].get_text())
+ if isinstance(self.children[0], AST.Char):
+ character = ord(self.children[0].children[0].get_text())
assert character != 0 # would conflict with YYEOF
if character in character_to_symbol:
symbol = character_to_symbol[character]
character_set = [character, character + 1]
)
)
- elif isinstance(self[0], AST.ID):
- name = self[0].get_text()
+ elif isinstance(self.children[0], AST.ID):
+ name = self.children[0].get_text()
if name in name_to_symbol:
symbol = name_to_symbol[name]
assert self.user_token != 0
character_set = []
)
)
- elif isinstance(self[0], AST.String):
- string = self[0][0].get_text()
+ elif isinstance(self.children[0], AST.String):
+ string = self.children[0].children[0].get_text()
symbol = string_to_symbol[string] # must already exist
else:
assert False
_ast.symbols[symbol].character_set = (
[self.user_token, self.user_token + 1]
)
- if len(self) >= 2:
- string = self[1][0].get_text()
+ if len(self.children) >= 2:
+ string = self.children[1].children[0].get_text()
assert string not in string_to_symbol
string_to_symbol[string] = symbol
# insert information from the calling contexxt
# perform the semantic analysis pass
self.first_nonterminal = -1
self.start_nonterminal = -1
- self[0].post_process(
+ self.children[0].post_process(
self,
character_to_symbol,
name_to_symbol,
string_to_symbol,
name_to_tag
)
- self[1].post_process(
+ self.children[1].post_process(
self,
character_to_symbol,
name_to_symbol,
(False, [], True, 0, last_action)
)
)
- for i in self[0]:
+ for i in self.children[0].children:
if isinstance(i, AST.Text.StackLocation):
i.offset = -len(symbols)
elif isinstance(i, AST.Text.StackReference):
):
i.tag_name = tag_names[i.index - 1]
i.offset = -len(symbols)
- return self[0]
+ return self.children[0]
@method(AST.Production.SymbolRef)
def add_to_symbols(
self,
symbols,
tag_names
):
- for i in self[0]:
+ for i in self.children[0].children:
if isinstance(i, AST.Text.StackLocation):
i.offset = -production.n_symbols
elif isinstance(i, AST.Text.StackReference):
):
i.tag_name = tag_names[i.index - 1]
i.offset = -production.n_symbols
- for i in self[1:]:
+ for i in self.children[1:]:
last_action = i.add_to_symbols(
_ast,
production,
last_grouped_pos
):
pos1 = pos
- for i in self[:0:-1]:
+ for i in self.children[:0:-1]:
first_action, pos, last_grouped_pos = i.add_to_groups(
_ast,
production,
pos,
last_grouped_pos
)
- groups.append((pos, pos1, self[0]))
+ groups.append((pos, pos1, self.children[0]))
pos = pos1 - 1
return first_action, pos, pos
@method(AST.Production.Space)
last_action = None
symbols = []
tag_names = []
- for i in self:
+ for i in self.children:
last_action = i.add_to_symbols(
_ast,
self,
)
assert len(symbols) == self.n_symbols
if last_action is not None:
- for i in last_action:
+ for i in last_action.children:
if (
isinstance(i, AST.Text.ValueReference) and
len(i.tag_name) == 0
first_action = False # have not had first action yet
pos = int(self.has_space) - int(self.take_space_right)
last_grouped_pos = pos # says last position where a group has started
- for i in self[::-1]:
+ for i in self.children[::-1]:
first_action, pos, last_grouped_pos = i.add_to_groups(
_ast,
self,
return ''.join(
[
j
- for i in range(len(self))
- for j in [element.get_text(self, i), self[i].get_text(python)]
+ for i in range(len(self.children))
+ for j in [element.get_text(self, i), self.children[i].get_text(python)]
] +
- [element.get_text(self, len(self))]
+ [element.get_text(self, len(self.children))]
)
del get_text
# total kludge: put back all whitespace/comments after the ID, and rescan
# (this will mess up the position tracking, need to revisit and fix later)
- unput(element.get_text(yy_element_space, len(yy_element_space)))
- element.set_text(yy_element_space, len(yy_element_space), '')
+ assert len(yy_element_space.text) == len(yy_element_space.children) + 1
+ unput(yy_element_space.text[-1])
+ yy_element_space.text[-1] = ''
markup_pop_token() # element.Element
BEGIN(SC_RETURN_BRACKETED_ID if bracketed_id_str else INITIAL)
# try to use more complex regular expressions to match all in one go:
def markup_flush(n):
- assert len(yy_element_space.text) == len(yy_element_space) + 1
- assert len(yy_element_token.text) == len(yy_element_token) + 1
+ assert len(yy_element_space.text) == len(yy_element_space.children) + 1
+ assert len(yy_element_token.text) == len(yy_element_token.children) + 1
yy_element_space.text[-1] += yy_element_token.text[0][:n]
yy_element_token.text[0] = yy_element_token.text[0][n:]
def markup_yyless(n):
- assert len(yy_element_space.text) == len(yy_element_space) + 1
- assert len(yy_element_token.text) == len(yy_element_token) + 1
+ assert len(yy_element_space.text) == len(yy_element_space.children) + 1
+ assert len(yy_element_token.text) == len(yy_element_token.children) + 1
yyless(n)
yy_element_token.text[0] = yy_element_token.text[0][:n]
def markup_push(factory, *args, **kwargs):
global yy_element_space
- assert len(yy_element_space.text) == len(yy_element_space) + 1
- assert len(yy_element_token.text) == len(yy_element_token) + 1
+ assert len(yy_element_space.text) == len(yy_element_space.children) + 1
+ assert len(yy_element_token.text) == len(yy_element_token.children) + 1
markup_stack.append(yy_element_space)
yy_element_space = factory(*args, **kwargs)
def markup_pop():
global yy_element_space
- assert len(yy_element_space.text) == len(yy_element_space) + 1
- assert len(yy_element_token.text) == len(yy_element_token) + 1
+ assert len(yy_element_space.text) == len(yy_element_space.children) + 1
+ assert len(yy_element_token.text) == len(yy_element_token.children) + 1
_element = yy_element_space
yy_element_space = markup_stack.pop()
- yy_element_space.append(_element)
+ yy_element_space.children.append(_element)
yy_element_space.text.append('')
def markup_pop_token():
global yy_element_space, yy_element_token
# append yy_element_token contents onto yy_element_space
- assert len(yy_element_space.text) == len(yy_element_space) + 1
- assert len(yy_element_token.text) == len(yy_element_token) + 1
+ assert len(yy_element_space.text) == len(yy_element_space.children) + 1
+ assert len(yy_element_token.text) == len(yy_element_token.children) + 1
yy_element_space.text[-1] += yy_element_token.text[0]
- yy_element_space.extend(yy_element_token[:])
+ yy_element_space.children.extend(yy_element_token.children)
yy_element_space.text.extend(yy_element_token.text[1:])
# exchange, so that space is now prepended onto token
del _element.text[:]
for pos2, pos3, i in reversed(stack):
_element.text.append(yy_group_text[pos0:pos2])
- _element.append(i)
+ _element.children.append(i)
pos0 = pos3
_element.text.append(yy_group_text[pos0:pos1])
return _element
raise Exception('scanner jammed')
# append yy_element_token contents onto yy_element_space
- assert len(yy_element_space.text) == len(yy_element_space) + 1
- assert len(yy_element_token.text) == len(yy_element_token) + 1
+ assert len(yy_element_space.text) == len(yy_element_space.children) + 1
+ assert len(yy_element_token.text) == len(yy_element_token.children) + 1
yy_element_space.text[-1] += yy_element_token.text[0]
- yy_element_space.extend(yy_element_token[:])
+ yy_element_space.children.extend(yy_element_token.children)
yy_element_space.text.extend(yy_element_token.text[1:])
# clear yy_element_token for next yytext or EOF action
del yy_element_token.text[1:]
- del yy_element_token[:]
+ del yy_element_token.children[:]
# GENERATE SECTION3
element.serialize(_ast, sys.stdout)
#element.serialize(_ast, 'a.xml', 'utf-8')
#_ast = element.deserialize('a.xml', t_def.factory, 'utf-8')
-for i in _ast:
+for i in _ast.children:
sys.stdout.write('{0:g}\n'.format(i.eval()))
raise NotImplementedException()
@method(AST.Num)
def eval(self):
- mantissa = self[0].get_text()
- fraction = self[1].get_text() if len(self) >= 2 else ''
+ mantissa = self.children[0].get_text()
+ fraction = self.children[1].get_text() if len(self.children) >= 2 else ''
return int(mantissa + fraction) * 10 ** -len(fraction)
@method(AST.Add)
def eval(self):
- return self[0].eval() + self[1].eval()
+ return self.children[0].eval() + self.children[1].eval()
@method(AST.Sub)
def eval(self):
- return self[0].eval() - self[1].eval()
+ return self.children[0].eval() - self.children[1].eval()
@method(AST.Mul)
def eval(self):
- return self[0].eval() * self[1].eval()
+ return self.children[0].eval() * self.children[1].eval()
@method(AST.Div)
def eval(self):
- return self[0].eval() / self[1].eval()
+ return self.children[0].eval() / self.children[1].eval()
@method(AST.Neg)
def eval(self):
- return -self[0].eval()
+ return -self.children[0].eval()
del eval