richter     00/06/13 00:59:05

  Modified:    .        Tag: Embperl2 epparse.c
               Embperl  Tag: Embperl2 Syntax.pm
               test/html Tag: Embperl2 if.htm
  Log:
  Embperl 2 - fix Syntax rules
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.23  +8 -1      embperl/Attic/epparse.c
  
  Index: epparse.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epparse.c,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- epparse.c 2000/06/09 14:23:02     1.1.2.22
  +++ epparse.c 2000/06/13 07:59:04     1.1.2.23
  @@ -193,11 +193,18 @@
            if (r -> bDebug & dbgBuildToken)
                lprintf (r, "[%d]TOKEN: <- %s\n", r -> nPid, pAttr) ; 
            
  +         if (pNewTokenTable -> numTokens == 0)
  +             {
  +             strncpy (r -> errdat1, "BuildTokenHash", sizeof (r -> errdat1)) ;
  +             sprintf (r -> errdat2, "%s => %s does not contain any tokens", pKey, 
pAttr) ;
  +             return rcNotFound ;
  +             }
  +
            hv_store(pSubHash, "--cptr", sizeof ("--cptr") - 1, newSViv 
((IV)pNewTokenTable), 0) ;
            }
        else
            if (r -> bDebug & dbgBuildToken)
  -             lprintf (r, "[%d]TOKEN: -> %s already build\n", r -> nPid, pAttr) ; 
  +             lprintf (r, "[%d]TOKEN: -> %s already build; numTokens=%d\n", r -> 
nPid, pAttr, pNewTokenTable->numTokens) ; 
        
   
        *pTokenTable = pNewTokenTable ;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.23  +85 -77    embperl/Embperl/Attic/Syntax.pm
  
  Index: Syntax.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl/Attic/Syntax.pm,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- Syntax.pm 2000/06/11 18:58:18     1.1.2.22
  +++ Syntax.pm 2000/06/13 07:59:05     1.1.2.23
  @@ -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.2.22 2000/06/11 18:58:18 richter Exp $
  +#   $Id: Syntax.pm,v 1.1.2.23 2000/06/13 07:59:05 richter Exp $
   #
   ###################################################################################
   
  @@ -71,6 +71,53 @@
   
   
   
  +
  +%Attr = (
  +    '-lsearch' => 1,
  +    'Attribut ""' => 
  +        {
  +        'text'   => '"',
  +        'end'    => '"',
  +        'inside' => \%Cmds,
  +        'nodetype'   => ntypAttr,
  +        'cdatatype'  => ntypAttrValue,
  +        },
  +    'Attribut \'\'' => 
  +        {
  +        'text'   => '\'',
  +        'end'    => '\'',
  +        'inside' => \%Cmds,
  +        'nodetype'   => ntypAttr,
  +        'cdatatype'  => ntypAttrValue,
  +        },
  +    'Attribut alphanum' => 
  +        {
  +        'contains'   => 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789',
  +        'inside' => \%Cmds,
  +        'nodetype'   => ntypAttr,
  +        'cdatatype'  => ntypAttrValue,
  +        }
  +    ) ;
  +
  +
  +%AssignAttr = (
  +    'Assign' => 
  +        {
  +        'text' => '=',
  +        'follow' => \%Attr,
  +        }
  +    ) ;
  +
  +
  +%AssignAttrLink = (
  +    'Assign' => 
  +        {
  +        'text' => '=',
  +        'follow' => \%AttrLink,
  +        }
  +    ) ;
  +
  +
   %Cmds = (
       '-lsearch' => 1,
       'Embperl command escape' => {
  @@ -159,87 +206,12 @@
         ) ;  
      
   
  -clonehash (\%Cmds, \%CmdsLink, { 'unescape' => 2 }) ;
  -
  -$CmdsLink{'Embperl output code'}{'nodename'} = '[+url' ;
  -$CmdsLink{'Embperl output code'}{'procinfo'}{'embperl'}{'perlcode'} = 
  -                        [
  -                        'if (!defined (_ep_rpurl(%$n%,scalar(do{%#~0:$col%})))) 
%#~-0:$row% { if ($col == 0) { _ep_dcp (%$t%,%^*htmltable%) ; last l%^*htmltable% ; } 
else { _ep_dcp (%$t%,%^*htmlrow%) ; last l%^*htmlrow% ; }}',
  -                        'if (!defined (_ep_rpurl(%$n%,scalar(do{%#~0:$col%})))) { 
_ep_dcp (%$t%,%^*htmlrow%) ; last l%^*htmlrow% ; }',
  -                        'if (!defined 
(_ep_rpurl(%$n%,scalar($val3=do{%#~0:$row%;})))) {  _ep_dcp (%$t%,%^*htmltable%) ; 
last l%^*htmltable% ; }',
  -                        '_ep_rpurl(%$n%,scalar(do{%#0%}));', 
  -                        ] ;
  -
  -
  -
  -
  -%Attr = (
  -    '-lsearch' => 1,
  -    'Attribut ""' => 
  -        {
  -        'text'   => '"',
  -        'end'    => '"',
  -        'inside' => \%Cmds,
  -        'nodetype'   => ntypAttr,
  -        'cdatatype'  => ntypAttrValue,
  -        },
  -    'Attribut \'\'' => 
  -        {
  -        'text'   => '\'',
  -        'end'    => '\'',
  -        'inside' => \%Cmds,
  -        'nodetype'   => ntypAttr,
  -        'cdatatype'  => ntypAttrValue,
  -        },
  -    'Attribut alphanum' => 
  -        {
  -        'contains'   => 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789',
  -        'inside' => \%Cmds,
  -        'nodetype'   => ntypAttr,
  -        'cdatatype'  => ntypAttrValue,
  -        }
  -    ) ;
  -
  -clonehash (\%Attr, \%AttrLink, { inside => \%CmdsLink }) ;
  -
  -
  -
  -%AssignAttr = (
  -    'Assign' => 
  -        {
  -        'text' => '=',
  -        'follow' => \%Attr,
  -        }
  -    ) ;
  -
  -
  -%AssignAttrLink = (
  -    'Assign' => 
  -        {
  -        'text' => '=',
  -        'follow' => \%AttrLink,
  -        }
  -    ) ;
  -
  -%HrefLink = (
  -            'link'  => { 'text' => 'href',  'nodename' => 'href', follow => 
\%AssignAttrLink },
  -            %Cmds,
  -) ;
   
  -%SrcLink = (
  -            'link'  => { 'text' => 'src',  'nodename' => 'src', follow => 
\%AssignAttrLink },
  -            %Cmds,
  -) ;
   
  -%ActionLink = (
  -            'link'  => { 'text' => 'action',  'nodename' => 'action', follow => 
\%AssignAttrLink },
  -            %Cmds,
  -) ;
  -
   %HtmlTagsStd = (
           'forcetype'  => ntypAttrValue,
           'cdatatype'  => ntypAttrValue,
  -         'inside'    => \%Cmds,
  +        'inside'    => \%Cmds,
           ) ;
   
   
  @@ -657,6 +629,42 @@
           },
       %MetaCmds,
       ) ;
  +
  +
  +
  +
  +
  +clonehash (\%Cmds, \%CmdsLink, { 'unescape' => 2 }) ;
  +
  +$CmdsLink{'Embperl output code'}{'nodename'} = '[+url' ;
  +$CmdsLink{'Embperl output code'}{'procinfo'}{'embperl'}{'perlcode'} = 
  +                        [
  +                        'if (!defined (_ep_rpurl(%$n%,scalar(do{%#~0:$col%})))) 
%#~-0:$row% { if ($col == 0) { _ep_dcp (%$t%,%^*htmltable%) ; last l%^*htmltable% ; } 
else { _ep_dcp (%$t%,%^*htmlrow%) ; last l%^*htmlrow% ; }}',
  +                        'if (!defined (_ep_rpurl(%$n%,scalar(do{%#~0:$col%})))) { 
_ep_dcp (%$t%,%^*htmlrow%) ; last l%^*htmlrow% ; }',
  +                        'if (!defined 
(_ep_rpurl(%$n%,scalar($val3=do{%#~0:$row%;})))) {  _ep_dcp (%$t%,%^*htmltable%) ; 
last l%^*htmltable% ; }',
  +                        '_ep_rpurl(%$n%,scalar(do{%#0%}));', 
  +                        ] ;
  +
  +
  +
  +clonehash (\%Attr, \%AttrLink, { inside => \%CmdsLink }) ;
  +
  +
  +%HrefLink = (
  +            'link'  => { 'text' => 'href',  'nodename' => 'href', follow => 
\%AssignAttrLink },
  +            %Cmds,
  +) ;
  +
  +%SrcLink = (
  +            'link'  => { 'text' => 'src',  'nodename' => 'src', follow => 
\%AssignAttrLink },
  +            %Cmds,
  +) ;
  +
  +%ActionLink = (
  +            'link'  => { 'text' => 'action',  'nodename' => 'action', follow => 
\%AssignAttrLink },
  +            %Cmds,
  +) ;
  +
   
   
   %Default = (
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.3   +5 -5      embperl/test/html/if.htm
  
  Index: if.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/if.htm,v
  retrieving revision 1.3.2.2
  retrieving revision 1.3.2.3
  diff -u -r1.3.2.2 -r1.3.2.3
  --- if.htm    2000/06/13 04:52:14     1.3.2.2
  +++ if.htm    2000/06/13 07:59:05     1.3.2.3
  @@ -314,7 +314,7 @@
   <endif> 
   
   
  -##]
  +
   
   <TABLE WIDTH="530" BORDER="0">
    <TR>
  @@ -324,7 +324,7 @@
      [$ else $]
        <A HREF="/">
      [$ endif $]
  -  <IMG SRC="[$ if (($server_type eq "iii.co.uk")) $]/i/www.[+ $server_type +]/[+ 
$badge || "iiilogo_narrow" +].gif[$ else $]/icons/[+ $badge || "iiilogo_narrow" 
+].gif[$ endif $]"
  +  <IMG SRC="[$ if (($server_type eq "iii.co.uk")) $]/i/www.[+ $server_type +]/[+ 
$badge || "iiilogo_narrow" +].gif[$ else $]/icons/[+ $badge || "iiilogo_narrow" 
+].gif[$ endif $]">
     WIDTH="[+ $icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0" 
      [$ if ($badge eq "iit") $]
        ALT="iit logo"
  @@ -341,12 +341,12 @@
   </TR>
   </TABLE>
   
  -
  +##]
   <IMG 
   [$ if (($server_type eq "iii.co.uk")) $]
  -     SRC="/i/www.[+ $server_type +]/[+ $badge || "iiilogo_narrow" +].gif" WIDTH="[+ 
$icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
  +     SRC="/i/www.[+ $server_type +]/[+ $badge || "iiilogo_narrow_if" +].gif" 
WIDTH="[+ $icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
   [$ else $]
  -     SRC="/icons/[+ $badge || "iiilogo_narrow" +].gif" WIDTH="[+ $icon_width +]" 
HEIGHT="[+ $icon_height +]" BORDER="0" 
  +     SRC="/icons/[+ $badge || "iiilogo_narrow_else" +].gif" WIDTH="[+ $icon_width 
+]" HEIGHT="[+ $icon_height +]" BORDER="0" 
   [$ endif $]
   [$ if ($badge eq "iit") $]
        ALT="iit logo"
  
  
  

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

Reply via email to