; #### RTF2XML version 0.9 ; #### Copyright (C) 1997-2000 Rick Geimer ; #### This program is free software; you can redistribute it and/or ; #### modify it under the terms of the GNU General Public Licence ; #### as published by the Free Software Foundation; either version ; #### 2 of the licence, or (at your option) any later version. ; #### This program is distributed in the hope that it will be useful, ; #### but WITHOUT ANY WARRANTY; without even the implied warranty of ; #### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See ; #### the GNU General Public Licence for more details. ; #### You should have received a copy of the GNU General Public Licence ; #### along with this program; if not, write to the Free Software ; #### Foundation, Inc., 675 Mass Ave, Cambridge, MA, 02139, USA. ; #### The above licence is also available online at "http://www.gnu.org/". ; #### Rick Geimer ; #### rtf2xml@xmeta.com ; #### 2401 Huran Drive ; #### San Jose, CA, 95122 ; #### USA macro upto ( arg pattern )is ( ( ( lookahead not ( pattern ) ) any ) * ) macro-end macro any-line-break is ("%10#%13#" or "%13#%10#" or "%13#" or "%10#" or "%n") macro-end macro splb is (((space any-line-break) or any-line-break or space)?) macro-end macro rtf-end is (lookahead (space or any-line-break or ["\{};:!@#$%%^&()<>?/,."])) macro-end macro value-rtf-end is (lookahead [any except digit]) macro-end macro static-rtf-end is (lookahead [any except letter]) macro-end macro any-static-rtf is (letter+) macro-end macro any-value-rtf is (letter+ "-"? digit+) macro-end macro any-rtf-no-backslash is (letter+ "-"? digit*) macro-end macro value-group-name is (letter+) macro-end macro any-rtf is ("\" any-rtf-no-backslash) macro-end macro rtf-ents is ("rdblquote" or "ldblquote" or "bullet" or "rquote" or "lquote" or "emdash" or "endash" or "line" or "tab") macro-end macro one-stat is "b" or "v" or "i" macro-end macro two-stat is "qj" or "qc" or "qr" or "ql" or "ul" or "pc" macro-end macro three-stat is "box" or "tqc" or "tqr" or "row" or "par" or "sub" or "mac" or "pca" macro-end macro four-stat is "sect" or "pvpg" or "pard" or "cell" or "keep" or "ansi" or "fnil" or "page" or "caps" macro-end macro five-stat is "brdrb" or "ftnbj" or "trowd" or "trhdr" or "sectd" or "plain" or "chpgn" or "pndec" or "super" or "clmgf" or "clmrg" or "tldot" or "brdrt" or "brdrs" or "intbl" or "keepn" or "posxc" or "posyb" or "ftech" or "fbidi" or "scaps" macro-end macro six-stat is "sbkodd" or "clvmgf" or "clvmrg" or "pnucrm" or "pnlcrm" or "pagebb" or "pnhang" or "froman" or "fswiss" or "fdecor" or "brdrth" or "brdrsh" or "brdrdb" or "dptxbx" or "strike" macro-end macro seven-stat is "emfblip" or "pngblip" or "facingp" or "macpict" or "aenddoc" or "pgnlcrm" or "titlepg" or "pnucltr" or "pnlcltr" or "fldlock" or "fldedit" or "fmodern" or "fscript" or "trbrdrt" or "trbrdrb" or "trbrdrl" or "trbrdrr" or "trbrdrv" or "trbrdrh" or "clbrdrb" or "clbrdrt" or "clbrdrr" or "clbrdrl" or "brdrdot" or "deleted" or "revised" macro-end macro eight-stat is "jpegblip" or "endnhere" or "flddirty" or "pnlvlblt" or "additive" or "brdrhair" or "brdrdash" macro-end macro nine-stat is "widowctrl" or "pnlvlbody" or "widctlpar" or "fvaliddos" or "fvalidmac" macro-end macro ten-stat is "margmirror" or "pgnrestart" or "fvalidntfs" macro-end macro twelve-stat is "ffhaslistbox" macro-end macro static-elements-pattern is (twelve-stat or ten-stat or nine-stat or eight-stat or seven-stat or six-stat or five-stat or four-stat or three-stat or two-stat or one-stat) macro-end macro one-vals is "f" or "s" or "b" or "i" macro-end macro two-vals is "cf" or "yr" or "mo" or "dy" or "hr" or "dn" or "up" or "cs" or "fi" or "fs" or "li" or "ri" or "sa" or "sb" or "sl" or "tx" or "ul" macro-end macro three-vals is "min" or "fet" or "pnf" or "fid" or "red" or "dpx" or "dpy" macro-end macro four-vals is "cchs" or "picw" or "pich" or "brsp" or "deff" or "fprq" or "lang" or "posy" or "blue" or "posx" or "posy" or "caps" macro-end macro five-vals is "margl" or "margr" or "linex" or "colsx" or "cellx" or "brdrw" or "pnlvl" or "snext" or "green" or "ffres" or "expnd" or "scaps" macro-end macro six-vals is "paperw" or "paperh" or "trgaph" or "slmult" or "trleft" or "fftype" or "crauth" or "crdate" macro-end macro seven-vals is "wbitmap" or "headery" or "footery" or "deflang" or "pnstart" or "posnegx" or "posnegy" or "dpxsize" or "dpysize" or "revauth" or "revdttm" or "expndtw" macro-end macro eight-vals is "proptype" or "dibitmap" or "hyphcaps" or "picwgoal" or "pichgoal" or "fcharset" or "pnindent" or "sbasedon" or "dxfrtext" or "dfrmtxtx" or "dfrmtxty" or "ffdefres" macro-end macro nine-vals is "picscalex" or "picscaley" or "frelative" or "wmetafile" or "fftypetxt" macro-end macro ten-vals is "revauthdel" or "revdttmdel" macro-end macro value-elements-pattern is ( ten-vals or nine-vals or eight-vals or seven-vals or six-vals or five-vals or four-vals or three-vals or two-vals or one-vals) macro-end macro static-group-pattern is ("stylesheet" or "nonshppict" or "staticval" or "operator" or "footnote" or "propname" or "keywords" or "doccomm" or "subject" or "creatim" or "headerr" or "headerl" or "headerf" or "footerr" or "footerl" or "footerf" or "fonttbl" or "colortbl" or "fldrslt" or "header" or "footer" or "revtim" or "pntext" or "pntxta" or "pntxtb" or "author" or "field" or "title" or "info" or "pict" or "file" or "xe") macro-end macro value-group-pattern is ("version" or "edmins" or "nofpages" or "nofwords" or "nofchars" or "vern") macro-end macro static-dest-pattern is ("annotation" or "formfield" or "atrfstart" or "ffdeftext" or "bkmkstart" or "atnauthor" or "userprops" or "template" or "ffformat" or "company" or "atrfend" or "bkmkend" or "shppict" or "fldinst" or "filetbl" or "atnref" or "ffname" or "revtbl" or "falt" or "ffl" or "pn" or "do" or "ud") macro-end macro format-vals is (("cchs" or "fs" or "cs" or "cf" or "dn" or "up" or "f" or "b" or "i") digit+) macro-end macro format-stats is ("super" or "sub" or "ul" or "b" or "i") macro-end macro win-filename-chars is [any except '\/:*?"<>|'] macro-end