richter     01/05/07 04:49:09

  Modified:    .        Tag: Embperl2c MANIFEST MANIFEST.2 epdat.h
                        epparse.c test.pl
               Embperl  Tag: Embperl2c Syntax.pm
               Embperl/Syntax Tag: Embperl2c RTF.pm
               test/html/rtf Tag: Embperl2c rtfbasic.asc
  Added:       test/cmp Tag: Embperl2c rtfbasic.asc rtffull.asc
               test/html/rtf Tag: Embperl2c rtffull.asc
  Log:
  Embperl 2 - RTF syntax
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.50.4.22 +4 -0      embperl/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /home/cvs/embperl/MANIFEST,v
  retrieving revision 1.50.4.21
  retrieving revision 1.50.4.22
  diff -u -r1.50.4.21 -r1.50.4.22
  --- MANIFEST  2001/05/02 11:54:42     1.50.4.21
  +++ MANIFEST  2001/05/07 11:48:18     1.50.4.22
  @@ -57,6 +57,8 @@
   test/html/execsecond.htm
   test/html/execprint.htm
   test/html/inputjs2.htm
  +test/html/rtfbasic.asc
  +test/html/rtffull.asc
   test/cmp/incif.htm
   test/cmp/executesub.htm
   test/cmp/ssibasic.htm
  @@ -70,6 +72,8 @@
   test/cmp/execsecond.htm
   test/cmp/execprint.htm
   test/cmp/inputjs2.htm
  +test/cmp/rtfbasic.asc
  +test/cmp/rtffull.asc
   Changes.pod
   Embperl.pm
   Embperl.xs
  
  
  
  1.1.2.15  +4 -0      embperl/Attic/MANIFEST.2
  
  Index: MANIFEST.2
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/MANIFEST.2,v
  retrieving revision 1.1.2.14
  retrieving revision 1.1.2.15
  diff -u -r1.1.2.14 -r1.1.2.15
  --- MANIFEST.2        2001/05/02 11:54:43     1.1.2.14
  +++ MANIFEST.2        2001/05/07 11:48:21     1.1.2.15
  @@ -57,6 +57,8 @@
   test/html/execsecond.htm
   test/html/execprint.htm
   test/html/inputjs2.htm
  +test/html/rtfbasic.asc
  +test/html/rtffull.asc
   test/cmp/incif.htm
   test/cmp/executesub.htm
   test/cmp/ssibase.htm
  @@ -71,5 +73,7 @@
   test/cmp/execsecond.htm
   test/cmp/execprint.htm
   test/cmp/inputjs2.htm
  +test/cmp/rtfbasic.asc
  +test/cmp/rtffull.asc
   
   
  
  
  
  1.20.4.18 +2 -1      embperl/epdat.h
  
  Index: epdat.h
  ===================================================================
  RCS file: /home/cvs/embperl/epdat.h,v
  retrieving revision 1.20.4.17
  retrieving revision 1.20.4.18
  diff -u -r1.20.4.17 -r1.20.4.18
  --- epdat.h   2001/05/02 12:14:13     1.20.4.17
  +++ epdat.h   2001/05/07 11:48:23     1.20.4.18
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epdat.h,v 1.20.4.17 2001/05/02 12:14:13 richter Exp $
  +#   $Id: epdat.h,v 1.20.4.18 2001/05/07 11:48:23 richter Exp $
   #
   
###################################################################################*/
   
  @@ -113,6 +113,7 @@
       enum tNodeType       nForceType ;/* force this type for sub nodes */
       int                          bUnescape ; /* translate input?  */
       int                          bAddFlags ; /* add flags to node  */
  +    int                          bRemoveSpaces ;     /* 1 remove spaces before tag, 
2 remove after */
       unsigned char *      pContains ; /* chars that could be contained in the string 
*/
       struct tTokenTable *    pFollowedBy;/* table of tokens that can follow this one 
*/
       struct tTokenTable *    pInside ;        /* table of tokens that can apear 
inside this one */
  
  
  
  1.4.2.24  +55 -11    embperl/Attic/epparse.c
  
  Index: epparse.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epparse.c,v
  retrieving revision 1.4.2.23
  retrieving revision 1.4.2.24
  diff -u -r1.4.2.23 -r1.4.2.24
  --- epparse.c 2001/05/06 12:39:04     1.4.2.23
  +++ epparse.c 2001/05/07 11:48:24     1.4.2.24
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epparse.c,v 1.4.2.23 2001/05/06 12:39:04 richter Exp $
  +#   $Id: epparse.c,v 1.4.2.24 2001/05/07 11:48:24 richter Exp $
   #
   
###################################################################################*/
   
  @@ -307,6 +307,7 @@
            p -> bAddFlags = GetHashValueInt (pHash, "addflags", 0) ;
            p -> nCDataType = GetHashValueInt (pHash, "cdatatype", ntypCDATA) ;
            p -> nForceType = GetHashValueInt (pHash, "forcetype", 0) ;
  +         p -> bRemoveSpaces = GetHashValueInt (pHash, "removespaces", p -> 
nNodeType != ntypCDATA?2:0) ;
            p -> pStartTag  = (struct tToken *)GetHashValueStrDup (pHash, "starttag", 
NULL) ;
            p -> pEndTag    = (struct tToken *)GetHashValueStrDup (pHash, "endtag", 
NULL) ;
            p -> sParseTimePerlCode =  GetHashValueStrDup (pHash, "parsetimeperlcode", 
NULL) ;
  @@ -342,7 +343,7 @@
            
   
            if (r -> bDebug & dbgBuildToken)
  -                lprintf (r, "[%d]TOKEN: %*c%s ... %s  unesc=%d nodetype=%d, 
cdatatype=%d, nodename=%s contains='%s'\n", r -> nPid, nLevel*2, ' ', p -> sText, p -> 
pContains?sContains:p -> sEndText, p -> bUnescape, p -> nNodeType, p -> nCDataType, p 
-> sNodeName?p -> sNodeName:"<null>", sC?sC:"") ; 
  +                lprintf (r, "[%d]TOKEN: %*c%s ... %s  unesc=%d nodetype=%d, 
cdatatype=%d, nodename=%s contains='%s'\n", r -> nPid, nLevel*2, ' ', p -> sText, p -> 
sEndText, p -> bUnescape, p -> nNodeType, p -> nCDataType, p -> sNodeName?p -> 
sNodeName:"<null>", sC?sC:"") ; 
           
            if (p -> sNodeName)
                p -> nNodeName = String2Ndx (p -> sNodeName, strlen (p -> sNodeName)) ;
  @@ -532,7 +533,8 @@
                                const char *            pParentNodeName,
                                tNode                   xParentNode,
                                int                     level, 
  -                             char *                  pCDATAStart) 
  +                             char *                  pCDATAStart, 
  +                             const char *            sStopText) 
   
       {
       unsigned char * pStartChars = pTokenTable -> cStartChars ;
  @@ -544,6 +546,15 @@
       int          rc ;
       tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
       
  +    if (nEndText == 0 && sStopText)
  +     {
  +     sEndText = sStopText ;
  +     nEndText = sEndText?strlen (sEndText):0 ;    
  +     }
  +    else
  +     sStopText = NULL ;
  +
  +
       while (pCurr < pEnd)
           {
        struct tToken *     pToken          = NULL ;
  @@ -600,11 +611,16 @@
                   
                    c.nLen = pCurr - c.pStart ;
                    pToken = (struct tToken *)bsearch (&c, pTokenTab, numTokens, 
sizeof (struct tToken), CmpTokenN) ;
  +                 if (!pToken)
  +                     {
  +                     pCurr = c.pStart ;
  +                 //  bFollow = 0 ;
  +                     }
                    }
   
                if (pToken)
                       {
  -                 if (pToken -> nNodeType != ntypCDATA)
  +                 if (pToken -> bRemoveSpaces & 2)
                        while (isspace (*pCurr))
                            pCurr++ ;
                    
  @@ -614,8 +630,15 @@
                   else
                    {
                    pToken = pNextTokenTab -> pContainsToken ;
  -                 if (pToken && pToken -> sNodeName)
  +                 //if (pToken = pNextTokenTab -> pContainsToken)
  +                 //  {
  +                 //  unsigned char * pContains ;
  +                 //  if (!(pToken -> pInside) && (!(pContains = pToken -> 
pContains) || !(pContains [*pCurr >> 3] & (1 << (*pCurr & 7)))))
  +                 //      pToken = NULL ;
  +                 //  }                   
  +                 if (pToken && pToken -> sNodeName)
                        pNodeName = pToken -> sNodeName ;
  +                 
                    break ;
                    }
   
  @@ -631,14 +654,20 @@
                    {
                    if (nCDataType)
                        { /* add text before current token as node */
  +                     char * pEnd = pCurrTokenStart - 1;
  +                     if (pToken -> bRemoveSpaces & 1)
  +                         while (pEnd >= pCurrStart && isspace (*pEnd))
  +                             pEnd-- ;
  +
                        if (bUnescape)
                               {
                               r -> bEscInUrl = bUnescape - 1 ;
  -                            TransHtml (r, pCurrStart, pCurrTokenStart - pCurrStart) 
;
  +                            TransHtml (r, pCurrStart, pEnd - pCurrStart + 1) ;
                               r -> bEscInUrl = 0 ;
                               }
   
  -                     if (!(xNewNode = Node_appendChild (pDomTree, nCDataType, 0, 
pCurrStart, pCurrTokenStart - pCurrStart, xParentNode, level, GetLineNoOf (r, 
pCurrStart))))
  +                     
  +                     if (!(xNewNode = Node_appendChild (pDomTree, nCDataType, 0, 
pCurrStart, pEnd - pCurrStart + 1, xParentNode, level, GetLineNoOf (r, pCurrStart))))
                            return 1 ;
                        }
                    pCurrStart = pCurrTokenStart ;
  @@ -708,7 +737,17 @@
   
                    if (pInside = pToken -> pInside)
                        { /* parse for further tokens inside of this token */
  -                        ParseTokens (r, &pCurr, pEnd, pInside, pToken -> sEndText, 
pToken -> pContains, pToken -> nCDataType == ntypCDATA && !pToken -> 
sNodeName?ntypAttrValue:pToken -> nCDataType, 0, pToken -> bUnescape, pNodeName, 
xNewNode, level+1, pToken -> nNodeType == ntypCDATA?pCurrTokenStart:0) ;
  +                        ParseTokens (r, &pCurr, pEnd, pInside, 
  +                                         pToken -> sEndText,
  +                                         pToken -> pContains,
  +                                         pToken -> nCDataType == ntypCDATA && 
!pToken -> sNodeName?ntypAttrValue:pToken -> nCDataType,
  +                                         0,
  +                                         pToken -> bUnescape, 
  +                                         pNodeName,
  +                                         xNewNode,
  +                                         level+1,
  +                                         pToken -> nNodeType == 
ntypCDATA?pCurrTokenStart:NULL,
  +                                         sEndText && *sEndText?sEndText:NULL) ;
                        }    
                    else
                        { /* nothing more inside of this token allowed, so search for 
the end of the token */
  @@ -721,6 +760,11 @@
                            while (pContains [*pEndCurr >> 3] & (1 << (*pEndCurr & 7)))
                                   pEndCurr++ ;
                            nSkip = 0 ;
  +                         if (pEndCurr == pCurr)
  +                             {
  +                             //pEndCurr = NULL ;
  +                             //pToken   = NULL ;
  +                             }
                            }
                        else
                            {
  @@ -759,7 +803,7 @@
                            }
                        }
   
  -                 if (pToken -> nNodeType == ntypStartTag || pToken -> nNodeType == 
ntypEndStartTag)
  +                 if (pToken && (pToken -> nNodeType == ntypStartTag || pToken -> 
nNodeType == ntypEndStartTag))
                        {
                        level++ ;
                        xParentNode = xNewNode ;
  @@ -787,7 +831,7 @@
            if ((pCurr - pCurrStart != 0 || nCDataType == ntypAttrValue) && nCDataType)
                if (!(xNewNode = Node_appendChild (pDomTree,  nCDataType, 0, 
pCurrStart, pCurr - pCurrStart, xParentNode, level, GetLineNoOf (r, pCurr))))
                    return 1 ;
  -         if (!pCDATAStart)
  +         if (!pCDATAStart && !sStopText)
                pCurr += nEndText ;
               *ppCurr = pCurr ;
               return 0 ;
  @@ -851,7 +895,7 @@
   
       pTokenTableSave = r -> pTokenTable ;
       
  -    if ((rc = ParseTokens (r, &pStart, pEnd, r -> pTokenTable, "", NULL, ntypCDATA, 
0, 0, "root", xDocNode, 0, NULL)) != ok)
  +    if ((rc = ParseTokens (r, &pStart, pEnd, r -> pTokenTable, "", NULL, ntypCDATA, 
0, 0, "root", xDocNode, 0, NULL, NULL)) != ok)
        return rc ; 
       
       r -> pTokenTable = pTokenTableSave ;
  
  
  
  1.70.4.55 +6 -1      embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.70.4.54
  retrieving revision 1.70.4.55
  diff -u -r1.70.4.54 -r1.70.4.55
  --- test.pl   2001/05/06 12:39:04     1.70.4.54
  +++ test.pl   2001/05/07 11:48:27     1.70.4.55
  @@ -11,7 +11,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: test.pl,v 1.70.4.54 2001/05/06 12:39:04 richter Exp $
  +#   $Id: test.pl,v 1.70.4.55 2001/05/07 11:48:27 richter Exp $
   #
   ###################################################################################
   
  @@ -579,6 +579,11 @@
           'version'    => 2,
           'syntax'     => 'RTF',
           'param'      => { one => 1, hash => { a => 111, b => 222, c => 
[1111,2222,3333,4444]}, array => [11,22,33] },
  +        },
  +    'rtf/rtffull.asc' => { 
  +        'version'    => 2,
  +        'syntax'     => 'RTF',
  +        'param'      => { 'Nachname' => 'Richter', Vorname => 'Gerald' },
           },
   ) ;
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.36  +12 -2     embperl/Embperl/Attic/Syntax.pm
  
  Index: Syntax.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl/Attic/Syntax.pm,v
  retrieving revision 1.1.4.35
  retrieving revision 1.1.4.36
  diff -u -r1.1.4.35 -r1.1.4.36
  --- Syntax.pm 2001/05/06 12:39:06     1.1.4.35
  +++ Syntax.pm 2001/05/07 11:48:40     1.1.4.36
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: Syntax.pm,v 1.1.4.35 2001/05/06 12:39:06 richter Exp $
  +#   $Id: Syntax.pm,v 1.1.4.36 2001/05/07 11:48:40 richter Exp $
   #
   ###################################################################################
    
  @@ -556,10 +556,20 @@
   
   End text
   
  +
  +=item 'nodename'
  +
  +Text that should be outputed when node is stringifyed. Defaults to text.
  +If the first character is a ':' you can specify the sourounding delimiters for this
  +tag with :<start>:<end>:<text>. Example:  ':{:}:NAME' .
  +
   =item 'contains'   => 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789'
   
   Token consists of the following characters. Either C<start> and C<end> B<or> 
C<contains>
  -could be specified.
  +could be specified. 
  +
  +NOTE: If a item that only specfifies contains but no text should be compiled, you 
must
  +specfify a nodname.
   
   =item 'unescape' => 1
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +90 -70    embperl/Embperl/Syntax/Attic/RTF.pm
  
  Index: RTF.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/RTF.pm,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- RTF.pm    2001/05/06 12:39:06     1.1.2.5
  +++ RTF.pm    2001/05/07 11:48:46     1.1.2.6
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: RTF.pm,v 1.1.2.5 2001/05/06 12:39:06 richter Exp $
  +#   $Id: RTF.pm,v 1.1.2.6 2001/05/07 11:48:46 richter Exp $
   #
   ###################################################################################
    
  @@ -22,7 +22,7 @@
   use HTML::Embperl::Syntax::EmbperlBlocks ;
   
   use strict ;
  -use vars qw{@ISA %Block %FieldStart %CmdStart %Varinside %Varseparator %Var 
%VarComment} ;
  +use vars qw{@ISA %Block %BlockInside %FieldStart %CmdStart %Var %Spaces} ;
   
   
   
  @@ -55,7 +55,7 @@
        $self -> AddToRoot ($self -> {-rtfBlocks}) ;
   
        #$self -> {-rtfCmds} = $self -> {-rtfBlocks}{'RTF field'}{'follow'}{'RTF 
fieldstart'}{'follow'}{'RTF block cmd'}{'follow'}  ;
  -     $self -> {-rtfCmds} = $self -> {-rtfBlocks}{'RTF field'}{'inside'}{'RTF 
fieldstart'}{'inside'}{'RTF block cmd'}{'follow'}  ;
  +     $self -> {-rtfCmds} = $self -> {-rtfBlocks}{'RTF field'}{'inside'}{'RTF 
fieldstart'}{'inside'}{'RTF block cmd'}{'inside'}  ;
        Init ($self) ;
           }
   
  @@ -82,6 +82,7 @@
                                   'cdatatype' => ntypAttrValue,
                                   'forcetype' => 1,
                                   'unescape'  => 1,
  +                                'removespaces'  => 1,
                                   (ref($taginfo) eq 'HASH'?%$taginfo:()),
                                 } ;
       $tag -> {'procinfo'} = { $self -> {-procinfotype} => $procinfo } if ($procinfo) 
;
  @@ -153,6 +154,40 @@
       {
       my ($self) = @_ ;
   
  +    $self -> AddRTFCmd ('DOCVARIABLE',
  +                            { 
  +                            perlcode => '_ep_rp(%$x%,scalar(join(\'\',', 
  +                            perlcodeend => ')));', 
  +                         },
  +                            { 
  +                            #'removenode'  => 4,
  +                            'inside'    => \%Var,
  +                            'cdatatype' => 0,
  +                            }
  +                            ) ;
  +    $self -> AddRTFCmd ('MERGEFIELD',
  +                            { 
  +                            perlcode => '_ep_rp(%$x%,scalar(join(\'\',', 
  +                            perlcodeend => ')));', 
  +                         },
  +                            { 
  +                            #'removenode'  => 4,
  +                            'inside'    => \%Var,
  +                            'cdatatype' => 0,
  +                         }) ;
  +
  +
  +    $self -> AddRTFCmd ('NEXT',
  +                            { 
  +                            perlcode => '# record', 
  +                         },
  +                            { 
  +                            'nodename'  => '',
  +                            'cdatatype' => 0,
  +                         }) ;
  +
  +
  +=pod
       $self -> AddRTFCmdWithEnd ('if', 'endif',
                               {
                               perlcode    => 'if (%&<noname>%) { ', 
  @@ -188,27 +223,6 @@
                               stackname   => 'metacmd',
                               stackmatch  => 'if',
                               }) ;
  -    $self -> AddRTFCmd ('DOCVARIABLE',
  -                            { 
  -                            perlcode => '_ep_rp(%$x%,scalar(join(\'\',', 
  -                            perlcodeend => ')));', 
  -                         },
  -                            { 
  -                            #'removenode'  => 4,
  -                            'inside'    => \%Var,
  -                            'cdatatype' => 0,
  -                            }
  -                            ) ;
  -    $self -> AddRTFCmd ('MERGEFIELD',
  -                            { 
  -                    perlcode => 
  -                        [
  -                        '_ep_rp(%$x%,scalar(%&<noname>%));', 
  -                     ],
  -                    removenode  => 4,
  -                    compilechilds => 0,
  -
  -                         }) ;
       $self -> AddRTFCmdBlock  ('while', 'endwhile',
                   { 
                   perlcode => 'while (%&<noname>%) { ', 
  @@ -282,43 +296,11 @@
                   pop2        => 'subname',
                   switchcodetype => 1,
                   }) ;
  -    } 
   
  +=cut
   
  -%Varinside = (
  -    '-lsearch' => 1,
  -    'Value' => 
  -        {
  -        'contains'   => 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789',
  -        #'inside'     => \%Varseparator,
  -        'nodetype'  => ntypTag,
  -        'nodename'   => 'part_of_var',
  -        'cdatatype' => ntypTag,
  -        'procinfo'   => {
  -            'embperl' => {
  -                perlcode => '{%#0%}', 
  -                },
  -            },
  -        },
  -    ) ;
  -
  +    } 
   
  -%Varseparator = (
  -    '-lsearch' => 1,
  -    'Varname' => 
  -        {
  -        'text'   => '.',
  -        'nodename'   => 'varpart',
  -        'nodetype'  => ntypTag,
  -        'follow'     => \%Varinside,
  -        'procinfo'   => {
  -            'embperl' => {
  -                perlcode => '{%#0%}', 
  -                compilechilds => 0,
  -                },
  -            },
  -        }
  -    ) ;
   
   
   sub Var2Code
  @@ -338,6 +320,7 @@
       return $code ;
       }
   
  +# Variablename inside of a command
   
   %Var = (
       '-lsearch' => 1,
  @@ -362,19 +345,30 @@
           'contains'   => 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789.',
           },
       ) ;
  -
   
  -%VarComment = (
  -    '-lsearch' => 1,
  -    'VarnameComment' => 
  +%Spaces = (
  +    'Spaces2' => 
           {
  -        text => '//*',
           'cdatatype' => 0,
  -        'contains'   => 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789.',
  -        }
  +        'text'  => '  ',
  +        'nodename'  => ':: ',
  +        },
  +    'Spaces3' => 
  +        {
  +        'cdatatype' => 0,
  +        'text'  => '   ',
  +        'nodename'  => ':: ',
  +        },
  +    'Spaces4' => 
  +        {
  +        'cdatatype' => 0,
  +        'text'  => '    ',
  +        'nodename'  => ':: ',
  +        },
       ) ;
   
   
  +# Start of commands
   
   %CmdStart = (
       '-lsearch' => 1,
  @@ -383,19 +377,19 @@
        'end'      => '}',
        'unescape' => 1,
        'cdatatype' => ntypAttrValue,
  -        #'nodename' => '',
  -     'follow'  => {},
  +        'nodename' => ':',
  +     'inside'  => {}, #\%Spaces,
           },
       ) ;
  -
   
  +# Field start and end
   
   %FieldStart = (
       '-lsearch' => 1,
       'RTF block inside'    => {
        'text'     => '{',
        'end'      => '}',
  -     'unescape' => 1,
  +     'cdatatype' => ntypAttrValue,
        'inside'  => \%Block,
           },
       'RTF fieldstart' => {
  @@ -409,13 +403,26 @@
        'text'     => '{\fldrslt',
        'end'      => '}',
           'nodename' => '',
  +     'cdatatype' => ntypAttrValue,
  +     'inside'  => \%BlockInside,
           },
       ) ;
  -
   
  +# Basic definition of Block in a RTF file
   
   %Block = (
       '-lsearch' => 1,
  +    'RTF field' => {
  +     'text' => '{\field',
  +     'end'  => '}',
  +        'nodename' => ':{:}:',
  +     'cdatatype' => ntypAttrValue,
  +     'inside' => \%FieldStart,
  +        },
  +    ) ;
  +
  +my %Blockx = (
  +    '-lsearch' => 1,
       'RTF block' => {
        'text' => '{',
        'end'  => '}',
  @@ -442,6 +449,19 @@
           'nodetype' => ntypCDATA,
           },
   
  +    ) ;
  +
  +# Block inside of a command that should be deleted in the output
  +
  +%BlockInside = (
  +    '-lsearch' => 1,
  +    'RTF block' => {
  +     'text' => '{',
  +     'end'  => '}',
  +        'nodename' => '',
  +     'cdatatype' => ntypAttrValue,
  +     'inside' => \%BlockInside,
  +        },
       ) ;
   
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +12 -0     embperl/test/cmp/Attic/rtfbasic.asc
  
  
  
  
  1.1.2.1   +23 -0     embperl/test/cmp/Attic/rtffull.asc
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.5   +10 -5     embperl/test/html/rtf/Attic/rtfbasic.asc
  
  Index: rtfbasic.asc
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/rtf/Attic/rtfbasic.asc,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- rtfbasic.asc      2001/05/06 12:39:06     1.1.2.4
  +++ rtfbasic.asc      2001/05/07 11:49:01     1.1.2.5
  @@ -1,6 +1,11 @@
  -{Param[0]: }{\field{\*\fldinst { DOCVARIABLE one \\* MERGEFORMAT }}{\fldrslt }}
  -{Param[0]: }{\field{\*\fldinst { DOCVARIABLE hash.b \\* MERGEFORMAT }}{\fldrslt }}
  -{Param[1]: }{\field{\*\fldinst { DOCVARIABLE array.2 }}{\fldrslt }}
  +{one: }{\field{\*\fldinst { DOCVARIABLE one \\* MERGEFORMAT }}{\fldrslt }}
  +{hash.b: }{\field{\*\fldinst { DOCVARIABLE hash.b \\* MERGEFORMAT }}{\fldrslt }}
  +{array.2: }{\field{\*\fldinst { DOCVARIABLE array.2 }}{\fldrslt }}
   
  -{Param[0]: }{\field{\*\fldinst { DOCVARIABLE hash.c.2 \\* MERGEFORMAT }}{\fldrslt }}
  -{Param[1]: }{\field{\*\fldinst { DOCVARIABLE hash.c.3 }}{\fldrslt }}
  \ No newline at end of file
  +{hash.c.2: }{\field{\*\fldinst { DOCVARIABLE hash.c.2 \\* MERGEFORMAT }}{\fldrslt }}
  +{hash.c.3: }{\field{\*\fldinst { DOCVARIABLE hash.c.3 }}{\fldrslt }}
  +
  +{hash.c.2: }{\field{\*\fldinst { MERGEFIELD hash.c.0 \\* MERGEFORMAT }}{\fldrslt }}
  +{hash.c.3: }{\field{\*\fldinst { MERGEFIELD hash.c.1 }}{\fldrslt }}
  +
  +{\field{\*\fldinst {\b\f1\fs80\lang1024   MERGEFIELD one }}{\fldrslt 
{\b\f1\fs80\lang1024 ----}}}
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +24 -0     embperl/test/html/rtf/Attic/rtffull.asc
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to