From: Grzegorz J. <ja...@ac...> - 2004-08-11 15:32:29
|
-------- Original Message -------- Subject: Re: [Opencxx-users] parser/PtreeBrace.cc Date: Wed, 11 Aug 2004 23:10:03 +0800 From: Grzegorz Jakacki <ja...@ac...> To: Gilles J. Seguin <se...@in...> References: <109...@se...> Gilles J. Seguin wrote: > Grzegorz, > > Can you verify this. > function is call second() but return the third element > of the list. > get_body() would have being a better name. Hi, I am not sure if I understand. PtreeUtil::Second(), as it stands both in HEAD and rel_2_8, returns second element of the list (or NULL if it does not exist). After applying the patch from your e-mail (shown below), it will indeed return third element. This is a patch against what? BR Grzegorz > > Since the result from qmtest are hardcoded, > $ qmtest -o myresults.qmr run # little 'o' > on future test do > $ qmtest -O myresults.qmr run # uppercase 'O' Where is the version with qmtest? BR Grzegorz > > diff -u -r1.2.2.1 PtreeBrace.cc > --- PtreeBrace.cc 8 Jul 2004 11:57:13 -0000 1.2.2.1 > +++ PtreeBrace.cc 10 Aug 2004 13:13:03 -0000 > @@ -59,10 +59,10 @@ > Ptree* Second(Ptree* p) > { > if (p) { > - p=p->Cdr(); > - if (p) { > + //p=p->Cdr(); > + //if (p) { > return p->Cdr(); > - } > + //} > } > return p; > } > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users |
From: <se...@in...> - 2004-08-12 07:24:19
|
On Wed, 2004-08-11 at 11:27, Grzegorz Jakacki wrote: > Gilles J. Seguin wrote: > > Grzegorz, > > > > Can you verify this. > > function is call second() but return the third element > > of the list. in opencxx/parser/PtreeBrace.cc on line 59, we have Ptree* Second(Ptree* p) This function return the third element in fact I do not care which element number it is, a want the element containing "body" The impact is huge because "body" is also in rule namespace identifier '{' body '}' > I am not sure if I understand. PtreeUtil::Second(), as it stands Why are you talking about PtreeUtil.cc file, Grzegorz, the change is in opencxx/parser/PtreeBrace.cc > both in HEAD and rel_2_8, The patch says against version 1.2.2.1 which is branch rel_2_8 > returns second element of the list (or > NULL if it does not exist). After applying the patch from your > e-mail (shown below), it will indeed return third element. > This is a patch against what? against CVS $ cd opencxx/parser $ cvs diff -u PtreeBrace.cc > BR > Grzegorz > > > > > Since the result from qmtest are hardcoded, > > $ qmtest -o myresults.qmr run # lowercase 'o' > > on future test do > > $ qmtest -O myresults.qmr run # uppercase 'O' > > Where is the version with qmtest? the link to the file is <http://www.infonet.ca/segg/occ.tgz> Since the patch modify the ouput of "occ", nearly all tests fail. Previous commands allow to generated valid new output to retest against. > > diff -u -r1.2.2.1 PtreeBrace.cc > > --- PtreeBrace.cc 8 Jul 2004 11:57:13 -0000 1.2.2.1 > > +++ PtreeBrace.cc 10 Aug 2004 13:13:03 -0000 > > @@ -59,10 +59,10 @@ > > Ptree* Second(Ptree* p) > > { > > if (p) { > > - p=p->Cdr(); > > - if (p) { > > + //p=p->Cdr(); > > + //if (p) { > > return p->Cdr(); > > - } > > + //} > > } > > return p; > > } |
From: Grzegorz J. <ja...@ac...> - 2004-08-12 14:31:24
|
Gilles J. Seguin wrote: > On Wed, 2004-08-11 at 11:27, Grzegorz Jakacki wrote: > >>Gilles J. Seguin wrote: >> >>>Grzegorz, >>> >>>Can you verify this. >>>function is call second() but return the third element >>>of the list. > > > in opencxx/parser/PtreeBrace.cc > on line 59, we have > Ptree* Second(Ptree* p) > This function return the third element > in fact I do not care which element number it is, > a want the element containing "body" > > The impact is huge because "body" is also in rule > namespace identifier '{' body '}' > > >>I am not sure if I understand. PtreeUtil::Second(), as it stands > > > Why are you talking about PtreeUtil.cc file, > Grzegorz, the change is in opencxx/parser/PtreeBrace.cc Sorry! Please disregard what I wrote in the previous e-mail. The function Opencxx::Detail::Second() declared and defined in opencxx/parser/PtreeBrace.cc returns the list with two initial elements stripped (or NULL if original list is too short), e.g. for NonLeaf / \ A NonLeaf / \ D E it will return E. After your patch it will return NonLeaf / \ D E Observe, that this function is used *only* in PtreeBrace::Print(). Moreover, it is not part of any interface. If current implementation is buggy, please go ahead and fix. You don't have to worry about other clients of this function, because they don't exist. Moreover, as this function is local to opencxx/parser/PtreeBrace.cc, changing its name does not have any impact on external clients. In such situations feel free to rename (the only request is that you stick to the naming convention of the neighbouring code, e.g. 'GetBody', not 'get_body'). Again sorry for the confusion I caused by my previous e-mail. BR Grzegorz > > >>both in HEAD and rel_2_8, > > > The patch says against version 1.2.2.1 > which is branch rel_2_8 > > >> returns second element of the list (or >>NULL if it does not exist). After applying the patch from your >>e-mail (shown below), it will indeed return third element. >>This is a patch against what? > > > against CVS > $ cd opencxx/parser > $ cvs diff -u PtreeBrace.cc > > >>BR >>Grzegorz >> >> >>>Since the result from qmtest are hardcoded, >>>$ qmtest -o myresults.qmr run # lowercase 'o' >>>on future test do >>>$ qmtest -O myresults.qmr run # uppercase 'O' >> >>Where is the version with qmtest? > > > the link to the file is <http://www.infonet.ca/segg/occ.tgz> > Since the patch modify the ouput of "occ", > nearly all tests fail. > Previous commands allow to generated valid new output to retest against. > > >>>diff -u -r1.2.2.1 PtreeBrace.cc >>>--- PtreeBrace.cc 8 Jul 2004 11:57:13 -0000 1.2.2.1 >>>+++ PtreeBrace.cc 10 Aug 2004 13:13:03 -0000 >>>@@ -59,10 +59,10 @@ >>> Ptree* Second(Ptree* p) >>> { >>> if (p) { >>>- p=p->Cdr(); >>>- if (p) { >>>+ //p=p->Cdr(); >>>+ //if (p) { >>> return p->Cdr(); >>>- } >>>+ //} >>> } >>> return p; >>> } > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users |