added README_changes.txt
[wrffire.git] / wrfv2_fire / chem / KPP / kpp / kpp-2.1 / src.org / scan.h
blob1f5fdc622e6319083b7950de39457a8a7273bb76
1 /******************************************************************************
3 KPP - The Kinetic PreProcessor
4 Builds simulation code for chemical kinetic systems
6 Copyright (C) 1995-1996 Valeriu Damian and Adrian Sandu
7 Copyright (C) 1997-2005 Adrian Sandu
9 KPP is free software; you can redistribute it and/or modify it under the
10 terms of the GNU General Public License as published by the Free Software
11 Foundation (http://www.gnu.org/copyleft/gpl.html); either version 2 of the
12 License, or (at your option) any later version.
14 KPP is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, consult http://www.gnu.org/copyleft/gpl.html or
21 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA.
24 Adrian Sandu
25 Computer Science Department
26 Virginia Polytechnic Institute and State University
27 Blacksburg, VA 24060
28 E-mail: sandu@cs.vt.edu
30 ******************************************************************************/
34 #ifndef _SCAN_H_
35 #define _SCAN_H_
37 #include <stdio.h>
38 #include "gdef.h"
40 /* mz_rs_20050518+ value increased */
41 #define MAX_INLINE 10000
42 /* #define MAX_INLINE 4000 */
43 /* mz_rs_20050518- */
45 enum eq_state { LHS, RHS, RAT };
46 enum sptypes { DUMMY_SPC, VAR_SPC, RAD_SPC, FIX_SPC };
47 enum atomcheck { NO_CHECK, DO_CHECK, CANCEL_CHECK };
48 enum codetype { APPEND, REPLACE };
50 typedef struct {
51 int key;
52 int type;
53 char * kname;
54 } INLINE_KEY;
56 extern int eqState;
57 extern int isPhoto;
58 extern int crt_line_no;
59 extern char *crt_filename;
60 extern int crtLine;
61 extern char crtFile[];
62 extern char crtToken[];
63 extern char nextToken[];
64 extern int crtTokType;
65 extern int nextTokType;
66 extern int nError;
67 extern int nWarning;
68 extern int crt_section;
70 int Parser( char * filename );
71 void ScanError( char *fmt, ... );
72 void ParserError( char *fmt, ... );
73 void ScanWarning( char *fmt, ... );
74 void ParserWarning( char *fmt, ... );
75 void Error( char *fmt, ... );
76 void Warning( char *fmt, ... );
77 void Message( char *fmt, ... );
78 void FatalError( int status, char *fmt, ... );
80 void DeclareAtom( char *atname );
81 void SetAtomType( char *atname, int type );
82 void AddAtom( char *atname, char *nr );
83 void DeclareSpecies( int type, char* spname );
84 void SetSpcType( int type, char *spname );
85 void AssignInitialValue( char *spname , char *spval );
86 void StoreEquationRate( char *rate, char *label );
87 void CheckEquation();
88 void ProcessTerm( int side, char *sign, char *coef, char *spname );
89 void AddLumpSpecies( char *spname );
90 void CheckLump( char *spname );
91 void AddLookAt( char *spname );
92 void AddMonitor( char *spname );
93 void AddTransport( char *spname );
95 void WriteAtoms();
96 void WriteSpecies();
97 void WriteMatrices();
98 void WriteOptions();
100 char * AppendString( char * s1, char * s2, int * len, int addlen );
101 void AddInlineCode( char * context, char * code );
103 #endif