def nextobject(self):
while not self.results:<EOL><INDENT>(pos, token) = self.nexttoken()<EOL>if isinstance(token, (int, long, float, bool, str, PSLiteral)):<EOL><INDENT>self.push((pos, token))<EOL><DEDENT>elif token == KEYWORD_ARRAY_BEGIN:<EOL><INDENT>self.start_type(pos, '<STR_LIT:a>')<EOL><DEDENT>elif token == KEYWORD_ARRAY_END:<EOL><INDENT>try:<EOL><INDENT>self.push(self.end_type('<STR_LIT:a>'))<EOL><DEDENT>except PSTypeError:<EOL><INDENT>if STRICT:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>elif token == KEYWORD_DICT_BEGIN:<EOL><INDENT>self.start_type(pos, '<STR_LIT:d>')<EOL><DEDENT>elif token == KEYWORD_DICT_END:<EOL><INDENT>try:<EOL><INDENT>(pos, objs) = self.end_type('<STR_LIT:d>')<EOL>if len(objs) % <NUM_LIT:2> != <NUM_LIT:0>:<EOL><INDENT>raise PSSyntaxError('<STR_LIT>' % (objs,))<EOL><DEDENT>d = dict((literal_name(k), v) for (k, v) in choplist(<NUM_LIT:2>, objs) if v is not None)<EOL>self.push((pos, d))<EOL><DEDENT>except PSTypeError:<EOL><INDENT>if STRICT:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>elif token == KEYWORD_PROC_BEGIN:<EOL><INDENT>self.start_type(pos, '<STR_LIT:p>')<EOL><DEDENT>elif token == KEYWORD_PROC_END:<EOL><INDENT>try:<EOL><INDENT>self.push(self.end_type('<STR_LIT:p>'))<EOL><DEDENT>except PSTypeError:<EOL><INDENT>if STRICT:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if self.debug:<EOL><INDENT>logging.debug('<STR_LIT>' %(pos, token, self.curstack))<EOL><DEDENT>self.do_keyword(pos, token)<EOL><DEDENT>if self.context:<EOL><INDENT>continue<EOL><DEDENT>else:<EOL><INDENT>self.flush()<EOL><DEDENT><DEDENT>obj = self.results.pop(<NUM_LIT:0>)<EOL>if self.debug:<EOL><INDENT>logging.debug('<STR_LIT>' % (obj,))<EOL><DEDENT>return obj<EOL>
Yields a list of objects.

        Returns keywords, literals, strings, numbers, arrays and dictionaries.
        Arrays and dictionaries are represented as Python lists and dictionaries.