|
Boost : |
From: nhodapp_at_[hidden]
Date: 2000-11-28 10:43:21
Hi -- I'm using the regex classes to perform syntax highlighting of
source code similar to the provided "snip4" sample (included in the
regexx documentation). I'm building on VC6.
The problem I have is actually evident in the snip4 sample itself.
The code will seemingly go into an endless loop inside the
function "query_match_aux()", which is intenarlly called by
the "regex_merge()" function.
The data I am passing is simply a nasty (long) preprocessor
declaration:
#define IMPLEMENT_SERIAL_COM(class_name, base_class_name, wSchema) \
CObject* PASCAL class_name::CreateObject() \
{ class_name *pOb = new class_name; \
pOb->_m_bAlreadyLoaded = FALSE; \
return pOb; } \
_IMPLEMENT_RUNTIMECLASS(class_name, base_class_name, wSchema,
class_name::CreateObject) \
AFX_CLASSINIT _init_##class_name(RUNTIME_CLASS(class_name)); \
CArchive& AFXAPI operator>>(CArchive& ar, class_name* &pOb) \
{ pOb = (class_name*) ar.ReadObject(RUNTIME_CLASS
(class_name)); \
if (pOb != NULL) \
if (pOb->_m_bAlreadyLoaded) \
pOb->ExternalAddRef(); \
else \
pOb->_m_bAlreadyLoaded = TRUE; \
return ar; }
To reproduce the problem, simply save the above text as a file and
pass it to a compiled snip4 example.
I'd appreciate any help or input -- debugging in regex isn't fun
since I don't know what everything does! Thanks,
Nick Hodapp
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk