'Identifies the paths set within a file.
Expands paths within the context of the file, but does not infer fully
expanded paths from external states. There are plenty of cases where path
attributes are unresolved, e.g. sourcing other files.
Lines are not handled literally. A field parser is used to:
- Break lines with multiple distinct statements into separate lines (e.g.
lines with a \';\' separating stanzas.
- Strip out comments.
- Handle line continuations to capture multi-line configurations into one
statement.
Args:
stat: statentry
file_obj: VFSFile
knowledge_base: unused
Yields:
An attributed dict for each env vars. \'name\' contains the path name, and
\'vals\' contains its vals.'

def Parse(self, stat, file_obj, knowledge_base):

    _ = knowledge_base
    lines = self.parser.ParseEntries(file_obj.read())
    if (os.path.basename(stat.pathspec.path) in self._CSH_FILES):
        paths = self._ParseCshVariables(lines)
    else:
        paths = self._ParseShVariables(lines)
    for (path_name, path_vals) in paths.iteritems():
        (yield rdf_protodict.AttributedDict(config=stat.pathspec.path, name=path_name, vals=path_vals))
