perl-embperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@locus.apache.org
Subject cvs commit: embperl/Embperl Tokens.pm
Date Wed, 03 May 2000 20:57:32 GMT
richter     00/05/03 13:57:32

  Modified:    .        Tag: Embperl2 Changes.pod Makefile.PL epdom.c
                        epparse.c
               Embperl  Tag: Embperl2 Tokens.pm
  Log:
  
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.115.2.1 +6 -0      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.115
  retrieving revision 1.115.2.1
  diff -u -r1.115 -r1.115.2.1
  --- Changes.pod	2000/05/02 06:43:25	1.115
  +++ Changes.pod	2000/05/03 20:57:30	1.115.2.1
  @@ -1,5 +1,11 @@
   =pod
   
  +=head1 2.0b1_dev -- That's what currently under developement
  +
  +   - "perl Makefile.PL debug" will build debugging information for
  +      gdb/ms-vc++ into Embperl library.
  +
  +
   =head1 1.3b4_dev -- That's what currently under developement
   
   Last Update: <$localtime$> (MET)
  
  
  
  1.28.2.3  +28 -1     embperl/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/embperl/Makefile.PL,v
  retrieving revision 1.28.2.2
  retrieving revision 1.28.2.3
  diff -u -r1.28.2.2 -r1.28.2.3
  --- Makefile.PL	2000/05/03 14:03:49	1.28.2.2
  +++ Makefile.PL	2000/05/03 20:57:30	1.28.2.3
  @@ -118,6 +118,15 @@
           return $txt ;
   	}
   	
  +sub MY::cflags 
  +	{
  +	my $self = shift ;
  +        
  +        my $txt = $self -> MM::cflags (@_) ;
  +	$txt =~ s/CCFLAGS\s*=/CCFLAGS = $ccdebug / ;
  +        
  +        return $txt ;
  +	}
   
   	
   
  @@ -273,7 +282,23 @@
   $apache = 0 ;
   $b = 0 ;
   
  -if (defined ($ARGV[0]) && ($ARGV[0] =~ /^\W/))
  +$ccdebug = '' ;
  +$lddebug = '' ;
  +
  +if ($ARGV[0] eq 'debug')
  +    {
  +    if ($win32)
  +        {
  +        $ccdebug = '-Zi' ;
  +        $lddebug = '-debug' ;
  +        }
  +    else
  +        {
  +        $ccdebug = '-g' ;
  +        $lddebug = '-g' ;
  +        }
  +    }
  +elsif (defined ($ARGV[0]) && ($ARGV[0] =~ /^\W/))
       {
       $apache = 2 ;
       $b = 1 ;
  @@ -807,6 +832,8 @@
               }
           }
       }
  +
  +$dynlib->{'OTHERLDFLAGS'} .= " $lddebug" ;
   
   
   WriteMakefile(
  
  
  
  1.1.2.2   +1 -1      embperl/Attic/epdom.c
  
  Index: epdom.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.c,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- epdom.c	2000/05/03 14:03:49	1.1.2.1
  +++ epdom.c	2000/05/03 20:57:30	1.1.2.2
  @@ -65,7 +65,7 @@
   	}
       
       if (r -> bDebug & dbgParse)
  -        lprintf (r, "[%d]PARSE: AddNode: %*s type=%d text=%s\n", r -> nPid, nLevel *
2, "", nType, pNode -> sText) ; 
  +        lprintf (r, "[%d]PARSE: AddNode: +%02d %*s type=%d text=%s\n", r -> nPid, nLevel,
nLevel * 2, "", nType, pNode -> sText) ; 
       
       *pNewNode = pNode ;
       
  
  
  
  1.1.2.5   +25 -7     embperl/Attic/epparse.c
  
  Index: epparse.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epparse.c,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- epparse.c	2000/05/03 14:03:50	1.1.2.4
  +++ epparse.c	2000/05/03 20:57:30	1.1.2.5
  @@ -26,6 +26,7 @@
       const char *    sEndText ;  /* string which ends the block */
       const char *    sNodeName;  /* name of the node to create */
       enum tNodeType  nNodeType ; /* type of the node that should be created */
  +    enum tNodeType  nCDataType ; /* type of the node that should be created */
       unsigned char *      pContains ; /* chars that could becontains 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
*/
  @@ -203,6 +204,7 @@
   	    p -> sEndText  = GetHashValueStr (pHash, "end", pDefEnd) ;
   	    p -> sNodeName = GetHashValueStr (pHash, "nodename", NULL) ;
   	    p -> nNodeType = GetHashValueInt (pHash, "nodetype", ntypTag) ;
  +	    p -> nCDataType = GetHashValueInt (pHash, "cdatatype", ntypCDATA) ;
   	    if (sContains  = GetHashValueStr (pHash, "contains", NULL))
   		{
   		unsigned char * pC ;
  @@ -305,6 +307,7 @@
                       struct tTokenTable * pTokenTable, 
                       const char *          sEndText,
                       const char *          pParentContains,
  +		    enum tNodeType		  nCDataType,
   		    const char *          pParentNodeName,
   		    struct tNode *        pParentNode,
   		    int			  level) 
  @@ -384,18 +387,27 @@
   
   		if (pCurrStart < pCurrTokenStart)
   		    {
  -		    if ((rc = CreateNode (r, ntypCDATA, pCurrStart, pCurrTokenStart - pCurrStart, pParentNode,
level, &pNewNode)) != ok)
  +		    if ((rc = CreateNode (r, nCDataType, pCurrStart, pCurrTokenStart - pCurrStart, pParentNode,
level, &pNewNode)) != ok)
   			return rc ;
   		    pCurrStart = pCurrTokenStart ;
   		    }
               
   		if (pNodeName == NULL)
   		    pNodeName = pToken -> sText ;
  +		
  +		if (pToken -> nNodeType == ntypEndTag && level > 0)
  +		    {
  +		    level-- ;
  +		    pParentNode = pParentNode -> pParent ;
  +		    }
  +		
  +		
   		if ((rc = CreateNode (r, pToken -> nNodeType, pNodeName, strlen (pNodeName), pParentNode,
level, &pNewNode)) != ok)
   		    return rc ;
  -                if (pInside = pToken -> pInside)
  +		
  +		if (pInside = pToken -> pInside)
                       {
  -                    ParseTokens (r, &pCurr, pEnd, pInside, pToken -> sEndText, pToken
-> pContains, pNodeName, pNewNode, level+1) ;
  +                    ParseTokens (r, &pCurr, pEnd, pInside, pToken -> sEndText, pToken
-> pContains, pToken -> nCDataType, pNodeName, pNewNode, level+1) ;
                       }    
                   else
                       {
  @@ -412,18 +424,24 @@
                       if (pEndCurr)
   			{
   			if (pEndCurr - pCurr)
  -			    if ((rc = CreateNode (r, ntypCDATA, pCurr, pEndCurr - pCurr, pNewNode, level+1,
&pNewNode)) != ok)
  +			    if ((rc = CreateNode (r, pToken -> nCDataType, pCurr, pEndCurr - pCurr, pNewNode,
level+1, &pNewNode)) != ok)
   				return rc ;
                           pCurr = pEndCurr + strlen (pToken -> sEndText) ;
   			}
                       }
                   pCurrStart = pCurr ;
  +
  +		if (pToken -> nNodeType == ntypStartTag)
  +		    {
  +		    level++ ;
  +		    pParentNode = pNewNode ;
  +		    }
   		}
               }
           if (pParentContains && ((pParentContains [*pCurr >> 3] & 1 <<
(*pCurr & 7)) == 0) )
               {
   	    if (pCurr - pCurrStart)
  -		if ((rc = CreateNode (r, ntypCDATA, pCurrStart, pCurr - pCurrStart, pParentNode, level,
&pNewNode)) != ok)
  +		if ((rc = CreateNode (r, nCDataType, pCurrStart, pCurr - pCurrStart, pParentNode, level,
&pNewNode)) != ok)
   		    return rc ;
   	    break ;
               }
  @@ -431,7 +449,7 @@
   	    (*pCurr == *sEndText && strncmp (pCurr, sEndText, nEndText) == 0))
               {
   	    if (pCurr - pCurrStart)
  -		if ((rc = CreateNode (r, ntypCDATA, pCurrStart, pCurr - pCurrStart, pParentNode, level,
&pNewNode)) != ok)
  +		if ((rc = CreateNode (r, nCDataType, pCurrStart, pCurr - pCurrStart, pParentNode, level,
&pNewNode)) != ok)
   		    return rc ;
               pCurr += nEndText ;
   	    break ;
  @@ -477,7 +495,7 @@
   	return rc ;
   	}
   
  -    return ParseTokens (r, &pStart, pEnd, &pTable, "", NULL, "root", NULL, 0) ;

  +    return ParseTokens (r, &pStart, pEnd, &pTable, "", NULL, ntypCDATA, "root",
NULL, 0) ; 
   
   
       }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +12 -9     embperl/Embperl/Attic/Tokens.pm
  
  Index: Tokens.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl/Attic/Tokens.pm,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- Tokens.pm	2000/05/03 14:03:51	1.1.2.3
  +++ Tokens.pm	2000/05/03 20:57:32	1.1.2.4
  @@ -16,20 +16,23 @@
           'text'   => '"',
           'end'    => '"',
           'inside' => \%Cmds,
  -        'nodetype'   => ntypAttrValue,
  +        'nodetype'   => ntypAttr,
  +        'cdatatype'  => ntypAttrValue,
           },
       'Attribut \'\'' => 
           {
           'text'   => '\'',
           'end'    => '\'',
           'inside' => \%Cmds,
  -        'nodetype'   => ntypAttrValue,
  +        'nodetype'   => ntypAttr,
  +        'cdatatype'  => ntypAttrValue,
           },
       'Attribut alphanum' => 
           {
           'contains'   => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789',
           'inside' => \%Cmds,
  -        'nodetype'   => ntypAttrValue,
  +        'nodetype'   => ntypAttr,
  +        'cdatatype'  => ntypAttrValue,
           }
       ) ;
   
  @@ -48,9 +51,9 @@
           'text' => 'input',
           'inside' => 
               {
  -            'type'  => { 'text' => 'type',  'nodename' => 'type',  'nodetype'
  => ntypAttr, follow => \%AssignAttr },
  -            'name'  => { 'text' => 'name',  'nodename' => 'name',  'nodetype'
  => ntypAttr, follow => \%AssignAttr },
  -            'value' => { 'text' => 'value', 'nodename' => 'value', 'nodetype'
  => ntypAttr, follow => \%AssignAttr },
  +            'type'  => { 'text' => 'type',  'nodename' => 'type',  follow =>
\%AssignAttr },
  +            'name'  => { 'text' => 'name',  'nodename' => 'name',  follow =>
\%AssignAttr },
  +            'value' => { 'text' => 'value', 'nodename' => 'value', follow =>
\%AssignAttr },
               }
            },
       'tr' => {
  @@ -81,15 +84,15 @@
           'text' => 'select',
           'inside' => 
               {
  -            'name'  => { 'text' => 'name',  'nodename' => 'name', 'nodetype' 
 => ntypAttr, follow => \%AssignAttr },
  +            'name'  => { 'text' => 'name',  'nodename' => 'name', follow =>
\%AssignAttr },
               },
           'nodetype'   => ntypStartTag, 
            },
       'option' => {
  -        'text' => 'select',
  +        'text' => 'option',
           'inside' => 
               {
  -            'value' => { 'text' => 'value', 'nodename' => 'value', 'nodetype'
  => ntypAttr, follow => \%AssignAttr },
  +            'value' => { 'text' => 'value', 'nodename' => 'value', follow =>
\%AssignAttr },
               }
            },
       '/select' => {
  
  
  

Mime
View raw message