www.pudn.com > cppcc.rar > cw_re_node_builder.h
/*
* File: cw_re_node_builder.h
* $Id: cw_re_node_builder.h,v 1.3 2003/06/04 10:18:37 alec Exp $
*
* Author: Alec Panoviciu (alecu@email.com)
*
* Comments: this is the "C" layer between the YACC generated code and the
* IReNodeBuilder class.
*
* Revision history:
*
* $Log: cw_re_node_builder.h,v $
* Revision 1.3 2003/06/04 10:18:37 alec
* 0.0.6
*
* Revision 1.2 2002/04/29 17:55:41 alec
* regexps almost done
*
* Revision 1.1 2002/04/29 09:40:01 alec
* *** empty log message ***
*
*/
/*
Copyright (C) 2002 Alexandru Panoviciu (alecu@email.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __CW_RE_NODE_BUILDER_H__
#define __CW_RE_NODE_BUILDER_H__
#if defined __cplusplus
class IReNodeBuilder;
/**
* \ingroup cw_re_node_builder
*
* This will point to the instance of the IReNodeBuilder object whose methods
* should actually be called from the parser C code. It is initialized by the
* LexYaccParser before the paring process starts.
*/
extern IReNodeBuilder *cw_reNodeBuilder;
#define CLINK extern "C"
#else
#define CLINK
#endif
#include "cw_misc.h"
/**
* \defgroup cw_re_node_builder IReNodeBuilder C wrapper
*
* These are the wrapper functions that get called from the C parser code. Each
* of them will call the correspomding method of the IReNodeBuilder instance
* pointed to by cw_reNodeBuilder, after performing the necessary argument
* conversions into their C++ conterparts.
*
* @{
*/
CLINK void* IReNodeBuilder_createOrNode (void *pre, void *post);
CLINK void* IReNodeBuilder_createCatNode (void *pre, void *post);
CLINK void* IReNodeBuilder_createPlusNode (void *in);
CLINK void* IReNodeBuilder_createOptionalNode (void *in);
CLINK void* IReNodeBuilder_createStarNode (void *in);
CLINK void* IReNodeBuilder_createStringLiteralNode (char *s, int len);
CLINK void* IReNodeBuilder_createCharListNode (int negated, CwCharClassList chars);
/* @} */
#endif /* #ifndef __CW_RE_NODE_BUILDER_H__ */