예제 #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()
예제 #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()
예제 #3
0
    def __init__(self):
        self.scopes = []
        self.scopes.append({"pkgdir" : "", "srcdir" : "", "startdir" : ""})
        self.current = 0

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

        ConsoleP.__init__(self, 'pkgbuild')