# Path: pysmi/error.py
# class PySmiError(Exception):
# class PySmiLexerError(PySmiError):
# class PySmiParserError(PySmiLexerError):
# class PySmiSyntaxError(PySmiParserError):
# class PySmiSearcherError(PySmiError):
# class PySmiFileNotModifiedError(PySmiSearcherError):
# class PySmiFileNotFoundError(PySmiSearcherError):
# class PySmiReaderError(PySmiError):
# class PySmiReaderFileNotModifiedError(PySmiReaderError):
# class PySmiReaderFileNotFoundError(PySmiReaderError):
# class PySmiCodegenError(PySmiError):
# class PySmiSemanticError(PySmiCodegenError):
# class PySmiWriterError(PySmiError):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __str__(self):
#     def __str__(self):


import sys
from pysmi import error
    }


    def genCode(self, ast, symbolTable, **kwargs):
        raise NotImplementedError()

    def genIndex(self, mibsMap, **kwargs):
        raise NotImplementedError()

    @staticmethod
    def isBinary(s):
        return (isinstance(s, (str, unicode)) and
                s[0] == '\'' and s[-2:] in ('\'b', '\'B'))

    @staticmethod
    def isHex(s):
        return (isinstance(s, (str, unicode)) and s[0] == '\''
                and s[-2:] in ('\'h', '\'H'))

    def str2int(self, s):
        if self.isBinary(s):
            if s[1:-2]:
                return int(s[1:-2], 2)
            else:
                raise error.PySmiSemanticError('empty binary string to int conversion')

        elif self.isHex(s):
            if s[1:-2]:
                return int(s[1:-2], 16)
            else:

# Path: pysmi/error.py
# class PySmiError(Exception):
# class PySmiLexerError(PySmiError):
# class PySmiParserError(PySmiLexerError):
# class PySmiSyntaxError(PySmiParserError):
# class PySmiSearcherError(PySmiError):
# class PySmiFileNotModifiedError(PySmiSearcherError):
# class PySmiFileNotFoundError(PySmiSearcherError):
# class PySmiReaderError(PySmiError):
# class PySmiReaderFileNotModifiedError(PySmiReaderError):
# class PySmiReaderFileNotFoundError(PySmiReaderError):
# class PySmiCodegenError(PySmiError):
# class PySmiSemanticError(PySmiCodegenError):
# class PySmiWriterError(PySmiError):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __str__(self):
#     def __str__(self):


# Path: pysmi/codegen/base.py
import sys
from pysmi import error

    }


    def genCode(self, ast, symbolTable, **kwargs):
        raise NotImplementedError()

    def genIndex(self, mibsMap, **kwargs):
        raise NotImplementedError()

    @staticmethod
    def isBinary(s):
        return (isinstance(s, (str, unicode)) and
                s[0] == '\'' and s[-2:] in ('\'b', '\'B'))

    @staticmethod
    def isHex(s):
        return (isinstance(s, (str, unicode)) and s[0] == '\''
                and s[-2:] in ('\'h', '\'H'))

    def str2int(self, s):
        if self.isBinary(s):
            if s[1:-2]:
                return int(s[1:-2], 2)
            else:
                raise error.PySmiSemanticError('empty binary string to int conversion')

        elif self.isHex(s):
            if s[1:-2]:
                return int(s[1:-2], 16)
            else:

                raise error.PySmiSemanticError('empty hex string to int conversion')