How to use the uncompyle6.parsers.parse14.Python14Parser function in uncompyle6

To help you get started, we’ve selected a few uncompyle6 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rocky / python-uncompyle6 / uncompyle6 / parsers / parse14.py View on Github external
""")
        self.check_reduce['doc_junk'] = 'tokens'


    def reduce_is_invalid(self, rule, ast, tokens, first, last):
        invalid = super(Python14Parser,
                        self).reduce_is_invalid(rule, ast,
                                                tokens, first, last)
        if invalid or tokens is None:
            return invalid
        if rule[0] == 'doc_junk':
            return not isinstance(tokens[first].pattr, str)



class Python14ParserSingle(Python14Parser, PythonParserSingle):
    pass

if __name__ == '__main__':
    # Check grammar
    p = Python14Parser()
    p.check_grammar()
    p.dump_grammar()
github rocky / python-decompile3 / uncompyle6 / parsers / parse14.py View on Github external
invalid = super(Python14Parser,
                        self).reduce_is_invalid(rule, ast,
                                                tokens, first, last)
        if invalid or tokens is None:
            return invalid
        if rule[0] == 'doc_junk':
            return not isinstance(tokens[first].pattr, str)



class Python14ParserSingle(Python14Parser, PythonParserSingle):
    pass

if __name__ == '__main__':
    # Check grammar
    p = Python14Parser()
    p.check_grammar()
    p.dump_grammar()
github rocky / python-decompile3 / uncompyle6 / parsers / parse14.py View on Github external
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
        super(Python14Parser, self).__init__(debug_parser)
        self.customized = {}
github rocky / python-uncompyle6 / uncompyle6 / parsers / parse14.py View on Github external
invalid = super(Python14Parser,
                        self).reduce_is_invalid(rule, ast,
                                                tokens, first, last)
        if invalid or tokens is None:
            return invalid
        if rule[0] == 'doc_junk':
            return not isinstance(tokens[first].pattr, str)



class Python14ParserSingle(Python14Parser, PythonParserSingle):
    pass

if __name__ == '__main__':
    # Check grammar
    p = Python14Parser()
    p.check_grammar()
    p.dump_grammar()
github rocky / python-decompile3 / uncompyle6 / parsers / parse14.py View on Github external
def reduce_is_invalid(self, rule, ast, tokens, first, last):
        invalid = super(Python14Parser,
                        self).reduce_is_invalid(rule, ast,
                                                tokens, first, last)
        if invalid or tokens is None:
            return invalid
        if rule[0] == 'doc_junk':
            return not isinstance(tokens[first].pattr, str)
github rocky / python-decompile3 / uncompyle6 / parsers / parse14.py View on Github external
""")
        self.check_reduce['doc_junk'] = 'tokens'


    def reduce_is_invalid(self, rule, ast, tokens, first, last):
        invalid = super(Python14Parser,
                        self).reduce_is_invalid(rule, ast,
                                                tokens, first, last)
        if invalid or tokens is None:
            return invalid
        if rule[0] == 'doc_junk':
            return not isinstance(tokens[first].pattr, str)



class Python14ParserSingle(Python14Parser, PythonParserSingle):
    pass

if __name__ == '__main__':
    # Check grammar
    p = Python14Parser()
    p.check_grammar()
    p.dump_grammar()
github rocky / python-uncompyle6 / uncompyle6 / parser.py View on Github external
if version == 1.2:
                import uncompyle6.parsers.parse12 as parse12
                if compile_mode == 'exec':
                    p = parse12.Python12Parser(debug_parser)
                else:
                    p = parse12.Python12ParserSingle(debug_parser)
            if version == 1.3:
                import uncompyle6.parsers.parse13 as parse13
                if compile_mode == 'exec':
                    p = parse13.Python13Parser(debug_parser)
                else:
                    p = parse13.Python13ParserSingle(debug_parser)
            elif version == 1.4:
                import uncompyle6.parsers.parse14 as parse14
                if compile_mode == 'exec':
                    p = parse14.Python14Parser(debug_parser)
                else:
                    p = parse14.Python14ParserSingle(debug_parser)
            elif version == 1.5:
                import uncompyle6.parsers.parse15 as parse15
                if compile_mode == 'exec':
                    p = parse15.Python15Parser(debug_parser)
                else:
                    p = parse15.Python15ParserSingle(debug_parser)
            elif version == 1.6:
                import uncompyle6.parsers.parse16 as parse16
                if compile_mode == 'exec':
                    p = parse16.Python16Parser(debug_parser)
                else:
                    p = parse16.Python16ParserSingle(debug_parser)
            elif version == 2.1:
                import uncompyle6.parsers.parse21 as parse21