本文整理汇总了Python中nifty.environment.helpers.get_statement_iterator函数的典型用法代码示例。如果您正苦于以下问题:Python get_statement_iterator函数的具体用法?Python get_statement_iterator怎么用?Python get_statement_iterator使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_statement_iterator函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: analyze_groupr_card_10
def analyze_groupr_card_10(card, module):
rule.card_must_be_defined('card_10', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = groupr_settings.card_10_order_map
rule.analyze_statement(order_map.get(0), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:7,代码来源:analyze_groupr.py
示例2: analyze_card_1
def analyze_card_1(card, module):
rule.card_must_be_defined('card_1', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = unresr_settings.card_1_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:8,代码来源:analyze_unresr.py
示例3: analyze_card_7
def analyze_card_7(card, module):
rule.card_must_be_defined('card_7', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = gaminr_settings.card_7_order_map
rule.analyze_statement(order_map.get(0), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
matd = env.get_identifier_value('matd', order_map, card)
return card, matd
开发者ID:guminsun,项目名称:nifty,代码行数:8,代码来源:analyze_gaminr.py
示例4: analyze_plotr_card_10
def analyze_plotr_card_10(card, module):
# XXX: Provide a descriptive message of why card 10 should be supplied.
rule.card_must_be_defined('card_10', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = plotr_settings.card_10_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:9,代码来源:analyze_plotr.py
示例5: analyze_plotr_card_1
def analyze_plotr_card_1(card, module):
rule.card_must_be_defined('card_1', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = plotr_settings.card_1_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
lori = env.get_identifier_value('lori', order_map, card)
return card, lori
开发者ID:guminsun,项目名称:nifty,代码行数:9,代码来源:analyze_plotr.py
示例6: analyze_reconr_card_4
def analyze_reconr_card_4(card, module):
msg = ('\'card_4\' must be defined for each material desired (card 3)')
rule.card_must_be_defined('card_4', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = reconr_settings.card_4_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:9,代码来源:analyze_reconr.py
示例7: analyze_covr_card_3c
def analyze_covr_card_3c(card, module):
msg = ('expected \'card_3c\' since nout > 0 in \'card_1\'.')
rule.card_must_be_defined('card_3c', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = covr_settings.card_3c_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:9,代码来源:analyze_covr.py
示例8: analyze_errorr_card_2
def analyze_errorr_card_2(card, module):
rule.card_must_be_defined('card_2', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = errorr_settings.card_2_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
ign = env.get_identifier_value('ign', order_map, card)
return card, ign
开发者ID:guminsun,项目名称:nifty,代码行数:9,代码来源:analyze_errorr.py
示例9: analyze_reconr_card_3
def analyze_reconr_card_3(card, module):
rule.card_must_be_defined('card_3', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = reconr_settings.card_3_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
ncards = env.get_identifier_value('ncards', order_map, card)
ngrid = env.get_identifier_value('ngrid', order_map, card)
return card, ncards, ngrid
开发者ID:guminsun,项目名称:nifty,代码行数:10,代码来源:analyze_reconr.py
示例10: analyze_reconr_card_6
def analyze_reconr_card_6(ngrid, card, module):
msg = ('expected ' + str(ngrid) + ' \'card_6\'s, since ' +
'ngrid = ' + str(ngrid) + ' in the current \'card_3\'.')
rule.card_must_be_defined('card_6', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = reconr_settings.card_6_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:10,代码来源:analyze_reconr.py
示例11: analyze_moder_card_3
def analyze_moder_card_3(card, module):
msg = ('expected \'card_3\' since the absolute value of the input unit ' +
'(\'nin\') is in the range [1,19] in \'card_1\'.')
rule.card_must_be_defined('card_3', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = moder_settings.card_3_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:10,代码来源:analyze_moder.py
示例12: analyze_covr_card_3a
def analyze_covr_card_3a(card, module):
msg = ('expected \'card_3a\' since nout <= 0 in \'card_1\'.')
rule.card_must_be_defined('card_3a', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = covr_settings.card_3a_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
ncase = env.get_identifier_value('ncase', order_map, card)
return card, ncase
开发者ID:guminsun,项目名称:nifty,代码行数:10,代码来源:analyze_covr.py
示例13: analyze_plotr_card_6a
def analyze_plotr_card_6a(card, module):
msg = ('expected \'card_6a\' since the plot index (\'iplot\') is 1 or ' +
'-1 in \'card_2\'.')
rule.card_must_be_defined('card_6a', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = plotr_settings.card_6a_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:10,代码来源:analyze_plotr.py
示例14: analyze_card_2
def analyze_card_2(card, module):
rule.card_must_be_defined('card_2', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = unresr_settings.card_2_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
ntemp = env.get_identifier_value('ntemp', order_map, card)
nsigz = env.get_identifier_value('nsigz', order_map, card)
return card, ntemp, nsigz
开发者ID:guminsun,项目名称:nifty,代码行数:10,代码来源:analyze_unresr.py
示例15: analyze_groupr_card_8d
def analyze_groupr_card_8d(card, module):
# Note that card 8d should only be defined if iwt = 0 in card_2, check if
# it is before calling this function.
msg = ('expected \'card_8d\' since iwt = 0 in \'card_2\'')
rule.card_must_be_defined('card_8d', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = groupr_settings.card_8d_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:11,代码来源:analyze_groupr.py
示例16: analyze_plotr_card_12
def analyze_plotr_card_12(card, module):
msg = ('expected \'card_12\' since the ENDF version (\'iverf\') is 0 ' +
'in \'card_8\'.')
rule.card_must_be_defined('card_12', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = plotr_settings.card_12_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
nform = env.get_identifier_value('nform', order_map, card)
return card, nform
开发者ID:guminsun,项目名称:nifty,代码行数:11,代码来源:analyze_plotr.py
示例17: analyze_moder_card_3_stop
def analyze_moder_card_3_stop(card, module):
msg = ('expected \'card_3\' with the input unit (\'nin\') set to 0 ' +
'to indicate termination of module \'moder\'.')
rule.card_must_be_defined('card_3', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = moder_settings.card_3_order_map
rule.analyze_statement(order_map.get(0), env.next(stmt_iter), card, module)
nin = env.get_identifier_value('nin', order_map, card)
if nin != 0:
rule.semantic_error(msg, card)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:12,代码来源:analyze_moder.py
示例18: analyze_groupr_card_7a
def analyze_groupr_card_7a(card, module):
# Note that card 7a should only be defined if igg = 1 in card_2, check if
# it is before calling this function.
msg = ('expected \'card_7a\' since igg = 1 in \'card_2\'')
rule.card_must_be_defined('card_7a', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
order_map = groupr_settings.card_7a_order_map
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
ngg = env.get_identifier_value('ngg', order_map, card)
return card, ngg
开发者ID:guminsun,项目名称:nifty,代码行数:12,代码来源:analyze_groupr.py
示例19: analyze_plotr_card_8
def analyze_plotr_card_8(card, module):
rule.card_must_be_defined('card_8', card, module, None)
stmt_iter = env.get_statement_iterator(card)
order_map = plotr_settings.card_8_order_map
rule.analyze_statement(order_map.get(0), env.next(stmt_iter), card, module)
iverf = env.get_identifier_value('iverf', order_map, card)
# Ignore rest of parameters on card if data on input file is used (i.e. if
# iverf = 0.)
if iverf > 0:
for i in range(1, len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card, iverf
开发者ID:guminsun,项目名称:nifty,代码行数:13,代码来源:analyze_plotr.py
示例20: analyze_card_4
def analyze_card_4(card, module):
msg = ('expected a \'card_4\' since igg = 1 in \'card_2\'')
rule.card_must_be_defined('card_4', card, module, msg)
stmt_iter = env.get_statement_iterator(card)
ngg = env.get_identifier_value('ngg', order_map, card)
identifier_map = gaminr_settings.card_4_identifier_map
order_map = gaminr_settings.card_4_order_map
for i in range(1, ngg+2):
order_map[i] = ('egg', i, identifier_map.get('egg'))
for i in range(len(order_map)):
rule.analyze_statement(order_map.get(i), env.next(stmt_iter), card, module)
rule.no_statement_allowed(env.next(stmt_iter), card, module)
return card
开发者ID:guminsun,项目名称:nifty,代码行数:13,代码来源:analyze_gaminr.py
注:本文中的nifty.environment.helpers.get_statement_iterator函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论