richter 00/06/13 14:14:02
Modified: . Tag: Embperl2 MANIFEST embperl.h epcomp.c epdom.c
epdom.h epmain.c epparse.c test.pl
Embperl Tag: Embperl2 Syntax.pm
test/cmp Tag: Embperl2 error.htm if.htm loop.htm
test/html Tag: Embperl2 error.htm if.htm
Added: test/cmp Tag: Embperl2 errormismatch.htm
test/html Tag: Embperl2 errormismatch.htm
Log:
EMbperl 2 - more nesting problems...
Revision Changes Path
No revision
No revision
1.41.2.2 +2 -0 embperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/embperl/MANIFEST,v
retrieving revision 1.41.2.1
retrieving revision 1.41.2.2
diff -u -r1.41.2.1 -r1.41.2.2
--- MANIFEST 2000/06/07 04:10:38 1.41.2.1
+++ MANIFEST 2000/06/13 21:13:33 1.41.2.2
@@ -67,6 +67,7 @@
test/html/plain.htm
test/html/plainblock.htm
test/html/error.htm
+test/html/errormismatch.htm
test/html/unclosed.htm
test/html/notallow.xhtm
test/html/noerr/noerrpage.htm
@@ -152,6 +153,7 @@
test/cmp/plain.htm
test/cmp/plainblock.htm
test/cmp/error.htm
+test/cmp/errormismatch.htm
test/cmp/unclosed.htm
test/cmp/noerrpage.htm
test/cmp/escape.htm
1.17.2.4 +2 -1 embperl/embperl.h
Index: embperl.h
===================================================================
RCS file: /home/cvs/embperl/embperl.h,v
retrieving revision 1.17.2.3
retrieving revision 1.17.2.4
diff -u -r1.17.2.3 -r1.17.2.4
--- embperl.h 2000/05/08 18:16:27 1.17.2.3
+++ embperl.h 2000/06/13 21:13:36 1.17.2.4
@@ -68,7 +68,8 @@
rcUnclosedHtml,
rcUnclosedCmd,
rcNotAllowed,
- rcNotHashRef
+ rcNotHashRef,
+ rcTagMismatch
} ;
1.1.2.32 +0 -17 embperl/Attic/epcomp.c
Index: epcomp.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcomp.c,v
retrieving revision 1.1.2.31
retrieving revision 1.1.2.32
diff -u -r1.1.2.31 -r1.1.2.32
--- epcomp.c 2000/06/13 14:30:48 1.1.2.31
+++ epcomp.c 2000/06/13 21:13:36 1.1.2.32
@@ -780,23 +780,6 @@
}
- if (pCmd && (pCmd -> bRemoveNode & 8) != 0)
- { /* calculate attributes after tag when tag should be ignored in output
stream */
- while (pAttr = Element_selfGetNthAttribut (pDomTree, pNode, nAttr++))
- {
- if (pAttr -> bFlags & aflgAttrChilds)
- {
- tNodeData * pChild = Node_selfFirstChild (pDomTree, (tNodeData
*)pAttr) ;
-
- while (pChild)
- {
- embperl_CompileNode (pDomTree, pChild -> xNdx,
bCheckpointPending) ;
- pChild = Node_selfNextSibling (pDomTree, pChild) ;
- }
- }
-
- }
- }
if (pCmd == NULL || pCmd -> bCompileChilds)
{
1.1.2.35 +89 -13 embperl/Attic/epdom.c
Index: epdom.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epdom.c,v
retrieving revision 1.1.2.34
retrieving revision 1.1.2.35
diff -u -r1.1.2.34 -r1.1.2.35
--- epdom.c 2000/06/13 14:30:49 1.1.2.34
+++ epdom.c 2000/06/13 21:13:37 1.1.2.35
@@ -728,6 +728,9 @@
tNodeData * pNew ;
tNode xNdx ;
+ if (pPad -> xLast && pPad -> xFirst == pPad -> xNdx)
+ pPad = NodePad_self (pDomTree, pPad -> xLast) ;
+
if (pPad -> nFill + sizeof (struct tNodeData) > pPad -> nMax)
{ /* pad full -> make room */
struct tNodePad * pNext = NewPad (pDomTree, pPad -> xParent, 0) ;
@@ -785,15 +788,28 @@
int nOffset ;
- pNext -> xPrev = pPad -> xNdx ;
- pNext -> xNext = pPad -> xNext ;
- pNext -> xFirst = pPad -> xFirst ;
-
- pFirst = NodePad_self (pDomTree, pPad -> xFirst) ;
- if (pFirst -> xLast == pPad -> xNdx || pFirst -> xLast == 0)
- pFirst -> xLast = pNext -> xNdx ;
+ if (pPad -> numChilds == 1)
+ {
+ pNext -> xPrev = pPad -> xPrev ;
+ pNext -> xNext = pPad -> xNext ;
+ pNext -> xFirst = pPad -> xFirst ;
+ pNext -> xLast = pPad -> xLast ;
+ pNext -> xNdx = pPad -> xNdx ;
+ ArraySetSize (&pDomTree -> pLookup, ArrayGetSize (pDomTree -> pLookup) - 1) ;
+ pDomTree -> pLookup[pNext -> xNdx] = pNext ;
+ }
+ else
+ {
+ pNext -> xPrev = pPad -> xNdx ;
+ pNext -> xNext = pPad -> xNext ;
+ pNext -> xFirst = pPad -> xFirst ;
+
+ pFirst = NodePad_self (pDomTree, pPad -> xFirst) ;
+ if (pFirst -> xLast == pPad -> xNdx || pFirst -> xLast == 0)
+ pFirst -> xLast = pNext -> xNdx ;
- pPad -> xNext = pNext -> xNdx ;
+ pPad -> xNext = pNext -> xNdx ;
+ }
nCopySize = pPad -> nFill - pNewFirstNode -> nPadOffset ;
memcpy (pNewNode, pNewFirstNode, nCopySize) ;
@@ -802,14 +818,30 @@
while (pNewNode)
{
+ int n = pNewNode -> numAttr ;
+ tAttrData * pAttr = Node_selfFirstAttr(pNewNode) ;
+
+ while (n--)
+ {
+ pDomTree -> pLookup[pAttr -> xNdx] = pAttr ;
+ pAttr++ ;
+ }
+
pNewNode -> nPadOffset = ((tUInt8 *)pNewNode) - ((tUInt8 *)pNext) ;
pDomTree -> pLookup[pNewNode -> xNdx] = pNewNode ;
+ pPad -> numChilds-- ;
+ pNext -> numChilds++ ;
nOffset = sizeof (struct tNodeData) + sizeof (struct tAttrData) * pNewNode ->
numAttr ;
if (pNext -> nFill <= pNewNode -> nPadOffset + nOffset)
break ;
pNewNode = (struct tNodeData *)(((tUInt8 *)pNewNode) + nOffset) ;
}
+ if (pPad -> numChilds == 1)
+ {
+ free (pPad) ;
+ }
+
return pNext ;
}
@@ -897,7 +929,7 @@
}
pNew = ((tAttrData *)(pParent + 1)) + pParent -> numAttr - 1 ;
- if (pParent -> numAttr == 0 || pNew -> xName != xNoName)
+ if (pParent -> numAttr == 0 || pNew -> xName != xNoName || bForceAttrValue
> 1)
{
if (!(xParent = Node_appendChild (pDomTree, ntypAttr, 0, NULL,
xNoName, xParent, nLevel, nLinenumber)))
return 0 ;
@@ -908,6 +940,7 @@
{
xParent = pNew -> xNdx ;
bAddChild = 1 ;
+ nLevel++ ;
}
}
@@ -966,9 +999,6 @@
else
{
pChilds = NodePad_self (pDomTree, pParent -> xChilds) ;
- if (pChilds -> xLast)
- pChilds = NodePad_self (pDomTree, pChilds -> xLast) ;
-
}
pNew = NodePad_appendChild (pDomTree, &pChilds, nType, String2Ndx (sText,
nTextLen), nLinenumber) ;
@@ -1352,6 +1382,52 @@
return pChildNode ;
}
+/* ------------------------------------------------------------------------ */
+/* */
+/* Node_selfLastChild */
+/* */
+/* Get last child node */
+/* */
+/* ------------------------------------------------------------------------ */
+
+
+tNodeData * Node_selfLastChild (/*in*/ tDomTree * pDomTree,
+ /*in*/ tNodeData * pNode)
+
+ {
+ struct tNodePad * pPad = NodePad_self (pDomTree, pNode -> xChilds) ;
+ tNodeData * pChildNode ;
+ tNodeData * pLastChild ;
+ if (pPad == NULL)
+ return NULL ;
+
+ if (pPad -> xLast && pPad -> xLast != pPad -> xNdx)
+ pPad = NodePad_self (pDomTree, pPad -> xLast) ;
+
+ pLastChild = NULL ;
+ do
+ {
+ pChildNode = ((tNodeData *)(pPad + 1)) ;
+
+ while (pChildNode)
+ {
+ pLastChild = pChildNode ;
+ pChildNode = Node_selfNextSibling (pDomTree, pChildNode) ;
+ }
+
+ if (!pLastChild)
+ {
+ if (pPad -> xPrev)
+ pPad = NodePad_self (pDomTree, pPad -> xPrev) ;
+ else
+ return NULL ;
+ }
+ }
+ while (!pLastChild) ;
+
+ return pLastChild ;
+ }
+
/* ------------------------------------------------------------------------ */
/* */
@@ -1414,7 +1490,7 @@
do
{
int nOffset = sizeof (struct tNodeData) + sizeof (struct tAttrData) * pNode ->
numAttr ;
- if (pPad -> nFill <= pNode -> nPadOffset + nOffset)
+ if (pPad -> nFill <= pNode -> nPadOffset + nOffset || pPad -> numChilds == 0)
{ /* next pad */
if (!pPad -> xNext)
return 0 ;
1.1.2.26 +3 -1 embperl/Attic/epdom.h
Index: epdom.h
===================================================================
RCS file: /home/cvs/embperl/Attic/epdom.h,v
retrieving revision 1.1.2.25
retrieving revision 1.1.2.26
diff -u -r1.1.2.25 -r1.1.2.26
--- epdom.h 2000/06/13 14:30:50 1.1.2.25
+++ epdom.h 2000/06/13 21:13:37 1.1.2.26
@@ -257,6 +257,8 @@
/*in*/ struct tNodeData * pNode,
/*in*/ int nChildNo) ;
+tNodeData * Node_selfLastChild (/*in*/ tDomTree * pDomTree,
+ /*in*/ tNodeData * pNode) ;
tNodeData * Node_selfNextSibling (/*in*/ tDomTree * pDomTree,
/*in*/ tNodeData * pNode) ;
@@ -274,7 +276,7 @@
#define Node_selfNodeName(pNode) (Ndx2String (pNode -> nText))
#define Node_nodeName(pDomTree,pNode) (Ndx2String (Node_self
(pDomTree,xNode) -> nText))
#define Node_selfPad(pNode) ((struct tNodePad * )(((tUInt8 *)pNode) - pNode
-> nPadOffset))
-#define Node_selfFirstAttr(pNodePad) ((tAttrData *)(pNode + 1))
+#define Node_selfFirstAttr(pNode) ((tAttrData *)(pNode + 1))
tNodeData * Node_selfCloneNode (/*in*/ tDomTree * pDomTree,
/*in*/ tNodeData * pNode,
1.65.2.12 +1 -0 embperl/epmain.c
Index: epmain.c
===================================================================
RCS file: /home/cvs/embperl/epmain.c,v
retrieving revision 1.65.2.11
retrieving revision 1.65.2.12
diff -u -r1.65.2.11 -r1.65.2.12
--- epmain.c 2000/06/07 03:27:11 1.65.2.11
+++ epmain.c 2000/06/13 21:13:37 1.65.2.12
@@ -134,6 +134,7 @@
case rcUnclosedCmd: msg ="[%d]ERR: %d: Line %d: Unclosed
command [$ %s $] at end of file %s" ; break ;
case rcNotAllowed: msg ="[%d]ERR: %d: Line %d: Forbidden %s:
Does not match EMBPERL_ALLOW %s" ; break ;
case rcNotHashRef: msg ="[%d]ERR: %d: Line %d: %s need
hashref in %s" ; break ;
+ case rcTagMismatch: msg ="[%d]ERR: %d: Line %d: Endtag '%s'
doesn't match starttag '%s'" ; break ;
default: msg ="[%d]ERR: %d: Line %d: Error %s%s" ;
break ;
}
1.1.2.24 +37 -4 embperl/Attic/epparse.c
Index: epparse.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epparse.c,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -u -r1.1.2.23 -r1.1.2.24
--- epparse.c 2000/06/13 07:59:04 1.1.2.23
+++ epparse.c 2000/06/13 21:13:38 1.1.2.24
@@ -33,6 +33,7 @@
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 */
+ struct tToken * pStartTag ; /* token that contains definition for
the start of the current token */
struct tToken * pEndTag ; /* token that contains definition for
the end of the current token */
} ;
@@ -300,7 +301,8 @@
p -> nNodeType = GetHashValueInt (pHash, "nodetype", ntypTag) ;
p -> bUnescape = GetHashValueInt (pHash, "unescape", 0) ;
p -> nCDataType = GetHashValueInt (pHash, "cdatatype", -1) ;
- p -> nForceType = GetHashValueInt (pHash, "forcetype", -1) ;
+ p -> nForceType = GetHashValueInt (pHash, "forcetype", 0) ;
+ p -> pStartTag = (struct tToken *)GetHashValueStrDup (pHash, "starttag",
NULL) ;
p -> pEndTag = (struct tToken *)GetHashValueStrDup (pHash, "endtag",
NULL) ;
if (sContains = GetHashValueStrDup (pHash, "contains", NULL))
{
@@ -382,6 +384,25 @@
}
}
+ if (pTable[i].pStartTag)
+ {
+ char * s = (char *)pTable[i].pStartTag ;
+ int j ;
+
+ pTable[i].pStartTag = NULL ;
+ for (j = 0; j < n; j++)
+ {
+ if (strcmp (pTable[j].sName, s) == 0)
+ pTable[i].pStartTag = &pTable[j] ;
+ }
+ if (pTable[i].pStartTag == NULL)
+ {
+ strncpy (r -> errdat1, "BuildTokenHash", sizeof (r -> errdat1)) ;
+ sprintf (r -> errdat2, " StartTag %s for %s not found",
pTable[i].sText, s) ;
+ return rcNotFound ;
+ }
+
+ }
}
@@ -543,6 +564,7 @@
if (pToken -> nNodeType == ntypEndTag && level > 0)
{ /* end token found */
+ tNodeData * pStartTag ;
char * pEndCurr = strstr (pCurr, pToken -> sEndText) ;
if (pEndCurr)
{
@@ -563,6 +585,14 @@
}
level-- ;
xParentNode = Node_parentNode (pDomTree, xParentNode) ;
+ pStartTag = Node_selfLastChild (pDomTree, Node_self (pDomTree,
xParentNode)) ;
+ if (pToken -> pStartTag == NULL || pStartTag -> nText != pToken ->
pStartTag -> nNodeName)
+ {
+ strncpy (r -> errdat2, Ndx2String (pStartTag -> nText), sizeof
(r -> errdat2)) ;
+ strncpy (r -> errdat1, Ndx2String (pToken -> nNodeName),
sizeof (r -> errdat1)) ;
+ r -> Buf.pCurrPos = pCurrTokenStart ;
+ return rcTagMismatch ;
+ }
}
else
{
@@ -572,12 +602,15 @@
level-- ;
}
/* add token as node */
- if (!(xNewNode = Node_appendChild (pDomTree, pToken ->
nNodeType, (nCDataType == ntypAttrValue && pToken -> nNodeType != ntypAttr),
pNodeName, strlen (pNodeName), xParentNode, level, GetLineNoOf (r, pCurrTokenStart))))
+ if (!(xNewNode = Node_appendChild (pDomTree, pToken ->
nNodeType, (nCDataType == ntypAttrValue && pToken -> nNodeType != ntypAttr)?(pToken ->
nForceType?2:1):0, pNodeName, strlen (pNodeName), xParentNode, level, GetLineNoOf (r,
pCurrTokenStart))))
+ {
+ r -> Buf.pCurrPos = pCurrTokenStart ;
+
return rc ;
-
+ }
if (pInside = pToken -> pInside)
{ /* parse for further tokens inside of this token */
- ParseTokens (r, &pCurr, pEnd, pInside, pToken -> sEndText,
pToken -> pContains, pToken -> nCDataType == -1?ntypAttrValue:pToken -> nCDataType,
pToken -> nForceType == -1?0:pToken -> nForceType, pToken -> bUnescape, pNodeName,
xNewNode, level+1) ;
+ ParseTokens (r, &pCurr, pEnd, pInside, pToken -> sEndText,
pToken -> pContains, pToken -> nCDataType == -1?ntypAttrValue:pToken -> nCDataType, 0,
pToken -> bUnescape, pNodeName, xNewNode, level+1) ;
}
else
{ /* nothing more inside of this token allowed, so search for
the end of the token */
1.57.2.23 +6 -5 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.57.2.22
retrieving revision 1.57.2.23
diff -u -r1.57.2.22 -r1.57.2.23
--- test.pl 2000/06/13 04:52:12 1.57.2.22
+++ test.pl 2000/06/13 21:13:38 1.57.2.23
@@ -5,7 +5,7 @@
@tests = (
'ascii',
-# 'tmp/header.htm',
+ 'tmp/header.htm',
'pure.htm',
## 'plainlong.htm',
## 'plainlong.htm',
@@ -16,9 +16,10 @@
'plain.htm',
'plainblock.htm',
'plainblock.htm',
- 'error.htm???8',
- 'error.htm???8',
- 'error.htm???8',
+ 'error.htm???7',
+ 'error.htm???7',
+ 'error.htm???7',
+ 'errormismatch.htm???1',
## 'unclosed.htm???1',
# 'errorright.htm???1',
'notfound.htm???1',
@@ -689,7 +690,7 @@
next if ($file eq 'upload.htm') ;
next if ($file =~ /^exit.htm/) ;
next if ($file =~ /registry/) ;
- next if ($file =~ /match/) ;
+ next if ($file =~ /match\//) ;
next if ($file =~ /sess\.htm/) ;
next if ($file =~ /EmbperlObject/) ;
next if ($DProf && ($file =~ /safe/)) ;
No revision
No revision
1.1.2.25 +67 -38 embperl/Embperl/Attic/Syntax.pm
Index: Syntax.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Attic/Syntax.pm,v
retrieving revision 1.1.2.24
retrieving revision 1.1.2.25
diff -u -r1.1.2.24 -r1.1.2.25
--- Syntax.pm 2000/06/13 14:31:01 1.1.2.24
+++ Syntax.pm 2000/06/13 21:13:48 1.1.2.25
@@ -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.24 2000/06/13 14:31:01 richter Exp $
+# $Id: Syntax.pm,v 1.1.2.25 2000/06/13 21:13:48 richter Exp $
#
###################################################################################
@@ -196,6 +196,7 @@
'Embperl comment' => {
'text' => '[#',
'end' => '#]',
+# 'inside' => \%MetaComment,
'procinfo' => {
embperl => {
compilechilds => 0,
@@ -205,11 +206,17 @@
},
) ;
-
+%MetaComment = (
+ '-lsearch' => 1,
+ 'Embperl comment' => {
+ 'text' => '[#',
+ 'end' => '#]',
+ 'inside' => \%MetaComment
+ },
+) ;
%HtmlTagsStd = (
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
'inside' => \%Cmds,
) ;
@@ -231,7 +238,6 @@
%HtmlTags = (
'input' => {
'text' => 'input',
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
'inside' =>
{
@@ -255,7 +261,6 @@
'textarea' => {
'text' => 'textarea',
'nodetype' => ntypStartTag,
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
'inside' =>
{
@@ -273,9 +278,10 @@
},
},
'/textarea' => {
- 'text' => '/textarea',
- 'nodetype' => ntypEndTag,
- 'cdatatype' => 0,
+ 'text' => '/textarea',
+ 'nodetype' => ntypEndTag,
+ 'cdatatype' => 0,
+ 'starttag' => 'textarea',
},
'tr' => {
'text' => 'tr',
@@ -296,6 +302,7 @@
'text' => '/tr',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'tr',
},
'table' => {
'text' => 'table',
@@ -307,18 +314,8 @@
'text' => '/table',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'table',
},
- 'table' => {
- 'text' => 'table',
- 'nodetype' => ntypStartTag,
- %HtmlTagsStd,
- 'procinfo' => \%ProcInfoTable,
- },
- '/table' => {
- 'text' => '/table',
- 'nodetype' => ntypEndTag,
- 'cdatatype' => 0,
- },
'ol' => {
'text' => 'ol',
'nodetype' => ntypStartTag,
@@ -329,6 +326,7 @@
'text' => '/ol',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'ol',
},
'ul' => {
'text' => 'ul',
@@ -340,6 +338,7 @@
'text' => '/ul',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'ul',
},
'dl' => {
'text' => 'dl',
@@ -351,6 +350,7 @@
'text' => '/dl',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'dl',
},
'menu' => {
'text' => 'menu',
@@ -362,6 +362,7 @@
'text' => '/menu',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'menu',
},
'dir' => {
'text' => 'dir',
@@ -373,6 +374,7 @@
'text' => '/dir',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'dir',
},
# 'th' => {
# 'text' => 'th',
@@ -383,6 +385,7 @@
# 'text' => '/th',
# 'nodetype' => ntypEndTag,
# 'cdatatype' => 0,
+# 'starttag' => 'th',
# },
'select' => {
'text' => 'select',
@@ -430,11 +433,13 @@
'text' => '/option',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'option',
},
'/select' => {
'text' => '/select',
'nodetype' => ntypEndTag,
'cdatatype' => 0,
+ 'starttag' => 'select',
},
'body' => {
'text' => 'body',
@@ -442,43 +447,36 @@
},
'a' => {
'text' => 'a',
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
'inside' => \%HrefLink,
},
'frame' => {
'text' => 'frame',
'inside' => \%SrcLink,
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
},
'iframe' => {
'text' => 'iframe',
'inside' => \%SrcLink,
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
},
'embed' => {
'text' => 'embed',
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
'inside' => \%SrcLink,
},
'layer' => {
'text' => 'layer',
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
'inside' => \%SrcLink,
},
'img' => {
'text' => 'img',
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
'inside' => \%SrcLink,
},
'form' => {
'text' => 'form',
- 'forcetype' => ntypAttrValue,
'cdatatype' => ntypAttrValue,
'inside' => \%ActionLink,
},
@@ -490,6 +488,7 @@
'if' => {
'text' => 'if',
'nodetype' => ntypTag,
+ 'forcetype' => 1,
'cdatatype' => ntypAttrValue,
'unescape' => 1,
'endtag' => 'endif',
@@ -504,6 +503,7 @@
'else' => {
'text' => 'else',
'nodetype' => ntypTag,
+ 'forcetype' => 1,
'unescape' => 1,
'endtag' => 'endif',
'procinfo' => {
@@ -517,6 +517,8 @@
'endif' => {
'text' => 'endif',
'nodetype' => ntypTag,
+ 'forcetype' => 1,
+ 'cdatatype' => 0,
'procinfo' => {
embperl => {
perlcode => '}',
@@ -527,14 +529,14 @@
},
'elsif' => {
'text' => 'elsif',
- 'nodetype' => ntypEndStartTag,
+ 'nodetype' => ntypTag,
+ 'forcetype' => 1,
'cdatatype' => ntypAttrValue,
'unescape' => 1,
'endtag' => 'endif',
'procinfo' => {
embperl => {
- perlcode => 'elsif (%&<noname>%) { ',
- perlcodeend => '}',
+ perlcode => '} elsif (%&<noname>%) { ',
removenode => 10,
mayjump => 1,
}
@@ -542,14 +544,14 @@
},
'while' => {
'text' => 'while',
- 'nodetype' => ntypStartTag,
+ 'nodetype' => ntypTag,
'cdatatype' => ntypAttrValue,
+ 'forcetype' => 1,
'unescape' => 1,
'endtag' => 'endwhile',
'procinfo' => {
embperl => {
perlcode => 'while (%&<noname>%) { ',
- perlcodeend => '}',
removenode => 10,
mayjump => 1,
}
@@ -557,18 +559,27 @@
},
'endwhile' => {
'text' => 'endwhile',
- 'nodetype' => ntypEndTag,
+ 'nodetype' => ntypTag,
+ 'forcetype' => 1,
+ 'cdatatype' => 0,
+ 'procinfo' => {
+ embperl => {
+ perlcode => '};',
+ removenode => 10,
+ mayjump => 1,
+ }
+ },
},
'foreach' => {
'text' => 'foreach',
- 'nodetype' => ntypStartTag,
+ 'nodetype' => ntypTag,
'cdatatype' => ntypAttrValue,
+ 'forcetype' => 1,
'unescape' => 1,
'endtag' => 'endforeach',
'procinfo' => {
embperl => {
perlcode => 'foreach %&<noname>% { ',
- perlcodeend => '}',
removenode => 10,
mayjump => 1,
}
@@ -576,17 +587,27 @@
},
'endforeach' => {
'text' => 'endforeach',
- 'nodetype' => ntypEndTag,
+ 'nodetype' => ntypTag,
+ 'forcetype' => 1,
+ 'cdatatype' => 0,
+ 'procinfo' => {
+ embperl => {
+ perlcode => '};',
+ removenode => 10,
+ mayjump => 1,
+ }
+ },
},
'do' => {
'text' => 'do',
- 'nodetype' => ntypStartTag,
+ 'nodetype' => ntypTag,
+ 'cdatatype' => 0,
+ 'forcetype' => 1,
'unescape' => 1,
'endtag' => 'until',
'procinfo' => {
embperl => {
perlcode => 'do { ',
- perlcodeend => '} until (%&<noname>%) ; ',
removenode => 10,
mayjump => 1,
}
@@ -594,9 +615,17 @@
},
'until' => {
'text' => 'until',
- 'nodetype' => ntypEndTag,
+ 'nodetype' => ntypTag,
+ 'forcetype' => 1,
'cdatatype' => ntypAttrValue,
'unescape' => 1,
+ 'procinfo' => {
+ embperl => {
+ perlcode => '} until (%&<noname>%) ; ',
+ removenode => 10,
+ mayjump => 1,
+ }
+ },
},
'var' => {
'text' => 'var',
No revision
No revision
1.5.2.6 +2 -4 embperl/test/cmp/error.htm
Index: error.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/error.htm,v
retrieving revision 1.5.2.5
retrieving revision 1.5.2.6
diff -u -r1.5.2.5 -r1.5.2.6
--- error.htm 2000/06/06 14:39:21 1.5.2.5
+++ error.htm 2000/06/13 21:13:52 1.5.2.6
@@ -9,11 +9,9 @@
^\[.*?\]ERR: 24: Line \d+: Error in Perl code: syntax error at .*?error.htm line
\d+, at EOF
^<br> syntax error at .*?error.htm line \d+, at EOF
^<br> syntax error at .*?error.htm line \d+, near
"\$error is here "
-^<br> syntax error at .*?error.htm line \d+, near "}
-^<br> _ep_cp"
^<br> syntax error at .*?error.htm line \d+, near "
-^<br>
-^<br> }"<p>
+^<br> }
+^<br> _ep_cp"
^\[.*?\]ERR: 24: Line \d+: Error in Perl code: <p>
^ HTML\:\:Embperl.*?<P>
</BODY></HTML>
1.4.2.3 +10 -64 embperl/test/cmp/if.htm
Index: if.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/if.htm,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -r1.4.2.2 -r1.4.2.3
--- if.htm 2000/05/31 06:21:51 1.4.2.2
+++ if.htm 2000/06/13 21:13:54 1.4.2.3
@@ -8,90 +8,36 @@
a1
a <br>
-
-
a2
a <br>
-
-
a3
a <br>
a4
a5
a <br>
b is null <br>
-
-
-
-
-a <br>
+ a <br>
b is null <br>
-
-
-
-
-a<br>
+ a<br>
b is null <br>
-
-
-
-
-a <br>
+ a <br>
b is null <br>
-
-
-
-
-a <br>
+ a <br>
b is null <br>
-
-
-
-
-a is not null <br>
+ a is not null <br>
b is null and c is 5 <br>
-
-
-
-
-a is not null <br>
+ a is not null <br>
b is null and c is 5 and d is 'txt' <br>
-
-
-
-
-
-a is not null <br>
+ a is not null <br>
b is null and c is 5 and d is 'txt' <br>
b is null and c is not 5, but d is 'txt' <br>
If we get to here it looks good with the tests <br>
-
-
-
-
-
-
-
-
-
-a is not null <br>
+ a is not null <br>
b is null and c is 5 and d is 'txt' <br>
b is null and c is not 5, but d is 'txt' <br>
If we get to here it looks good with the tests <br>
-
-
-
-
-
-
-
-
-ttrue = true
-
-
+ ttrue = true
tfalse = false
-
-
The following HTML tags schould be ignored by Embperl
<if 0>
@@ -105,7 +51,7 @@
<endif>
-
</body>
</html>
+
1.7.2.2 +20 -77 embperl/test/cmp/loop.htm
Index: loop.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/loop.htm,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -r1.7.2.1 -r1.7.2.2
--- loop.htm 2000/05/24 21:08:30 1.7.2.1
+++ loop.htm 2000/06/13 21:13:54 1.7.2.2
@@ -9,47 +9,29 @@
0
1
2
-
-
-erstes = Hallo Wert2 0
- <BR>
- zweites = Leer zeichen 0 1
- <BR>
- drittes = !"#*+ 0 1 2
- <BR>
-
-
-
-A = 1<br>
+erstes = Hallo Wert2 0 <BR>
+ zweites = Leer zeichen 0 1 <BR>
+ drittes = !"#*+ 0 1 2 <BR>
+ A = 1<br>
B = 2<br>
C = 3<br>
-
-
@a[0] = a<br>
@a[1] = b<br>
@a[2] = c<br>
@a[3] = d<br>
-
-
-@a[0] = a<br>
+ @a[0] = a<br>
@a[1] = b<br>
@a[2] = c<br>
@a[3] = d<br>
-
-
-a <br>
+ a <br>
b <br>
c <br>
d <br>
-
-
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
1 <br>
2 <br>
3 <br>
@@ -60,15 +42,11 @@
8 <br>
9 <br>
10 <br>
-
-
2:1 <br>
2:2 <br>
2:3 <br>
2:4 <br>
2:5 <br>
-
-
@a[0] = a<br>
A = 1<br>
1 <br>
@@ -76,114 +54,79 @@
5 <br>
7 <br>
9 <br>
-
-
- B = 2<br>
+ B = 2<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
- C = 3<br>
+ C = 3<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
-
- @a[1] = b<br>
+ @a[1] = b<br>
A = 1<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
- B = 2<br>
+ B = 2<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
- C = 3<br>
+ C = 3<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
-
- @a[2] = c<br>
+ @a[2] = c<br>
A = 1<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
- B = 2<br>
+ B = 2<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
- C = 3<br>
+ C = 3<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
-
- @a[3] = d<br>
+ @a[3] = d<br>
A = 1<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
- B = 2<br>
+ B = 2<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
- C = 3<br>
+ C = 3<br>
1 <br>
3 <br>
5 <br>
7 <br>
9 <br>
-
-
-
-
-
+ x
-x
+ y
-
-
-y
-
-
-
-
</body>
</html>
+
No revision
No revision
1.1.2.1 +8 -0 embperl/test/cmp/Attic/errormismatch.htm
No revision
No revision
1.1.2.1.2.1 +0 -4 embperl/test/html/error.htm
Index: error.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/error.htm,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- error.htm 1998/07/14 20:11:21 1.1.2.1
+++ error.htm 2000/06/13 21:13:57 1.1.2.1.2.1
@@ -52,10 +52,6 @@
[$endif$]
-Tag missmatch:
-
-<table>
-</tr>
<P>Ok.<P>
1.3.2.5 +54 -7 embperl/test/html/if.htm
Index: if.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/if.htm,v
retrieving revision 1.3.2.4
retrieving revision 1.3.2.5
diff -u -r1.3.2.4 -r1.3.2.5
--- if.htm 2000/06/13 14:31:09 1.3.2.4
+++ if.htm 2000/06/13 21:13:58 1.3.2.5
@@ -1,4 +1,4 @@
-[##
+
<html>
<head>
<title>IF Metacommand in Embperl</title>
@@ -34,7 +34,7 @@
[$ <br> else<br>$]
not a<br>
[$ <br>endif $]
-#][##
+#]
a5
[$ if $a$]
a <br>
@@ -314,8 +314,38 @@
<endif>
+[##
+<TABLE WIDTH="530" BORDER="0">
+ <TR>
+ <TD ALIGN="LEFT">
+ [$ if ($badge eq "iit") $]
+ <A HREF="/iit/">
+ [$ 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 $]"
+ WIDTH="[+ $icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
+ [$ if ($badge eq "iit") $]
+ ALT="iit logo"
+ [$ else $]
+ ALT="iii logo"
+ [$ endif $]
+ [$ if (($badge eq "iit") && ($badge ne $cookie_badge) && !$cookie_to) $]
+
onload="window.open('/iit/welcometoiit.epl','dis','status=no,scrollbars=no,resizable=yes,width=390,height=410,screenX=50,screenY=50,top=50,left=50');
return false"
+ [$ elsif (($badge eq "") && ($cookie_badge eq "iit") && !$cookie_from) $]
+
onload="window.open('/iit/leavingiit.epl','dis','status=no,scrollbars=no,resizable=yes,width=370,height=320,screenX=100,screenY=100,top=100,left=100');
return false"
+ [$ endif $] qqq >
+
+ </TD>
+</TR>
+</TABLE>
+[- $cookie_badge = "iit" ;
+ $server_type = "iii.co.uk" ;
+ $icon_width = 1 ;
+ $icon_height=2; -]
+
<TABLE WIDTH="530" BORDER="0">
<TR>
<TD ALIGN="LEFT">
@@ -324,7 +354,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 +371,14 @@
</TR>
</TABLE>
-##]
+
+[- $icon_width = 5 ; $icon_height=10; -]
+
<IMG
-[$ if (($server_type eq "iii.co.uk")) $]
-qqq SRC="/i/www.[+ $server_type +]/[+ $badge || "iiilogo_narrow_if" +].gif"
WIDTH="[+ $icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
+[$ if (($server_type eq "iii")) $]
+SRC="/i/www.[+ $server_type +]/[+ $badge || "iiilogo_narrow_if" +].gif" WIDTH="[+
$icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
[$ else $]
-www SRC="/icons/[+ $badge || "iiilogo_narrow_else" +].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"
@@ -355,7 +387,22 @@
[$ endif $]
>
+[- $icon_width = 6 ; $icon_height=11; $server_type="iii" ; $badge = "iit" -]
+<IMG
+[$ if (($server_type eq "iii")) $]
+SRC="/i/www.[+ $server_type +]/[+ $badge || "iiilogo_narrow_if" +].gif" WIDTH="[+
$icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
+[$ else $]
+SRC="/icons/[+ $badge || "iiilogo_narrow_else" +].gif" WIDTH="[+ $icon_width +]"
HEIGHT="[+ $icon_height +]" BORDER="0"
+[$ endif $]
+[$ if ($badge eq "iit") $]
+ ALT="iit logo"
+[$ else $]
+ ALT="iii logo"
+[$ endif $]
+qqq >
+
+##]
</body>
</html>
No revision
No revision
1.1.2.1 +19 -0 embperl/test/html/Attic/errormismatch.htm
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]