OpenMPI  0.1.1
keyval_lex.h
1 /* -*- C -*-
2  *
3  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4  * University Research and Technology
5  * Corporation. All rights reserved.
6  * Copyright (c) 2004-2005 The University of Tennessee and The University
7  * of Tennessee Research Foundation. All rights
8  * reserved.
9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10  * University of Stuttgart. All rights reserved.
11  * Copyright (c) 2004-2005 The Regents of the University of California.
12  * All rights reserved.
13  * $COPYRIGHT$
14  *
15  * Additional copyrights may follow
16  *
17  * $HEADER$
18  */
19 
20 #ifndef OPAL_UTIL_KEYVAL_LEX_H_
21 #define OPAL_UTIL_KEYVAL_LEX_H_
22 
23 #include "opal_config.h"
24 
25 #ifdef malloc
26 #undef malloc
27 #endif
28 #ifdef realloc
29 #undef realloc
30 #endif
31 #ifdef free
32 #undef free
33 #endif
34 
35 #include <stdio.h>
36 
37 int opal_util_keyval_yylex(void);
38 int opal_util_keyval_init_buffer(FILE *file);
39 
40 extern FILE *opal_util_keyval_yyin;
41 extern bool opal_util_keyval_parse_done;
42 extern char *opal_util_keyval_yytext;
43 extern int opal_util_keyval_yynewlines;
44 
45 /*
46  * Make lex-generated files not issue compiler warnings
47  */
48 #define YY_STACK_USED 0
49 #define YY_ALWAYS_INTERACTIVE 0
50 #define YY_NEVER_INTERACTIVE 0
51 #define YY_MAIN 0
52 #define YY_NO_UNPUT 1
53 #define YY_SKIP_YYWRAP 1
54 
55 enum {
56  OPAL_UTIL_KEYVAL_PARSE_DONE,
57  OPAL_UTIL_KEYVAL_PARSE_ERROR,
58 
59  OPAL_UTIL_KEYVAL_PARSE_NEWLINE,
60  OPAL_UTIL_KEYVAL_PARSE_EQUAL,
61  OPAL_UTIL_KEYVAL_PARSE_SINGLE_WORD,
62  OPAL_UTIL_KEYVAL_PARSE_VALUE,
63 
64  OPAL_UTIL_KEYVAL_PARSE_MAX
65 };
66 
67 #endif