def scanmeta(f):
print(f)<EOL>if isinstance(f, str):<EOL><INDENT>f = io.open(f, mode='<STR_LIT:r>', encoding='<STR_LIT>')<EOL><DEDENT>done = False<EOL>l = f.readline()<EOL>s = None<EOL>while l and s is None:<EOL><INDENT>i = l.find('<STR_LIT:!>')<EOL>if i >= <NUM_LIT:0>:<EOL><INDENT>l = l[i+<NUM_LIT:1>:]<EOL>i = l.find('<STR_LIT>')<EOL>if i >= <NUM_LIT:0>:<EOL><INDENT>l = l[i+<NUM_LIT:5>:]<EOL>i = l.find('<STR_LIT>')<EOL>if i >= <NUM_LIT:0>:<EOL><INDENT>s = l[:i]<EOL>done = True<EOL><DEDENT>else:<EOL><INDENT>s = l<EOL><DEDENT><DEDENT><DEDENT>l = f.readline()<EOL><DEDENT>if not done and not l:<EOL><INDENT>return { }<EOL><DEDENT>while l and not done:<EOL><INDENT>i = l.find('<STR_LIT:!>')<EOL>if i >= <NUM_LIT:0>:<EOL><INDENT>l = l[i+<NUM_LIT:1>:]<EOL>i = l.find('<STR_LIT>')<EOL>if i >= <NUM_LIT:0>:<EOL><INDENT>s += '<STR_LIT:U+0020>'+l[:i]<EOL>done = True<EOL><DEDENT>else:<EOL><INDENT>s += '<STR_LIT:U+0020>'+l<EOL><DEDENT><DEDENT>l = f.readline()<EOL><DEDENT>s = map(lambda x: x.split('<STR_LIT::>'), s.split())<EOL>d = { }<EOL>for x in s:<EOL><INDENT>if len(x) > <NUM_LIT:2> or len(x) == <NUM_LIT:0>:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>elif len(x) == <NUM_LIT:2>:<EOL><INDENT>d[x[<NUM_LIT:0>]] = x[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>d[x[<NUM_LIT:0>]] = None<EOL><DEDENT><DEDENT>return d<EOL>
Scan file headers for @meta ... @endmeta information and store that into
       a dictionary.