def parse(self, filename):
    self.reset()
    with open(filename, 'r') as bvh_file:
        raw_contents = bvh_file.read()
    (tokens, remainder) = self.scanner.scan(raw_contents)
    self._parse_hierarchy(tokens)
    self.current_token = (self.current_token + 1)
    self._parse_motion(tokens)
    self.data.skeleton = self._skeleton
    self.data.channel_names = self._motion_channels
    self.data.values = self._to_DataFrame()
    self.data.root_name = self.root_name
    self.data.framerate = self.framerate
    return self.data
def parse(self, filename):
    self.reset()
    with open(filename, 'r') as bvh_file:
        raw_contents = bvh_file.read()
    (tokens, remainder) = self.scanner.scan(raw_contents)
    self._parse_hierarchy(tokens)
    self.current_token = (self.current_token + 1)
    self._parse_motion(tokens)
    self.data.skeleton = self._skeleton
    self.data.channel_names = self._motion_channels
    self.data.values = self._to_DataFrame()
    self.data.root_name = self.root_name
    self.data.framerate = self.framerate
    return self.data