aboutsummaryrefslogtreecommitdiffstats
path: root/lib/scanner.h
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2015-07-08 23:43:03 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2015-07-08 23:53:24 +0100
commit6c7ac8dc769435ea0231db550799d73cb479a773 (patch)
treee5de3e6642d6669a17b2afd8341ea5b82655461c /lib/scanner.h
parent695702e323759d158366d33c24c1ff47141056e9 (diff)
downloadlibconfig-6c7ac8dc769435ea0231db550799d73cb479a773.tar.gz
Imported Upstream version 1.5upstream/1.5
Diffstat (limited to '')
-rw-r--r--lib/scanner.h62
1 files changed, 40 insertions, 22 deletions
diff --git a/lib/scanner.h b/lib/scanner.h
index baa6f77..8dabb30 100644
--- a/lib/scanner.h
+++ b/lib/scanner.h
@@ -13,7 +13,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 33
+#define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -35,7 +35,7 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if __STDC_VERSION__ >= 199901L
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
@@ -58,7 +58,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -89,6 +88,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -98,11 +99,12 @@ typedef unsigned int flex_uint32_t;
#else /* ! __cplusplus */
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
#define YY_USE_CONST
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
@@ -128,21 +130,19 @@ typedef void* yyscan_t;
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r
-int libconfig_yylex_init (yyscan_t* scanner);
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
-typedef unsigned int yy_size_t;
+typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -162,7 +162,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -206,13 +206,13 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner );
YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner );
void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void libconfig_yyfree (void * ,yyscan_t yyscanner );
-#define libconfig_yywrap(n) 1
+#define libconfig_yywrap(yyscanner) 1
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
@@ -220,13 +220,25 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner );
#ifdef YY_HEADER_EXPORT_START_CONDITIONS
#define INITIAL 0
#define COMMENT 1
+#define STRING 2
+#define INCLUDE 3
#endif
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
#endif
+#define YY_EXTRA_TYPE struct scan_context *
+
+int libconfig_yylex_init (yyscan_t* scanner);
+
+int libconfig_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
@@ -248,7 +260,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner );
void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int libconfig_yyget_leng (yyscan_t yyscanner );
+yy_size_t libconfig_yyget_leng (yyscan_t yyscanner );
char *libconfig_yyget_text (yyscan_t yyscanner );
@@ -256,6 +268,10 @@ int libconfig_yyget_lineno (yyscan_t yyscanner );
void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner );
+int libconfig_yyget_column (yyscan_t yyscanner );
+
+void libconfig_yyset_column (int column_no ,yyscan_t yyscanner );
+
YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner );
void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
@@ -300,9 +316,11 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int libconfig_yylex (YYSTYPE * yylval_param ,yyscan_t yyscanner);
+extern int libconfig_yylex \
+ (YYSTYPE * yylval_param ,yyscan_t yyscanner);
-#define YY_DECL int libconfig_yylex (YYSTYPE * yylval_param , yyscan_t yyscanner)
+#define YY_DECL int libconfig_yylex \
+ (YYSTYPE * yylval_param , yyscan_t yyscanner)
#endif /* !YY_DECL */
/* yy_get_previous_state - get the state just before the EOB char was reached */
@@ -319,8 +337,8 @@ extern int libconfig_yylex (YYSTYPE * yylval_param ,yyscan_t yyscanner);
#undef YY_DECL
#endif
-#line 130 "scanner.l"
+#line 193 "scanner.l"
-#line 325 "scanner.h"
+#line 343 "scanner.h"
#undef libconfig_yyIN_HEADER
#endif /* libconfig_yyHEADER_H */