SILENT KILLERPanel

Current Path: > > lib > python3.6 > site-packages > pycparser


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/python3.6/site-packages/pycparser

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 2903 bytes June 10 2015 03:00:55.
_ast_gen.py File 8663 bytes June 10 2015 03:00:55.
_build_tables.py File 851 bytes June 10 2015 03:00:55.
_c_ast.cfg File 4180 bytes June 10 2015 03:00:55.
ast_transforms.py File 3568 bytes June 10 2015 03:00:55.
c_ast.py File 23336 bytes November 13 2019 14:57:08.
c_generator.py File 13570 bytes June 10 2015 03:00:55.
c_lexer.py File 14445 bytes November 13 2019 14:57:05.
c_parser.py File 62211 bytes November 13 2019 14:57:05.
lextab.py File 7246 bytes November 13 2019 14:57:07.
plyparser.py File 1594 bytes June 10 2015 03:00:55.
yacctab.py File 126293 bytes November 13 2019 14:57:08.

Reading File: //lib/python3.6/site-packages/pycparser/plyparser.py

#-----------------------------------------------------------------
# plyparser.py
#
# PLYParser class and other utilites for simplifying programming
# parsers with PLY
#
# Copyright (C) 2008-2015, Eli Bendersky
# License: BSD
#-----------------------------------------------------------------


class Coord(object):
    """ Coordinates of a syntactic element. Consists of:
            - File name
            - Line number
            - (optional) column number, for the Lexer
    """
    __slots__ = ('file', 'line', 'column', '__weakref__')
    def __init__(self, file, line, column=None):
        self.file = file
        self.line = line
        self.column = column

    def __str__(self):
        str = "%s:%s" % (self.file, self.line)
        if self.column: str += ":%s" % self.column
        return str


class ParseError(Exception): pass


class PLYParser(object):
    def _create_opt_rule(self, rulename):
        """ Given a rule name, creates an optional ply.yacc rule
            for it. The name of the optional rule is
            <rulename>_opt
        """
        optname = rulename + '_opt'

        def optrule(self, p):
            p[0] = p[1]

        optrule.__doc__ = '%s : empty\n| %s' % (optname, rulename)
        optrule.__name__ = 'p_%s' % optname
        setattr(self.__class__, optrule.__name__, optrule)

    def _coord(self, lineno, column=None):
        return Coord(
                file=self.clex.filename,
                line=lineno,
                column=column)

    def _parse_error(self, msg, coord):
        raise ParseError("%s: %s" % (coord, msg))

SILENT KILLER Tool