@classmethod
    def reader(cls, program, **scope):
        scope.update({
            'None': None, 'null': None, 
            'True': True, 'true': True,
            'False': False, 'false': False,
            'empty': '',
        })
        for kind, value in tokenize(program):
            #print (kind, value),
            if kind == 'name':
                s = SYMBOLS['(literal)']()
                try:
                    s.value = scope[value]
                except KeyError:
                    raise NameError('Name %r is not defined' % (value,))
                yield s
            elif kind == 'variable':
                s = SYMBOLS['(literal)']()
                try:
                    s.value = cls.variables[int(value[1:])]
                except __HOLE__:
                    s.value = None
                yield s
            elif kind == 'string':
                s = SYMBOLS['(literal)']()
                s.value = value[1:-1]
                yield s
            elif kind == 'number':
                s = SYMBOLS['(literal)']()
                s.value = long(value)
                yield s
            elif kind == 'float':
                s = SYMBOLS['(literal)']()
                s.value = float(value)
                yield s
            elif kind == 'symbol':
                yield SYMBOLS[value]()
            else:
                raise SyntaxError('Unknown operator %s' % (kind,))

        #print '->',
        yield SYMBOLS['(end)']()

# Definition and order of expressions
dataset/ETHPy150Open tehmaze/nagios-cli/nagios_cli/filters/parser.py/Parser.reader