david@indetech.com (David Kuder x2003) (03/01/91)
I have written a couple of little ad-hoc filters that process
the output of a FrameMaker document in MIF (Maker Interchange
Format). However, before writing the third one I was wondering
if anyone had written a "MIF parser" of some sort.
MIF looks like <Tag Body> where Body can be another tagged
thing or a list of strings. Frame's convention for writting
this is to put any <> that has a Body that is a <> with just
the tag on the line:
<T1
<Foo "bar" 1.0 bog>
<Fang>
<www "biddle">
> #End T1
(# to EOL is comment).
The last two time I needed to parse stuff I could get away with
line at a time parsing with minimal state saved. Now I need to have
a lot of state and multiline bits to pull apart.
So has anyone done this already? If not, does anyone see a natural
mapping from the <Tag <tag body>> form to a Perl data structure?
--
David A. Kuder Looking for enough time to get past patchlevel 1
415 438-2003 david@indetech.com {uunet,sun,sharkey,pacbell}!indetech!david