Update of /cvsroot/cpptool/CppParser/examples/parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21407
Modified Files:
cpplexer.cpp
Log Message:
* upgraded to future boost 1.32 (cvs)
* fixed preprocessor directive patterns
Index: cpplexer.cpp
===================================================================
RCS file: /cvsroot/cpptool/CppParser/examples/parser/cpplexer.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** cpplexer.cpp 8 Jun 2004 20:23:10 -0000 1.1.1.1
--- cpplexer.cpp 7 Aug 2004 05:39:26 -0000 1.2
***************
*** 1,5 ****
#include "cpplexer.h"
#include "stlhelper.h"
! #include <boost/regex/v3/regex.hpp>
#include <algorithm>
#include <iterator>
--- 1,5 ----
#include "cpplexer.h"
#include "stlhelper.h"
! #include <boost/regex/v4/regex.hpp>
#include <algorithm>
#include <iterator>
***************
*** 8,11 ****
--- 8,12 ----
#include <vector>
+
using namespace Parser::CppLexerMatchType;
***************
*** 97,104 ****
if ( !isMacroLexer )
{
! addPattern( matchPreprocessorDirective, "\\A#[ \t]*[a-zA-Z_][^\\r\\n]*"
! "(?:" "\\\\(?:\r|\n|\r\n)|"
! "(?:/\\*.*?\\*/)|"
! "[^\r\n])*" );
}
addPattern( matchIdentifier, "\\A[A-Za-z_][A-Za-z0-9_]*" );
--- 98,107 ----
if ( !isMacroLexer )
{
! addPattern( matchPreprocessorDirective, "\\A#[ \t]*[a-zA-Z_]"
! "(?:"
! "(?:\\\\(?:\\r|\\n|\\r\\n))|" // '\n': macro continue
! "(?:/\\*.*?\\*/)|" // C comment
! "[^\\r\\n]"
! ")*" );
}
addPattern( matchIdentifier, "\\A[A-Za-z_][A-Za-z0-9_]*" );
|