www.pudn.com > cppcc.rar > cw_ebnf_node_builder.h
/*
* File: cw_ebnf_node_builder.h
* $Id: cw_ebnf_node_builder.h,v 1.5 2003/02/01 19:34:41 alec Exp $
*
* Author: Alec Panoviciu (alecu@email.com)
*
* Comments:
*
* Revision history:
*
* $Log: cw_ebnf_node_builder.h,v $
* Revision 1.5 2003/02/01 19:34:41 alec
* many small changes.
*
* Revision 1.4 2002/06/23 23:31:46 alec
* la-time usercode (force)
*
* Revision 1.3 2002/06/13 11:36:05 alec
* added #line stuff
*
* Revision 1.2 2002/05/16 21:33:44 alec
* parser generation done
*
* Revision 1.1 2002/05/10 07:17:33 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_EBNF_NODE_BUILDER_H__
#define __CW_EBNF_NODE_BUILDER_H__
#if defined __cplusplus
class IEbnfNodeBuilder;
/**
* \ingroup cw_ebnf_node_builder
*
* This will point to the instance of the IEbnfNodeBuilder whose methods
* should actually be called from the parser's C code. It is initialized by
* the LexYaccParser before teh parsing process starts.
*/
extern IEbnfNodeBuilder *cw_ebnfNodeBuilder;
#define CLINK extern "C"
#else
#define CLINK
#endif
#include "cw_misc.h"
CLINK void IEbnfNodeBuilder_setLookahead (void *node, void *la);
CLINK void IEbnfNodeBuilder_setCatchClauses (void *node,
CwCatchClauseList cl);
CLINK void IEbnfNodeBuilder_setStartCode (void *node, char *startCode,
int force, int line);
CLINK void IEbnfNodeBuilder_setTargetVar (void *node, char *targetVar,
int line);
CLINK void IEbnfNodeBuilder_setEndCode (void *node, char *endCode,
int force, int line);
CLINK void* IEbnfNodeBuilder_createOrNode (void *pre, void *post);
CLINK void* IEbnfNodeBuilder_createCatNode (void *pre, void *post);
CLINK void* IEbnfNodeBuilder_createPlusNode (void *in);
CLINK void* IEbnfNodeBuilder_createStarNode (void *in);
CLINK void* IEbnfNodeBuilder_createOptionalNode (void *in);
CLINK void* IEbnfNodeBuilder_createNonterminalNode (char *targetVar,
int targetVarLine,
char *nontermId,
char *actualArgs,
int actualArgsLine);
CLINK void* IEbnfNodeBuilder_createTerminalNode (char *termId);
CLINK void* IEbnfNodeBuilder_createLaSpec (int fixedla, void *synLa,
char *semLa);
CLINK void* IEbnfNodeBuilder_createCatchClause (char *exceptionDecl,
int edLine,
char *code);
#endif /* #ifndef __CW_EBNF_NODE_BUILDER_H__ */