[Assorted-commits] SF.net SVN: assorted:[1310] clamp/trunk/src
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-03-19 18:02:29
|
Revision: 1310 http://assorted.svn.sourceforge.net/assorted/?rev=1310&view=rev Author: yangzhang Date: 2009-03-19 18:02:16 +0000 (Thu, 19 Mar 2009) Log Message: ----------- reformatted; tweaked Makefile Modified Paths: -------------- clamp/trunk/src/CodeGen.cc clamp/trunk/src/CodeGen.hh clamp/trunk/src/Makefile clamp/trunk/src/clamp.y clamp/trunk/src/clamp_support.cc clamp/trunk/src/clamp_support.hh clamp/trunk/src/clamplex.lex clamp/trunk/src/curry.clamp clamp/trunk/src/eg.clamp clamp/trunk/src/home_page_examples.clamp clamp/trunk/src/test.clamp Modified: clamp/trunk/src/CodeGen.cc =================================================================== --- clamp/trunk/src/CodeGen.cc 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/CodeGen.cc 2009-03-19 18:02:16 UTC (rev 1310) @@ -15,7 +15,7 @@ // // History // ======= -// 2002/ 2/11 rmg File creation +// 2002/ 2/11 rmg File creation // #include "CodeGen.hh" @@ -38,12 +38,12 @@ { if (pListp) { - return pListp->size(); + return pListp->size(); } else { - return 0; + return 0; } } @@ -51,35 +51,35 @@ { if (pListp) { - for (paramListT::const_iterator iter = pListp->begin() - ; iter != pListp->end() - ; ++iter) - { - if (iter->get()->initialiser.get()) - { - if (!first) - { - strm << ", "; - } + for (paramListT::const_iterator iter = pListp->begin() + ; iter != pListp->end() + ; ++iter) + { + if (iter->get()->initialiser.get()) + { + if (!first) + { + strm << ", "; + } - strm << *iter->get()->initialiser; + strm << *iter->get()->initialiser; - first = false; - } + first = false; + } - else if (iter->get()->type.get()) - { - if (!first) - { - strm << ", "; - } + else if (iter->get()->type.get()) + { + if (!first) + { + strm << ", "; + } // Default initialize - strm << "(" << *iter->get()->type << ")0"; + strm << "(" << *iter->get()->type << ")0"; - first = false; - } - } + first = false; + } + } } } @@ -87,22 +87,22 @@ { if (pListp) { - for (paramListT::const_iterator iter = pListp->begin() - ; iter != pListp->end() - ; ++iter) - { - if (iter->get()->type.get()) - { - if (!first) - { - strm << ", "; - } + for (paramListT::const_iterator iter = pListp->begin() + ; iter != pListp->end() + ; ++iter) + { + if (iter->get()->type.get()) + { + if (!first) + { + strm << ", "; + } - strm << *iter->get()->type; + strm << *iter->get()->type; - first = false; - } - } + first = false; + } + } } } } @@ -123,8 +123,8 @@ } CodeGen::LambdaContext::LambdaContext (FILE *f - , int b - , std::auto_ptr<lambdaT> lamp) + , int b + , std::auto_ptr<lambdaT> lamp) : mPrevFile (f) , mOpenBracePos (b) , mLamp (lamp.release()) @@ -151,14 +151,14 @@ { for (int count = start; count <= end; ++count) { - if (!first) - { - strm << ", "; - } + if (!first) + { + strm << ", "; + } - strm << "T" << count; + strm << "T" << count; - first = false; + first = false; } } @@ -168,9 +168,9 @@ if (ccount > 0) { - // Implementation via pointer to member function - implTemplateName (strm, ccount, pcount); - strm << "::"; + // Implementation via pointer to member function + implTemplateName (strm, ccount, pcount); + strm << "::"; } // else implementation via pointer to ordinary function @@ -240,7 +240,7 @@ { if (lam.onHeap) { - strm << "new "; + strm << "new "; } implInstance (strm, lam); @@ -252,20 +252,20 @@ } void typenameList (ostream &strm - , unsigned start - , unsigned end - , bool first = true) + , unsigned start + , unsigned end + , bool first = true) { for (unsigned count = start; count <= end; ++count) { - if (!first) - { - strm << ", "; - } + if (!first) + { + strm << ", "; + } - strm << "typename T" << count; + strm << "typename T" << count; - first = false; + first = false; } } @@ -295,41 +295,41 @@ for (unsigned count = 1; count <= ccount; ++count) { - strm << "\n T" << count + 1 << " mContext" << count << ";"; + strm << "\n T" << count + 1 << " mContext" << count << ";"; } strm << "\n\n typedef T1 result_type;"; for (unsigned count = 1; count <= ccount; ++count) { - strm - << "\n typedef T" << count + 1 - << " context_type_" << count - << ";"; + strm + << "\n typedef T" << count + 1 + << " context_type_" << count + << ";"; } for (unsigned count = 1; count <= pcount; ++count) { - strm - << "\n typedef T" << count + ccount + 1 - << " argument_type_" << count - << ";"; + strm + << "\n typedef T" << count + ccount + 1 + << " argument_type_" << count + << ";"; } // Additional typedefs in special cases for standard binder compatability if (pcount == 1) { - strm - << "\n typedef T" << ccount + 2 - << " argument_type;"; + strm + << "\n typedef T" << ccount + 2 + << " argument_type;"; } else if (pcount == 2) { - strm - << "\n typedef T" << ccount + 2 - << " first_argument_type;\n typedef T" << ccount + 3 - << " second_argument_type;"; + strm + << "\n typedef T" << ccount + 2 + << " first_argument_type;\n typedef T" << ccount + 3 + << " second_argument_type;"; } strm << "\n\n // Constructor\n "; @@ -342,14 +342,14 @@ for (unsigned count = 1; count <= ccount; ++count) { - strm << ", T" << count + 1 << " c" << count; + strm << ", T" << count + 1 << " c" << count; } strm << ")\n : mFn (fn)"; for (unsigned count = 1; count <= ccount; ++count) { - strm << "\n , mContext" << count << " (c" << count << ")"; + strm << "\n , mContext" << count << " (c" << count << ")"; } strm @@ -359,20 +359,20 @@ for (unsigned count = 1; count <= pcount; ++count) { - if (count != 1) - { - strm << ", "; - } + if (count != 1) + { + strm << ", "; + } - strm << "T" << count + ccount + 1 << " p" << count; + strm << "T" << count + ccount + 1 << " p" << count; } strm << ")\n {\n return ("; if (ccount > 0) { - // Have closure parameters - use pointer to member syntax - strm << "this->"; + // Have closure parameters - use pointer to member syntax + strm << "this->"; } // else static function @@ -380,27 +380,27 @@ for (unsigned count = 1; count <= pcount; ++count) { - if (count != 1) - { - strm << ", "; - } + if (count != 1) + { + strm << ", "; + } - strm << "p" << count; + strm << "p" << count; } strm << ");\n }\n"; } void declareMemberFn (ostream &strm - , int id - , unsigned ccount - , unsigned pcount) + , int id + , unsigned ccount + , unsigned pcount) { strm << "\n "; if (ccount == 0) { - strm << "static "; + strm << "static "; } strm << "T1 fn" << id << " ("; @@ -411,10 +411,10 @@ } void defineMemberFn (ostream &strm - , int id - , unsigned ccount - , unsigned pcount - , const lambdaT &lam) + , int id + , unsigned ccount + , unsigned pcount + , const lambdaT &lam) { implTemplateDecl (strm, ccount + pcount + 1); @@ -430,54 +430,54 @@ if (lam.params.get()) { - unsigned count = 1; + unsigned count = 1; - for (paramListT::const_iterator iter = lam.params->begin() - ; iter != lam.params->end() - ; ++iter) - { - if (count != 1) - { - strm << ", "; - } + for (paramListT::const_iterator iter = lam.params->begin() + ; iter != lam.params->end() + ; ++iter) + { + if (count != 1) + { + strm << ", "; + } - strm << "T" << count + ccount + 1; + strm << "T" << count + ccount + 1; - const stringT *name = iter->get()->name.get(); + const stringT *name = iter->get()->name.get(); - if (name) - { - strm - << " " << *name; - } + if (name) + { + strm + << " " << *name; + } - ++count; - } + ++count; + } } strm << ")\n{"; if (lam.explicitContext && lam.context.get()) { - // Context parameters require renaming - unsigned count = 1; + // Context parameters require renaming + unsigned count = 1; - for (paramListT::const_iterator iter = lam.context->begin() - ; iter != lam.context->end() - ; ++iter) - { - const stringT *name = iter->get()->name.get(); + for (paramListT::const_iterator iter = lam.context->begin() + ; iter != lam.context->end() + ; ++iter) + { + const stringT *name = iter->get()->name.get(); - if (name) - { - strm - << "\n#define " << *name - << " mContext" + if (name) + { + strm + << "\n#define " << *name + << " mContext" << count; - } + } - ++count; - } + ++count; + } } strm @@ -487,22 +487,22 @@ if (lam.explicitContext && lam.context.get()) { - unsigned count = 1; + unsigned count = 1; - for (paramListT::const_iterator iter = lam.context->begin() - ; iter != lam.context->end() - ; ++iter) - { - const stringT *name = iter->get()->name.get(); + for (paramListT::const_iterator iter = lam.context->begin() + ; iter != lam.context->end() + ; ++iter) + { + const stringT *name = iter->get()->name.get(); - if (name) - { - strm - << "\n#undef " << *name; - } + if (name) + { + strm + << "\n#undef " << *name; + } - ++count; - } + ++count; + } } strm << "\n}\n"; @@ -526,9 +526,9 @@ } void implicitTemplateInstance (ostream &strm - , const lambdaT &lam - , unsigned ccount - , unsigned pcount) + , const lambdaT &lam + , unsigned ccount + , unsigned pcount) { implTemplateName (strm, ccount, pcount); @@ -536,19 +536,19 @@ if (ccount) { - paramListT::const_iterator iter = lam.context->begin(); + paramListT::const_iterator iter = lam.context->begin(); - for (unsigned count = 1; count <= ccount; ++count) - { - strm << ", T" << count + 1; + for (unsigned count = 1; count <= ccount; ++count) + { + strm << ", T" << count + 1; - if ((*iter)->byReference) - { - strm << " &"; - } + if ((*iter)->byReference) + { + strm << " &"; + } - ++iter; - } + ++iter; + } } tList (strm, 2 + ccount, 1 + ccount + pcount, false); @@ -572,11 +572,11 @@ if (ccount >= 1) { - strm << "\n template <"; + strm << "\n template <"; - typenameList (strm, 2, 1 + ccount); + typenameList (strm, 2, 1 + ccount); - strm << ">"; + strm << ">"; } strm << "\n static "; @@ -585,23 +585,23 @@ if (lam.onHeap) { - strm << " *"; + strm << " *"; } strm << "\n generate ("; if (ccount) { - paramListT::const_iterator iter = lam.context->begin(); + paramListT::const_iterator iter = lam.context->begin(); - for (unsigned count = 1; count <= ccount; ++count) - { - if (count != 1) - { - strm << ", "; - } + for (unsigned count = 1; count <= ccount; ++count) + { + if (count != 1) + { + strm << ", "; + } - strm << "T" << count + 1 << " "; + strm << "T" << count + 1 << " "; if ((*iter)->byReference) { @@ -610,15 +610,15 @@ strm << "p" << count; - ++iter; - } + ++iter; + } } strm << ")\n {\n return "; if (lam.onHeap) { - strm << "new "; + strm << "new "; } implicitTemplateInstance (strm, lam, ccount, pcount); @@ -650,7 +650,7 @@ bool mByRef; MatchInitialiser (const stringT &target - , bool byRef) + , bool byRef) : mTarget (target) , mByRef (byRef) { @@ -663,8 +663,8 @@ }; bool CodeGen::contextRef (FILE *outFile - , std::auto_ptr<stringT> strp - , bool byRef) + , std::auto_ptr<stringT> strp + , bool byRef) { // Handles context by value and by reference @@ -672,15 +672,15 @@ if (lam.explicitContext) { - cerr - << "__ctx or __ref expression in lambda with explicit context\n"; + cerr + << "__ctx or __ref expression in lambda with explicit context\n"; - return false; + return false; } if (!lam.context.get()) { - lam.context.reset (new paramListT); + lam.context.reset (new paramListT); } paramListT &context (*lam.context); @@ -688,32 +688,32 @@ paramListT::iterator param; param = std::find_if (context.begin() - , context.end() - , MatchInitialiser (*strp, byRef)); + , context.end() + , MatchInitialiser (*strp, byRef)); if (param == context.end()) { - int ccount = context.size() + 1; + int ccount = context.size() + 1; - char newName[128]; + char newName[128]; - sprintf (newName, "mContext%d", ccount); + sprintf (newName, "mContext%d", ccount); - char pseudoType[128]; + char pseudoType[128]; - sprintf (pseudoType, "T%d", ccount); + sprintf (pseudoType, "T%d", ccount); - boost::shared_ptr<paramT> - newParamPtr (new paramT (makestr(pseudoType) - , makestr (newName) - , strp.release() + boost::shared_ptr<paramT> + newParamPtr (new paramT (makestr(pseudoType) + , makestr (newName) + , strp.release() , ccount - , byRef)); + , byRef)); - context.push_back (newParamPtr); + context.push_back (newParamPtr); - param = context.end(); - --param; + param = context.end(); + --param; } fprintf (outFile, "%s", contextVarExpression (**param).c_str()); @@ -722,8 +722,8 @@ } bool CodeGen::startLambda (FILE *&f - , int openBracePos - , std::auto_ptr<lambdaT> lamp) + , int openBracePos + , std::auto_ptr<lambdaT> lamp) { mStack.push (LambdaContext (f, openBracePos, lamp)); @@ -733,15 +733,15 @@ if (!f) { - cerr - << "Failed to create new body file " - << newName - << "\n"; + cerr + << "Failed to create new body file " + << newName + << "\n"; - f = mStack.top().mPrevFile; - mStack.pop (); + f = mStack.top().mPrevFile; + mStack.pop (); - return false; + return false; } return true; @@ -755,14 +755,14 @@ if (mapIter == mLambdaMap.end()) { - pair<LambdaMap::iterator, bool> inserted - = mLambdaMap.insert (std::make_pair (typeId, LambdaGroup())); + pair<LambdaMap::iterator, bool> inserted + = mLambdaMap.insert (std::make_pair (typeId, LambdaGroup())); - assert (inserted.second); + assert (inserted.second); - mapIter = inserted.first; + mapIter = inserted.first; - startExplicitImpl (*mapIter->second.mImplStream, ccount, pcount); + startExplicitImpl (*mapIter->second.mImplStream, ccount, pcount); } return mapIter; @@ -784,21 +784,21 @@ mapIter->second.mLambdaList.push_back (ctx); declareMemberFn (*mapIter->second.mImplStream - , ctx.mLambdaNumber - , ccount - , pcount); + , ctx.mLambdaNumber + , ccount + , pcount); std::ostringstream temp; if (ctx.mLamp->explicitContext) { - explicitConstructor (temp, ctx.mLambdaNumber, *ctx.mLamp); + explicitConstructor (temp, ctx.mLambdaNumber, *ctx.mLamp); } else { - writeGenerator (mGeneratorStream, ctx.mLambdaNumber, *ctx.mLamp); - implicitConstructor (temp, ctx.mLambdaNumber, *ctx.mLamp); + writeGenerator (mGeneratorStream, ctx.mLambdaNumber, *ctx.mLamp); + implicitConstructor (temp, ctx.mLambdaNumber, *ctx.mLamp); } fprintf (f, "%s", temp.str().c_str()); @@ -818,10 +818,10 @@ ; for (LambdaMap::const_iterator iter = mLambdaMap.begin() - ; iter != mLambdaMap.end() - ; ++iter) + ; iter != mLambdaMap.end() + ; ++iter) { - mImplStream + mImplStream << iter->second.mImplStream->rdbuf() << "\nprivate:\n "; @@ -842,21 +842,21 @@ mImplStream << "\n" << mGeneratorStream.str() << "\n"; for (LambdaMap::const_iterator group = mLambdaMap.begin() - ; group != mLambdaMap.end() - ; ++group) + ; group != mLambdaMap.end() + ; ++group) { - const LambdaList &list (group->second.mLambdaList); + const LambdaList &list (group->second.mLambdaList); - for (LambdaList::const_iterator iter = list.begin() - ; iter != list.end() - ; ++iter) - { - defineMemberFn (mImplStream - , iter->mLambdaNumber - , group->first.first - , group->first.second - , *iter->mLamp); - } + for (LambdaList::const_iterator iter = list.begin() + ; iter != list.end() + ; ++iter) + { + defineMemberFn (mImplStream + , iter->mLambdaNumber + , group->first.first + , group->first.second + , *iter->mLamp); + } } } } Modified: clamp/trunk/src/CodeGen.hh =================================================================== --- clamp/trunk/src/CodeGen.hh 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/CodeGen.hh 2009-03-19 18:02:16 UTC (rev 1310) @@ -15,7 +15,7 @@ // // History // ======= -// 2002/ 2/11 rmg File creation +// 2002/ 2/11 rmg File creation // // version: $Id: CodeGen.hh,v 1.9 2003/09/30 22:42:56 Raoul Exp $ // Modified: clamp/trunk/src/Makefile =================================================================== --- clamp/trunk/src/Makefile 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/Makefile 2009-03-19 18:02:16 UTC (rev 1310) @@ -62,7 +62,7 @@ clamp: clamp.o clamplex.o clamp_support.o CodeGen.o clean: - -rm *.o *.exe clamp.cc y.output clamp.tab.h lex.yy.cc lambda*.clamp_h + -rm -f *.o clamp *.exe clamp.cc y.output clamp.tab.h lex.yy.cc lambda*.clamp_h test.cc .PRECIOUS: %.cc Modified: clamp/trunk/src/clamp.y =================================================================== --- clamp/trunk/src/clamp.y 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/clamp.y 2009-03-19 18:02:16 UTC (rev 1310) @@ -15,7 +15,7 @@ * * History * ======= - * 2002/ 2/ 7 rmg File creation + * 2002/ 2/ 7 rmg File creation * * $Id: clamp.y,v 1.31 2003/09/30 22:06:25 Raoul Exp $ */ @@ -110,11 +110,11 @@ | lambda_start '(' decls ')' { if (plistInitialisers ($3)) { - yywarning ("default parameters ignored"); + yywarning ("default parameters ignored"); } - $$ = shiftlambda ($1, $3); // Adjust to explicit-context lambda - } + $$ = shiftlambda ($1, $3); // Adjust to explicit-context lambda + } ; lambda_start: TOK_LAMBDA typeidopt '(' decls ')' { @@ -281,19 +281,19 @@ gDealloc.bytes += myPtr->size; if (myPtr->next) - { - myPtr->next->prev = myPtr->prev; - } + { + myPtr->next->prev = myPtr->prev; + } if (myPtr->prev) - { - myPtr->prev->next = myPtr->next; - } + { + myPtr->prev->next = myPtr->next; + } else - { - first = myPtr->next; - } + { + first = myPtr->next; + } free (myPtr); } @@ -317,10 +317,10 @@ fflush (stdout); fprintf (stderr - , "\nclamp: %s on line %d with token %s\n" - , s - , yylineno - , yytext); + , "\nclamp: %s on line %d with token %s\n" + , s + , yylineno + , yytext); return 0; } @@ -331,9 +331,9 @@ fflush (stdout); fprintf (stderr - , "clamp: %s on line %d\n" - , s - , yylineno); + , "clamp: %s on line %d\n" + , s + , yylineno); return 0; } @@ -353,11 +353,11 @@ yyin = fopen (argv[1], "r"); if (!yyin) - { - perror ("fopen"); + { + perror ("fopen"); - return 1; - } + return 1; + } ++argv; --argc; @@ -388,22 +388,22 @@ using namespace std; fprintf (stderr - , "Memory leak detected. Dumping still allocated blocks:\n"); + , "Memory leak detected. Dumping still allocated blocks:\n"); fflush (stderr); BlockInfo *scan = first; while (scan) - { - std::cerr + { + std::cerr << "Address " << static_cast<void *>(scan) << " size " << scan->size << " caller " << scan->caller - << "\n"; + << "\n"; - scan = scan->next; - } + scan = scan->next; + } } return result; Modified: clamp/trunk/src/clamp_support.cc =================================================================== --- clamp/trunk/src/clamp_support.cc 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/clamp_support.cc 2009-03-19 18:02:16 UTC (rev 1310) @@ -16,7 +16,7 @@ // // History // ======= -// 2002/ 2/10 rmg File creation +// 2002/ 2/10 rmg File creation // // version: $Id: clamp_support.cc,v 1.11 2002/09/16 17:09:45 Raoul Exp $ // @@ -43,19 +43,19 @@ { if (from || force) { - to.reset (from); + to.reset (from); } } lambdaT *makelambda (lambdaT *lamp - , stringT *typestr - , paramListT *ctx - , paramListT *params - , bool onh) + , stringT *typestr + , paramListT *ctx + , paramListT *params + , bool onh) { if (lamp == 0) { - lamp = new lambdaT; + lamp = new lambdaT; } safeAssign (lamp->ret_type, typestr); @@ -67,7 +67,7 @@ } lambdaT *shiftlambda (lambdaT *lamp - , paramListT *params) + , paramListT *params) { // Release should be safe because it is only called if lamp is // already non-null, in which case makelambda guarantees no-throw @@ -83,16 +83,16 @@ { if (front) { - if (back) - { - front->splice (front->end(), *back); - delete back; - } + if (back) + { + front->splice (front->end(), *back); + delete back; + } } else if (back) { - front = back; + front = back; } return front; @@ -113,12 +113,12 @@ if (list) { - for (paramListT::const_iterator iter = list->begin() - ; (iter != list->end()) && (!foundInit) - ; ++iter) - { - foundInit = (*iter)->initialiser.get(); - } + for (paramListT::const_iterator iter = list->begin() + ; (iter != list->end()) && (!foundInit) + ; ++iter) + { + foundInit = (*iter)->initialiser.get(); + } } return foundInit; @@ -128,18 +128,18 @@ { if (s1) { - if (s2) - { - s1->append (" "); - s1->append (*s2); + if (s2) + { + s1->append (" "); + s1->append (*s2); - delete s2; - } + delete s2; + } } else if (s2) { - s1 = s2; + s1 = s2; } return s1; @@ -156,10 +156,10 @@ } stringT *appendstr (stringT *s1 - , stringT *s2 - , stringT *s3 - , stringT *s4 - , stringT *s5) + , stringT *s2 + , stringT *s3 + , stringT *s4 + , stringT *s5) { return appendstr (appendstr (s1, s2, s3, s4), s5); } @@ -168,12 +168,12 @@ { if (cstr) { - return new stringT (cstr); + return new stringT (cstr); } else { - return 0; + return 0; } } @@ -181,12 +181,12 @@ { if (cstr) { - return new stringT (cstr, length); + return new stringT (cstr, length); } else { - return 0; + return 0; } } @@ -199,10 +199,10 @@ if (lam.explicitContext) { - strm - << " context " - << lam.context.get() - << " and"; + strm + << " context " + << lam.context.get() + << " and"; } strm @@ -225,15 +225,15 @@ std::ostream &operator<< (std::ostream &strm, const paramListT &pList) { for (paramListT::const_iterator iter = pList.begin() - ; iter != pList.end() - ; ++iter) + ; iter != pList.end() + ; ++iter) { - if (iter != pList.begin()) - { - strm << ", "; - } + if (iter != pList.begin()) + { + strm << ", "; + } - strm << iter->get(); + strm << iter->get(); } return strm; Modified: clamp/trunk/src/clamp_support.hh =================================================================== --- clamp/trunk/src/clamp_support.hh 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/clamp_support.hh 2009-03-19 18:02:16 UTC (rev 1310) @@ -15,7 +15,7 @@ // // History // ======= -// 2002/ 2/ 7 rmg File creation +// 2002/ 2/ 7 rmg File creation // // version: $Id: clamp_support.hh,v 1.14 2003/09/30 22:06:22 Raoul Exp $ // @@ -65,10 +65,10 @@ }; lambdaT *makelambda (lambdaT *lamp - , stringT *typestr - , paramListT *ctx - , paramListT *params - , bool onHeap = false); + , stringT *typestr + , paramListT *ctx + , paramListT *params + , bool onHeap = false); // // Convert an implicit-context lambda into an explicit-context version @@ -76,7 +76,7 @@ // and adding the given parameters // lambdaT *shiftlambda (lambdaT *lamp - , paramListT *params); + , paramListT *params); paramListT *makeplist (stringT *type, stringT *name, stringT *init); @@ -99,12 +99,12 @@ { if (tptr) { - return strm << *tptr; + return strm << *tptr; } else { - return strm << "(null)"; + return strm << "(null)"; } } */ Modified: clamp/trunk/src/clamplex.lex =================================================================== --- clamp/trunk/src/clamplex.lex 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/clamplex.lex 2009-03-19 18:02:16 UTC (rev 1310) @@ -15,7 +15,7 @@ * * History * ======= - * 2002/ 2/ 6 rmg File creation + * 2002/ 2/ 6 rmg File creation * * version: $Id: clamplex.lex,v 1.13 2002/11/18 17:04:00 Raoul Exp $ */ @@ -111,12 +111,12 @@ {RBRACE} { if (parserBraceMatch (openbraces--)) { - return '}'; + return '}'; } else { - ECHO; + ECHO; } } } Modified: clamp/trunk/src/curry.clamp =================================================================== --- clamp/trunk/src/curry.clamp 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/curry.clamp 2009-03-19 18:02:16 UTC (rev 1310) @@ -15,7 +15,7 @@ // // History // ======= -// 2002/11/14 rmg File creation +// 2002/11/14 rmg File creation // int foo (int p1, int p2) { return p1 * p2; } Modified: clamp/trunk/src/eg.clamp =================================================================== --- clamp/trunk/src/eg.clamp 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/eg.clamp 2009-03-19 18:02:16 UTC (rev 1310) @@ -15,7 +15,7 @@ // // History // ======= -// 2002/ 2/12 rmg File creation +// 2002/ 2/12 rmg File creation // // version: $Id: eg.clamp,v 1.13 2003/09/30 21:58:28 Raoul Exp $ // Modified: clamp/trunk/src/home_page_examples.clamp =================================================================== --- clamp/trunk/src/home_page_examples.clamp 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/home_page_examples.clamp 2009-03-19 18:02:16 UTC (rev 1310) @@ -6,7 +6,7 @@ // // History // ======= -// 2002/ 2/15 rmg File creation +// 2002/ 2/15 rmg File creation // #include <vector> Modified: clamp/trunk/src/test.clamp =================================================================== --- clamp/trunk/src/test.clamp 2009-03-19 10:18:05 UTC (rev 1309) +++ clamp/trunk/src/test.clamp 2009-03-19 18:02:16 UTC (rev 1310) @@ -15,7 +15,7 @@ // // History // ======= -// 2002/ 2/12 rmg File creation +// 2002/ 2/12 rmg File creation // // version: $Id: test.clamp,v 1.12 2002/11/18 17:03:27 Raoul Exp $ // @@ -45,11 +45,11 @@ FN apply_if (ITER begin, ITER end, COND cond, FN fn) { for_each (begin - , end - , lambda (typename iterator_traits<ITER>::value_type &v) { + , end + , lambda (typename iterator_traits<ITER>::value_type &v) { if (__ref(cond)(v)) { - __ref(fn) (v); + __ref(fn) (v); } }); @@ -70,9 +70,9 @@ // for_each (vs.begin(), vs.end(), lambda (string &str) { apply_if (str.begin() - , str.end() - , match ('m') - , lambda (char &c) { --c; }); + , str.end() + , match ('m') + , lambda (char &c) { --c; }); }); // @@ -81,8 +81,8 @@ string temp; for_each (vs.begin() - , vs.end() - , lambda (const string &str) { __ref(temp) += str; } ); + , vs.end() + , lambda (const string &str) { __ref(temp) += str; } ); cout << temp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |