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


Python dispatchprocessor.getString函数代码示例

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


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

示例1: define_stmt

 def define_stmt(self, token, buffer):
     tag, left, right, sublist = token
     name_tup, value_tup = sublist
     value_tag = value_tup[0]
     name = getString(name_tup,   buffer)
     value = getString(value_tup,  buffer)
     if value_tag == 'regex':
         value = self._regex(value_tup, buffer)
     elif value_tag == 'varname':
         if value not in self.context.lexicon:
             _error(buffer, value_tup[1], 'no such variable')
         value = self.context.lexicon[value]
     else:
         raise Exception('BUG: invalid token %s' % value_tag)
     self.context.lexicon[name] = value
开发者ID:knipknap,项目名称:Gelatin,代码行数:15,代码来源:SyntaxCompiler.py

示例2: alphanums

 def alphanums(self, tags, buffer):
     """
         >>> input = "foo"
         >>> proc = ProcessessExpression()
         >>> proc(parse('alphanums', input), input)
         'foo'
     """
     return getString(tags, buffer)
开发者ID:dummy3k,项目名称:logviewer,代码行数:8,代码来源:filter.py

示例3: grammar_stmt

 def grammar_stmt(self, token, buffer):
     tag, left, right, sublist = token
     map = singleMap(sublist)
     grammar = Grammar()
     grammar.name = getString(map['varname'], buffer)
     grammar.statements = self._suite(map['suite'], buffer)
     if 'inherit' in map:
         grammar.inherit = self._inherit(map['inherit'], buffer)
     self.context.grammars[grammar.name] = grammar
开发者ID:knipknap,项目名称:Gelatin,代码行数:9,代码来源:SyntaxCompiler.py

示例4: _function

 def _function(self, token, buffer):
     tag, left, right, sublist = token
     function = Function()
     function.name = getString(sublist[0], buffer)
     if len(sublist) == 1:
         return function
     for arg in sublist[1][3]:
         expression = self._expression(arg, buffer)
         function.args.append(expression)
     return function
开发者ID:knipknap,项目名称:Gelatin,代码行数:10,代码来源:SyntaxCompiler.py

示例5: KEYWORD

        # insttype:  maps KEYWORD (i.e. type) (n) to entity inst nbr
        self.res["contents"] = {}
        self.res["insttype"] = {}
        self.res["typeinst"] = defaultdict(list)

    def ENTITY_INSTANCE_NAME(self, (tag, start, stop, subtags), buffer):
        """
        Process C{ENTITY_INSTANCE_NAME} production.
        """
        return dp.getString((tag, start, stop, subtags), buffer)[1:]

    def KEYWORD(self, (tag, start, stop, subtags), buffer):
        """
        Process C{KEYWORD} production.
        """
        return dp.getString((tag, start, stop, subtags), buffer)

    def parameter_list(self, (tag, start, stop, subtags), buffer):
        """
        Process C{simple_content} production.
        """
        return dp.getString((tag, start, stop, subtags), buffer)

    def instance_list(self, (tag, start, stop, subtags), buffer):
        """
        Process C{complex_content} production.

        @return:  a 2-tuple of (keywords, parameter lists), where keywords is
            the list of KEYWORD occurrences and parameter lists is a list of
            strings (each of which is an unparsed parameter list).
        """
开发者ID:smewp,项目名称:openPLM,代码行数:31,代码来源:part21_preparse.py

示例6: jahr

 def jahr(self, tup, buffer):
     return str(getString(tup, buffer))
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:hawDispatchProcessor.py

示例7: wochentag

 def wochentag(self, tup, buffer):
     return str(getString(tup, buffer))
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:hawDispatchProcessor.py

示例8: gebaeude

 def gebaeude(self, tup, buffer):
     return str(getString(tup, buffer))
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:hawDispatchProcessor.py

示例9: gruppe

 def gruppe(self, tup, buffer):
     return getString(tup, buffer)
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:hawDispatchProcessor.py

示例10: total

 def total(self, *a, **kw):
     self.armorclass.value = int(disp.getString(*a, **kw))
开发者ID:corydodt,项目名称:Playtools,代码行数:2,代码来源:armorclassparser.py

示例11: verbKuerzel

 def verbKuerzel(self, tup, buffer):
     return getString(tup, buffer)
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:veranstaltungenDispatchProcessor.py

示例12: oe2

 def oe2(self, tup, buffer):
     return getString(tup, buffer)
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:veranstaltungenDispatchProcessor.py

示例13: alphanumGruppe

 def alphanumGruppe(self, tup, buffer):
     return getString(tup, buffer)
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:veranstaltungenDispatchProcessor.py

示例14: gruppe

 def gruppe(self, tup, buffer):
     return str(int(getString(tup, buffer)))
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:veranstaltungenDispatchProcessor.py

示例15: no

 def no(self, tup, buffer):
     return getString(tup, buffer)
开发者ID:Hexren,项目名称:haw2iCalendar,代码行数:2,代码来源:veranstaltungenDispatchProcessor.py


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