Lines Matching refs:stream

609     def stream_pop_class_name(self, stream):  argument
612 if stream.try_match('unsigned'):
614 if stream.try_match(':', ':'):
617 name = stream.pop('expected class name')
620 while stream.try_match(':', ':', arg):
623 if stream.try_match('<'):
624 tok = stream.pop('expected template argument')
626 while stream.try_match(','):
627 tmpl_args.append(stream.pop('expected template argument'))
628 stream.assert_match('>',
638 stream = TokenStream(toktreelist)
649 while not stream.empty():
650 if stream.try_match(pub_priv_prot_re, ':'):
652 if stream.try_match(re.compile(r'^(//|/\*)')):
657 elif stream.try_match('using'):
658 semicolon_found = stream.discard_until(';')
660 elif stream.try_match(attribute_, '<'):
661 attr_type = self.stream_pop_class_name(stream)
662 assert stream.try_match('>'), \
664 attr_name = stream.pop("expect an attribute name")
668 if stream.try_match('='):
670 t = stream.pop()
673 if stream.try_match(';'):
678 stream.discard_until(semicolon_or_block)
679 elif stream.try_match(link_, '<'):
680 link_type = self.stream_pop_class_name(stream)
681 stream.assert_match('>', msg="every 'Link_<' has to be enclosed by '>'")
682 cpp_name = stream.pop("expect an attribute name")
686 stream.discard_until(semicolon_or_block)
687 elif stream.try_match('ByName', arg):
692 stream.discard_until(semicolon_or_block)
693 elif stream.try_match(classname, parameters, ':'):
694 self.stream_consume_member_initializers(classname, stream)
696 stream.discard_until(semicolon_or_block)
698 def stream_consume_member_initializers(self, classname, stream): argument
705 while not stream.try_match(codeblock):
706 if stream.try_match(arg1, parameters) or stream.try_match(arg1, initializers):
711 stream.pop()
715 def stream_consume_class_codeblock(self, classname, stream): argument
720 while not stream.empty():
721 if stream.try_match(arg1, '.', setDoc, parameters, ';'):
725 elif stream.try_match('setDoc', parameters, ';'):
729 elif stream.try_match(arg1, '.', 'setWritable', parameters, ';'):
734 stream.pop()
743 stream = TokenStream(toktreelist)
745 while not stream.empty():
746 if stream.try_match('class', arg1):
748 while stream.try_match(re.compile('^,|:$'), pub_priv_prot_re):
749 baseclass = self.stream_pop_class_name(stream)
752 while not stream.empty():
753 t = stream.pop()
758 elif stream.try_match(arg1, ':', ':', arg2, parameters, ':'):
763 self.stream_consume_member_initializers(classname, stream)
765 stream.pop()
795 stream = TokenStream(list(tokens))
796 tt_list = list(build_token_tree_list(stream))
797 if not stream.empty():
800 while not stream.empty():
801 print("token: {}".format(stream.pop()), file=sys.stderr)