summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/hx509
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/hx509')
-rw-r--r--source4/heimdal/lib/hx509/lex.yy.c127
-rw-r--r--source4/heimdal/lib/hx509/sel-gram.c29
-rw-r--r--source4/heimdal/lib/hx509/sel-lex.c26
3 files changed, 131 insertions, 51 deletions
diff --git a/source4/heimdal/lib/hx509/lex.yy.c b/source4/heimdal/lib/hx509/lex.yy.c
index 5c0a9c4635..4ee5a26820 100644
--- a/source4/heimdal/lib/hx509/lex.yy.c
+++ b/source4/heimdal/lib/hx509/lex.yy.c
@@ -33,7 +33,7 @@
#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.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -50,7 +50,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
@@ -161,7 +161,7 @@ extern FILE *yyin, *yyout;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -223,7 +223,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -467,6 +467,8 @@ int yy_flex_debug = 0;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
+#line 1 "sel-lex.l"
+#line 2 "sel-lex.l"
/*
* Copyright (c) 2004, 2008 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
@@ -532,6 +534,8 @@ struct hx_expr_input _hx509_expr_input;
#undef ECHO
+#line 538 "lex.yy.c"
+
#define INITIAL 0
#ifndef YY_NO_UNISTD_H
@@ -590,7 +594,7 @@ extern int yywrap (void );
#endif
static void yyunput (int c,char *buf_ptr );
-
+
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
@@ -711,7 +715,12 @@ YY_DECL
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
+
+#line 68 "sel-lex.l"
+
+
+#line 723 "lex.yy.c"
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -795,30 +804,37 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
+#line 70 "sel-lex.l"
{ return kw_TRUE; }
YY_BREAK
case 2:
YY_RULE_SETUP
+#line 71 "sel-lex.l"
{ return kw_FALSE; }
YY_BREAK
case 3:
YY_RULE_SETUP
+#line 72 "sel-lex.l"
{ return kw_AND; }
YY_BREAK
case 4:
YY_RULE_SETUP
+#line 73 "sel-lex.l"
{ return kw_OR; }
YY_BREAK
case 5:
YY_RULE_SETUP
+#line 74 "sel-lex.l"
{ return kw_IN; }
YY_BREAK
case 6:
YY_RULE_SETUP
+#line 75 "sel-lex.l"
{ return kw_TAILMATCH; }
YY_BREAK
case 7:
YY_RULE_SETUP
+#line 77 "sel-lex.l"
{
yylval.string = strdup ((const char *)yytext);
return IDENTIFIER;
@@ -826,25 +842,31 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
+#line 81 "sel-lex.l"
{ yylval.string = handle_string(); return STRING; }
YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
+#line 82 "sel-lex.l"
{ ++lineno; }
YY_BREAK
case 10:
YY_RULE_SETUP
+#line 83 "sel-lex.l"
{ return *yytext; }
YY_BREAK
case 11:
YY_RULE_SETUP
+#line 84 "sel-lex.l"
;
YY_BREAK
case 12:
YY_RULE_SETUP
+#line 85 "sel-lex.l"
ECHO;
YY_BREAK
+#line 870 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -986,7 +1008,7 @@ case YY_STATE_EOF(INITIAL):
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = (yytext_ptr);
register int number_to_move, i;
int ret_val;
@@ -1122,7 +1144,7 @@ static int yy_get_next_buffer (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
-
+
yy_current_state = (yy_start);
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
@@ -1153,7 +1175,7 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ register char *yy_cp = (yy_c_buf_p);
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
@@ -1176,7 +1198,7 @@ static int yy_get_next_buffer (void)
static void yyunput (int c, register char * yy_bp )
{
register char *yy_cp;
-
+
yy_cp = (yy_c_buf_p);
/* undo effects of setting up yytext */
@@ -1219,7 +1241,7 @@ static int yy_get_next_buffer (void)
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -1286,12 +1308,12 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
- *
+ *
* @note This function does not reset the start condition to @c INITIAL .
*/
void yyrestart (FILE * input_file )
{
-
+
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
@@ -1304,11 +1326,11 @@ static int yy_get_next_buffer (void)
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
- *
+ *
*/
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
-
+
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
@@ -1339,7 +1361,7 @@ static int yy_get_next_buffer (void)
static void yy_load_buffer_state (void)
{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
@@ -1348,13 +1370,13 @@ static void yy_load_buffer_state (void)
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
+ *
* @return the allocated buffer state.
*/
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1377,11 +1399,11 @@ static void yy_load_buffer_state (void)
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
- *
+ *
*/
void yy_delete_buffer (YY_BUFFER_STATE b )
{
-
+
if ( ! b )
return;
@@ -1397,7 +1419,7 @@ static void yy_load_buffer_state (void)
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
-
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
@@ -1406,7 +1428,7 @@ extern int isatty (int );
{
int oerrno = errno;
-
+
yy_flush_buffer(b );
b->yy_input_file = file;
@@ -1422,17 +1444,17 @@ extern int isatty (int );
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
+ *
*/
void yy_flush_buffer (YY_BUFFER_STATE b )
{
- if ( ! b )
+ if ( ! b )
return;
b->yy_n_chars = 0;
@@ -1457,11 +1479,11 @@ extern int isatty (int );
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
- *
+ *
*/
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
- if (new_buffer == NULL)
+ if (new_buffer == NULL)
return;
yyensure_buffer_stack();
@@ -1487,11 +1509,11 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
- *
+ *
*/
void yypop_buffer_state (void)
{
- if (!YY_CURRENT_BUFFER)
+ if (!YY_CURRENT_BUFFER)
return;
yy_delete_buffer(YY_CURRENT_BUFFER );
@@ -1511,7 +1533,7 @@ void yypop_buffer_state (void)
static void yyensure_buffer_stack (void)
{
int num_to_alloc;
-
+
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
@@ -1524,9 +1546,9 @@ static void yyensure_buffer_stack (void)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@@ -1554,13 +1576,13 @@ static void yyensure_buffer_stack (void)
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
+ *
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -1589,14 +1611,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
- *
+ *
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead.
*/
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
-
+
return yy_scan_bytes(yystr,strlen(yystr) );
}
@@ -1604,7 +1626,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
* scan from a @e copy of @a bytes.
* @param bytes the byte buffer to scan
* @param len the number of bytes in the buffer pointed to by @a bytes.
- *
+ *
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
@@ -1613,7 +1635,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) yyalloc(n );
@@ -1643,7 +1665,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
static void yy_fatal_error (yyconst char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -1667,16 +1689,16 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
- *
+ *
*/
int yyget_lineno (void)
{
-
+
return yylineno;
}
/** Get the input stream.
- *
+ *
*/
FILE *yyget_in (void)
{
@@ -1684,7 +1706,7 @@ FILE *yyget_in (void)
}
/** Get the output stream.
- *
+ *
*/
FILE *yyget_out (void)
{
@@ -1692,7 +1714,7 @@ FILE *yyget_out (void)
}
/** Get the length of the current token.
- *
+ *
*/
int yyget_leng (void)
{
@@ -1700,7 +1722,7 @@ int yyget_leng (void)
}
/** Get the current token.
- *
+ *
*/
char *yyget_text (void)
@@ -1710,18 +1732,18 @@ char *yyget_text (void)
/** Set the current line number.
* @param line_number
- *
+ *
*/
void yyset_lineno (int line_number )
{
-
+
yylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
- *
+ *
* @see yy_switch_to_buffer
*/
void yyset_in (FILE * in_str )
@@ -1775,7 +1797,7 @@ static int yy_init_globals (void)
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void)
{
-
+
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
yy_delete_buffer(YY_CURRENT_BUFFER );
@@ -1842,6 +1864,10 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
+#line 85 "sel-lex.l"
+
+
+
static char *
handle_string(void)
{
@@ -1895,4 +1921,3 @@ lex_input(char *buf, int max_size)
return n;
}
-
diff --git a/source4/heimdal/lib/hx509/sel-gram.c b/source4/heimdal/lib/hx509/sel-gram.c
index 93940464eb..5e705f19fd 100644
--- a/source4/heimdal/lib/hx509/sel-gram.c
+++ b/source4/heimdal/lib/hx509/sel-gram.c
@@ -31,6 +31,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
extern int YYPARSE_DECL();
+#line 35 ""
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -39,10 +40,12 @@ extern int YYPARSE_DECL();
#include <hx_locl.h>
+#line 45 ""
typedef union {
char *string;
struct hx_expr *expr;
} YYSTYPE;
+#line 48 ""
#define kw_TRUE 257
#define kw_FALSE 258
#define kw_AND 259
@@ -433,83 +436,109 @@ yyreduce:
switch (yyn)
{
case 1:
+#line 73 ""
{ _hx509_expr_input.expr = yystack.l_mark[0].expr; }
break;
case 2:
+#line 75 ""
{ yyval.expr = _hx509_make_expr(op_TRUE, NULL, NULL); }
break;
case 3:
+#line 76 ""
{ yyval.expr = _hx509_make_expr(op_FALSE, NULL, NULL); }
break;
case 4:
+#line 77 ""
{ yyval.expr = _hx509_make_expr(op_NOT, yystack.l_mark[0].expr, NULL); }
break;
case 5:
+#line 78 ""
{ yyval.expr = _hx509_make_expr(op_AND, yystack.l_mark[-2].expr, yystack.l_mark[0].expr); }
break;
case 6:
+#line 79 ""
{ yyval.expr = _hx509_make_expr(op_OR, yystack.l_mark[-2].expr, yystack.l_mark[0].expr); }
break;
case 7:
+#line 80 ""
{ yyval.expr = yystack.l_mark[-1].expr; }
break;
case 8:
+#line 81 ""
{ yyval.expr = _hx509_make_expr(op_COMP, yystack.l_mark[0].expr, NULL); }
break;
case 9:
+#line 84 ""
{ yyval.expr = _hx509_make_expr(expr_WORDS, yystack.l_mark[0].expr, NULL); }
break;
case 10:
+#line 85 ""
{ yyval.expr = _hx509_make_expr(expr_WORDS, yystack.l_mark[-2].expr, yystack.l_mark[0].expr); }
break;
case 11:
+#line 88 ""
{ yyval.expr = _hx509_make_expr(comp_EQ, yystack.l_mark[-3].expr, yystack.l_mark[0].expr); }
break;
case 12:
+#line 89 ""
{ yyval.expr = _hx509_make_expr(comp_NE, yystack.l_mark[-3].expr, yystack.l_mark[0].expr); }
break;
case 13:
+#line 90 ""
{ yyval.expr = _hx509_make_expr(comp_TAILEQ, yystack.l_mark[-2].expr, yystack.l_mark[0].expr); }
break;
case 14:
+#line 91 ""
{ yyval.expr = _hx509_make_expr(comp_IN, yystack.l_mark[-4].expr, yystack.l_mark[-1].expr); }
break;
case 15:
+#line 92 ""
{ yyval.expr = _hx509_make_expr(comp_IN, yystack.l_mark[-2].expr, yystack.l_mark[0].expr); }
break;
case 16:
+#line 95 ""
{ yyval.expr = yystack.l_mark[0].expr; }
break;
case 17:
+#line 96 ""
{ yyval.expr = yystack.l_mark[0].expr; }
break;
case 18:
+#line 97 ""
{ yyval.expr = yystack.l_mark[0].expr; }
break;
case 19:
+#line 98 ""
{ yyval.expr = yystack.l_mark[0].expr; }
break;
case 20:
+#line 101 ""
{ yyval.expr = _hx509_make_expr(expr_NUMBER, yystack.l_mark[0].string, NULL); }
break;
case 21:
+#line 102 ""
{ yyval.expr = _hx509_make_expr(expr_STRING, yystack.l_mark[0].string, NULL); }
break;
case 22:
+#line 104 ""
{
yyval.expr = _hx509_make_expr(expr_FUNCTION, yystack.l_mark[-3].string, yystack.l_mark[-1].expr); }
break;
case 23:
+#line 107 ""
{ yyval.expr = yystack.l_mark[-1].expr; }
break;
case 24:
+#line 110 ""
{
yyval.expr = _hx509_make_expr(expr_VAR, yystack.l_mark[-2].string, yystack.l_mark[0].expr); }
break;
case 25:
+#line 112 ""
{
yyval.expr = _hx509_make_expr(expr_VAR, yystack.l_mark[0].string, NULL); }
break;
+#line 541 ""
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
diff --git a/source4/heimdal/lib/hx509/sel-lex.c b/source4/heimdal/lib/hx509/sel-lex.c
index e0efbf4e58..703747217f 100644
--- a/source4/heimdal/lib/hx509/sel-lex.c
+++ b/source4/heimdal/lib/hx509/sel-lex.c
@@ -468,6 +468,8 @@ int yy_flex_debug = 0;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
+#line 1 "sel-lex.l"
+#line 2 "sel-lex.l"
/*
* Copyright (c) 2004, 2008 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
@@ -533,6 +535,8 @@ struct hx_expr_input _hx509_expr_input;
#undef ECHO
+#line 538 ""
+
#define INITIAL 0
#ifndef YY_NO_UNISTD_H
@@ -713,6 +717,11 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
+#line 68 "sel-lex.l"
+
+
+#line 723 ""
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -796,30 +805,37 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
+#line 70 "sel-lex.l"
{ return kw_TRUE; }
YY_BREAK
case 2:
YY_RULE_SETUP
+#line 71 "sel-lex.l"
{ return kw_FALSE; }
YY_BREAK
case 3:
YY_RULE_SETUP
+#line 72 "sel-lex.l"
{ return kw_AND; }
YY_BREAK
case 4:
YY_RULE_SETUP
+#line 73 "sel-lex.l"
{ return kw_OR; }
YY_BREAK
case 5:
YY_RULE_SETUP
+#line 74 "sel-lex.l"
{ return kw_IN; }
YY_BREAK
case 6:
YY_RULE_SETUP
+#line 75 "sel-lex.l"
{ return kw_TAILMATCH; }
YY_BREAK
case 7:
YY_RULE_SETUP
+#line 77 "sel-lex.l"
{
yylval.string = strdup ((const char *)yytext);
return IDENTIFIER;
@@ -827,25 +843,31 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
+#line 81 "sel-lex.l"
{ yylval.string = handle_string(); return STRING; }
YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
+#line 82 "sel-lex.l"
{ ++lineno; }
YY_BREAK
case 10:
YY_RULE_SETUP
+#line 83 "sel-lex.l"
{ return *yytext; }
YY_BREAK
case 11:
YY_RULE_SETUP
+#line 84 "sel-lex.l"
;
YY_BREAK
case 12:
YY_RULE_SETUP
+#line 85 "sel-lex.l"
ECHO;
YY_BREAK
+#line 870 ""
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1843,6 +1865,10 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
+#line 85 "sel-lex.l"
+
+
+
static char *
handle_string(void)
{