www.pudn.com > cppcc.rar > cw_misc.h


/*
 *  File:       cw_misc.hh
 *              $Id: cw_misc.h,v 1.4 2002/05/10 07:15:10 alec Exp $
 *
 *  Author:     Alec Panoviciu (alecu@email.com)
 *
 *  Comments: this header declares various extern "C" functions that
 *  will be called form the generated parser code.
 *
 *  Revision history:
 *
 *  $Log: cw_misc.h,v $
 *  Revision 1.4  2002/05/10 07:15:10  alec
 *  parser parse tree ok
 *
 *  Revision 1.3  2002/04/30 16:24:38  alec
 *  tested the scanner ptree & vBitVector implementation -> ok
 *
 *  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_MISC_HH__
#define __CW_MISC_HH__

#if defined __cplusplus
#define CLINK extern "C"
#else
#define CLINK
#endif


CLINK void yyerror (char *message);
CLINK void yywarn (char *message);
CLINK void cw_die (char *message);
  
typedef char Cstring;
CLINK void deleteCstring (Cstring *s);

#include "clist.h"
DECLARE_LIST(Cstring)

typedef struct t_CwCharClass
{
  unsigned char first, last;
} CwCharClass;

CLINK void deleteCwCharClass (CwCharClass *c);
DECLARE_LIST(CwCharClass)

typedef void CwCatchClause; /* this is actually a dummy we store CatchClause
                             * pointers in this list  */
CLINK void deleteCwCatchClause (CwCatchClause *);
DECLARE_LIST(CwCatchClause);

     
#if defined __cplusplus

#include 
#include 

#include "ire_node_builder.hh"
     
/**
 * Returns a new vector containing the strings from the given string
 * list.
 */
vector* CstringList2vector (CstringList l);

vector* CwCharClassList2vector (CwCharClassList l);

extern int yylineno;
#endif  

#endif /* #ifndef __CW_MISC_HH__ */