当前位置: 首页>>代码示例>>Python>>正文


Python helpers.get_statement_iterator函数代码示例

本文整理汇总了Python中nifty.environment.helpers.get_statement_iterator函数的典型用法代码示例。如果您正苦于以下问题:Python get_statement_iterator函数的具体用法?Python get_statement_iterator怎么用?Python get_statement_iterator使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_statement_iterator函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的nifty.environment.helpers.get_statement_iterator函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。