parser_misc.h

Go to the documentation of this file.
00001 #ifndef __PARSE_MISC_H__
00002 #define __PARSE_MISC_H__
00003 
00004 /*
00005  Copyright (c) 2006-2010 Trevor Williams
00006 
00007  This program is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU General Public License as published by the Free Software
00009  Foundation; either version 2 of the License, or (at your option) any later version.
00010 
00011  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00012  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00013  See the GNU General Public License for more details.
00014 
00015  You should have received a copy of the GNU General Public License along with this program;
00016  if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00026 #include "defines.h"
00027 
00033 struct vlltype {
00034   unsigned int first_line;
00035   unsigned int first_column;
00036   unsigned int last_line;
00037   unsigned int last_column;
00038   char*        text;
00039   unsigned int ppline;
00040 };
00041 
00042 #define YYLTYPE struct vlltype
00043 
00044 /* This for compatibility with new and older bison versions. */
00045 #ifndef yylloc
00046 # define yylloc VLlloc
00047 #endif
00048 extern YYLTYPE yylloc;
00049 
00050 /*
00051  * Interface into the lexical analyzer. ...
00052  */
00053 extern int  VLlex();
00054 extern void VLerror( char* msg );
00055 #define yywarn VLwarn
00056 /*@-exportlocal@*/
00057 extern void VLwarn( char* msg );
00058 /*@=exportlocal@*/
00059 
00060 extern unsigned error_count;
00061 
00063 void parser_dealloc_sig_range( sig_range* range, bool rm_ptr );
00064 
00066 sig_range* parser_copy_curr_range( bool packed );
00067 
00069 void parser_copy_range_to_curr_range( sig_range* range, bool packed );
00070 
00072 void parser_explicitly_set_curr_range( static_expr* left, static_expr* right, bool packed );
00073 
00075 void parser_implicitly_set_curr_range( int left_num, int right_num, bool packed );
00076 
00078 bool parser_check_generation( unsigned int gen );
00079 
00081 void parser_handle_case_statement(
00082   exp_op_type  case_op,
00083   expression*  cs_expr,
00084   expression*  c_expr,
00085   statement*   cs_stmt,
00086   unsigned int line,
00087   unsigned int ppline,
00088   statement**  last_stmt
00089 );
00090 
00092 void parser_handle_case_statement_list(
00093   exp_op_type  case_op,
00094   expression*  cs_expr,
00095   expression*  c_expr,
00096   statement*   cs_stmt,
00097   unsigned int line,
00098   unsigned int ppline,
00099   statement**  last_stmt
00100 );
00101 
00103 void parser_handle_generate_case_statement(
00104   expression*  cs_expr,
00105   expression*  c_expr,
00106   gen_item*    gi,
00107   unsigned int line,
00108   gen_item**   last_gi
00109 );
00110 
00112 void parser_handle_generate_case_statement_list(
00113   expression*  cs_expr,
00114   expression*  c_expr,
00115   gen_item*    gi,
00116   unsigned int line,
00117   gen_item**   last_gi
00118 );
00119 
00120 #endif
00121 
Generated on Sun Nov 21 00:55:35 2010 for Covered by  doxygen 1.6.3