Exemple #1
0
    def __init__(self, path, data=None):
        ConsoleP.__init__(self, 'pkgbuild')

        if path is None:
            self.eval = shlex.shlex(data, posix=True)
        else:
            self.eval = shlex.shlex(open(path, "r").read(), posix=True)

        self.eval.whitespace = " \t"
        self.eval.wordchars += '.:/${}-~'
        self.eval.commenters = '#'
        self.state = self.ST_VAR
        self.scope = Scope()

        self.parse()
Exemple #2
0
    def __init__(self, path, data=None):
        ConsoleP.__init__(self, 'pkgbuild')

        if path is None:
            self.eval = shlex.shlex(data, posix=True)
        else:
            self.eval = shlex.shlex(open(path, "r").read(), posix=True)

        self.eval.whitespace = " \t"
        self.eval.wordchars += '.:/${}-~'
        self.eval.commenters = '#'
        self.state = self.ST_VAR
        self.scope = Scope()

        self.parse()
Exemple #3
0
    def __init__(self):
        self.scopes = []
        self.scopes.append({"pkgdir" : "", "srcdir" : "", "startdir" : ""})
        self.current = 0

        ConsoleP.__init__(self, 'pkgbuild')
Exemple #4
0
    def __init__(self):
        self.scopes = []
        self.scopes.append({"pkgdir": "", "srcdir": "", "startdir": ""})
        self.current = 0

        ConsoleP.__init__(self, 'pkgbuild')