Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
0389281f
Commit
0389281f
authored
Nov 03, 2010
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
newer version of flex
parent
f6712e6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1340 additions
and
734 deletions
+1340
-734
libasn1parser/asn1p_l.c
libasn1parser/asn1p_l.c
+1340
-734
No files found.
libasn1parser/asn1p_l.c
View file @
0389281f
#line 2 "asn1p_l.c"
#line 4 "asn1p_l.c"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
/* %not-for-header */
/* %if-c-only */
/* %if-not-reentrant */
#define yy_create_buffer asn1p__create_buffer
#define yy_delete_buffer asn1p__delete_buffer
#define yy_scan_buffer asn1p__scan_buffer
#define yy_scan_string asn1p__scan_string
#define yy_scan_bytes asn1p__scan_bytes
#define yy_flex_debug asn1p__flex_debug
#define yy_init_buffer asn1p__init_buffer
#define yy_flush_buffer asn1p__flush_buffer
...
...
@@ -11,85 +20,149 @@
#define yyin asn1p_in
#define yyleng asn1p_leng
#define yylex asn1p_lex
#define yylineno asn1p_lineno
#define yyout asn1p_out
#define yyrestart asn1p_restart
#define yytext asn1p_text
#define yylineno asn1p_lineno
#define yywrap asn1p_wrap
#define yyalloc asn1p_alloc
#define yyrealloc asn1p_realloc
#define yyfree asn1p_free
#line 20 "asn1p_l.c"
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
* $FreeBSD: src/usr.bin/lex/flex.skl,v 1.8 2004/01/06 19:03:44 nectar Exp $
*/
#if defined(__FreeBSD__)
#include <sys/cdefs.h>
#else
#define __unused
#endif
/* %endif */
/* %endif */
/* %ok-for-header */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* %if-c++-only */
/* %endif */
/* %if-c-only */
/* %endif */
/* %if-c-only */
/* %endif */
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
/* %if-c-only */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
/* %endif */
/* %if-tables-serialization */
/* %endif */
/* end standard C headers. */
/* %if-c-or-c++ */
/* flex integer type definitions */
#ifndef FLEXINT_H
#define FLEXINT_H
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
#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.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#include <inttypes.h>
typedef
int8_t
flex_int8_t
;
typedef
uint8_t
flex_uint8_t
;
typedef
int16_t
flex_int16_t
;
typedef
uint16_t
flex_uint16_t
;
typedef
int32_t
flex_int32_t
;
typedef
uint32_t
flex_uint32_t
;
#else
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
short
int
flex_uint16_t
;
typedef
unsigned
int
flex_uint32_t
;
#endif
/* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
#endif
/* ! FLEXINT_H */
#ifdef __cplusplus
/* %endif */
#include <stdlib.h>
#include <unistd.h>
/* %if-c++-only */
/* %endif */
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else
/* ! __cplusplus */
#if __STDC__
/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif
/*
__STDC__
*/
#endif
/*
defined (__STDC__)
*/
#endif
/* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* %not-for-header */
/* Returned upon end-of-file. */
#define YY_NULL 0
/* %ok-for-header */
/* %not-for-header */
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
...
...
@@ -97,79 +170,110 @@
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* %ok-for-header */
/* %if-reentrant */
/* %endif */
/* %if-not-reentrant */
/* %endif */
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN
yy_start
= 1 + 2 *
#define BEGIN
(yy_start)
= 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((
yy_start
- 1) / 2)
#define YY_START ((
(yy_start)
- 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE
yyrestart( yyin
)
#define YY_NEW_FILE
asn1p_restart(asn1p_in
)
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
*/
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef
struct
yy_buffer_state
*
YY_BUFFER_STATE
;
#endif
extern
int
yyleng
;
extern
FILE
*
yyin
,
*
yyout
;
/* %if-not-reentrant */
extern
int
asn1p_leng
;
/* %endif */
/* %if-c-only */
/* %if-not-reentrant */
extern
FILE
*
asn1p_in
,
*
asn1p_out
;
/* %endif */
/* %endif */
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
* access to the local variable yy_act. Since yyless() is a macro, it would break
* existing scanners that call yyless() from OUTSIDE asn1p_lex.
* One obvious solution it to make yy_act a global. I tried that, and saw
* a 5% performance hit in a non-asn1p_lineno scanner, because yy_act is
* normally declared as a register variable-- so it is not worth it.
*/
#define YY_LESS_LINENO(n) \
do { \
int yyl;\
for ( yyl = n; yyl < asn1p_leng; ++yyl )\
if ( asn1p_text[yyl] == '\n' )\
--asn1p_lineno;\
}while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */
\
*yy_cp = yy_hold_char; \
/* Undo effects of setting up asn1p_text. */
\
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n
- YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION;
/* set up
yy
text again */
\
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg
- YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION;
/* set up
asn1p_
text again */
\
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* 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).
*/
typedef
unsigned
int
yy_size_t
;
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef
size_t
yy_size_t
;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct
yy_buffer_state
{
/* %if-c-only */
FILE
*
yy_input_file
;
/* %endif */
/* %if-c++-only */
/* %endif */
char
*
yy_ch_buf
;
/* input buffer */
char
*
yy_buf_pos
;
/* current position in input buffer */
...
...
@@ -203,12 +307,16 @@ struct yy_buffer_state
*/
int
yy_at_bol
;
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.
*/
int
yy_fill_buffer
;
int
yy_buffer_status
;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
...
...
@@ -218,110 +326,167 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via
yy
restart()), so that the user can continue scanning by
* just pointing
yy
in at a new input file.
* (via
asn1p_
restart()), so that the user can continue scanning by
* just pointing
asn1p_
in at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
#endif
/* !YY_STRUCT_YY_BUFFER_STATE */
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
/* %if-not-reentrant */
/* Stack of input buffers. */
static
size_t
yy_buffer_stack_top
=
0
;
/**< index of top of stack. */
static
size_t
yy_buffer_stack_max
=
0
;
/**< capacity of stack. */
static
YY_BUFFER_STATE
*
yy_buffer_stack
=
0
;
/**< Stack as an array. */
/* %endif */
/* %ok-for-header */
static
YY_BUFFER_STATE
yy_current_buffer
=
0
;
/* %endif */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*
* Returns the top of the stack, or NULL.
*/
#define YY_CURRENT_BUFFER yy_current_buffer
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
/* yy_hold_char holds the character lost when yytext is formed. */
static
char
yy_hold_char
;
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
static
int
yy_n_chars
;
/* number of characters read into yy_ch_buf
*/
/* %if-c-only Standard (non-C++) definition
*/
/* %if-not-reentrant */
/* %not-for-header */
int
yyleng
;
/* yy_hold_char holds the character lost when asn1p_text is formed. */
static
char
yy_hold_char
;
static
int
yy_n_chars
;
/* number of characters read into yy_ch_buf */
int
asn1p_leng
;
/* Points to current character in buffer. */
static
char
*
yy_c_buf_p
=
(
char
*
)
0
;
static
int
yy_init
=
1
;
/* whether we need to initialize */
static
int
yy_init
=
0
;
/* whether we need to initialize */
static
int
yy_start
=
0
;
/* start state number */
/* Flag which is used to allow
yy
wrap()'s to do buffer switches
* instead of setting up a fresh
yy
in. A bit of a hack ...
/* Flag which is used to allow
asn1p_
wrap()'s to do buffer switches
* instead of setting up a fresh
asn1p_
in. A bit of a hack ...
*/
static
int
yy_did_buffer_switch_on_eof
;
/* %ok-for-header */
void
yyrestart
YY_PROTO
((
FILE
*
input_file
));
/* %endif */
void
yy_switch_to_buffer
YY_PROTO
((
YY_BUFFER_STATE
new_buffer
)
);
void
yy_load_buffer_state
YY_PROTO
((
void
)
);
YY_BUFFER_STATE
yy_create_buffer
YY_PROTO
((
FILE
*
file
,
int
size
)
);
void
yy_delete_buffer
YY_PROTO
((
YY_BUFFER_STATE
b
)
);
void
yy_init_buffer
YY_PROTO
((
YY_BUFFER_STATE
b
,
FILE
*
file
)
);
void
yy_flush_buffer
YY_PROTO
((
YY_BUFFER_STATE
b
)
);
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
void
asn1p_restart
(
FILE
*
input_file
);
void
asn1p__switch_to_buffer
(
YY_BUFFER_STATE
new_buffer
);
YY_BUFFER_STATE
asn1p__create_buffer
(
FILE
*
file
,
int
size
);
void
asn1p__delete_buffer
(
YY_BUFFER_STATE
b
);
void
asn1p__flush_buffer
(
YY_BUFFER_STATE
b
);
void
asn1p_push_buffer_state
(
YY_BUFFER_STATE
new_buffer
);
void
asn1p_pop_buffer_state
(
void
);
YY_BUFFER_STATE
yy_scan_buffer
YY_PROTO
((
char
*
base
,
yy_size_t
size
)
);
YY_BUFFER_STATE
yy_scan_string
YY_PROTO
((
yyconst
char
*
yy_str
)
);
YY_BUFFER_STATE
yy_scan_bytes
YY_PROTO
((
yyconst
char
*
bytes
,
int
len
)
);
static
void
asn1p_ensure_buffer_stack
(
void
);
static
void
asn1p__load_buffer_state
(
void
);
static
void
asn1p__init_buffer
(
YY_BUFFER_STATE
b
,
FILE
*
file
);
static
void
*
yy_flex_alloc
YY_PROTO
((
yy_size_t
));
static
void
*
yy_flex_realloc
YY_PROTO
((
void
*
,
yy_size_t
))
__unused
;
static
void
yy_flex_free
YY_PROTO
((
void
*
));
#define YY_FLUSH_BUFFER asn1p__flush_buffer(YY_CURRENT_BUFFER )
#define yy_new_buffer yy_create_buffer
YY_BUFFER_STATE
asn1p__scan_buffer
(
char
*
base
,
yy_size_t
size
);
YY_BUFFER_STATE
asn1p__scan_string
(
yyconst
char
*
yy_str
);
YY_BUFFER_STATE
asn1p__scan_bytes
(
yyconst
char
*
bytes
,
int
len
);
/* %endif */
void
*
asn1p_alloc
(
yy_size_t
);
void
*
asn1p_realloc
(
void
*
,
yy_size_t
);
void
asn1p_free
(
void
*
);
#define yy_new_buffer asn1p__create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
if ( ! YY_CURRENT_BUFFER ){ \
asn1p_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
asn1p__create_buffer(asn1p_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
if ( ! YY_CURRENT_BUFFER ){\
asn1p_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
asn1p__create_buffer(asn1p_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
#define YY_USES_REJECT
/* %% [1.0] asn1p_text/asn1p_in/asn1p_out/yy_state_type/asn1p_lineno etc. def's & init go here */
/* Begin user sect3 */
#define
yywrap(
) 1
#define
asn1p_wrap(n
) 1
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
typedef
unsigned
char
YY_CHAR
;
FILE
*
yyin
=
(
FILE
*
)
0
,
*
yyout
=
(
FILE
*
)
0
;
FILE
*
asn1p_in
=
(
FILE
*
)
0
,
*
asn1p_out
=
(
FILE
*
)
0
;
typedef
int
yy_state_type
;
#define FLEX_DEBUG
extern
int
yylineno
;
int
yylineno
=
1
;
extern
char
*
yytext
;
#define yytext_ptr yytext
extern
int
asn1p_lineno
;
int
asn1p_lineno
=
1
;
extern
char
*
asn1p_text
;
#define yytext_ptr asn1p_text
/* %if-c-only Standard (non-C++) definition */
static
yy_state_type
yy_get_previous_state
YY_PROTO
((
void
));
static
yy_state_type
yy_try_NUL_trans
YY_PROTO
((
yy_state_type
current_state
));
static
int
yy_get_next_buffer
YY_PROTO
((
void
));
static
void
yy_fatal_error
YY_PROTO
((
yyconst
char
msg
[]
));
static
yy_state_type
yy_get_previous_state
(
void
);
static
yy_state_type
yy_try_NUL_trans
(
yy_state_type
current_state
);
static
int
yy_get_next_buffer
(
void
);
static
void
yy_fatal_error
(
yyconst
char
msg
[]
);
/* %endif */
/* Done after the current pattern has been matched and before the
* corresponding action - sets up
yy
text.
* corresponding action - sets up
asn1p_
text.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
(yytext_ptr) = yy_bp; \
/* %% [2.0] code to fiddle asn1p_text and asn1p_leng for yymore() goes here \ */
\
asn1p_leng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
/* %% [3.0] code to copy yytext_ptr to asn1p_text[] goes here, if %array \ */
\
(yy_c_buf_p) = yy_cp;
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 138
#define YY_END_OF_BUFFER 139
static
yyconst
short
int
yy_acclist
[
1264
]
=
/* This struct is not used in this scanner,
but its presence is necessary. */
struct
yy_trans_info
{
flex_int32_t
yy_verify
;
flex_int32_t
yy_nxt
;
};
static
yyconst
flex_int16_t
yy_acclist
[
1264
]
=
{
0
,
139
,
137
,
138
,
132
,
137
,
138
,
132
,
138
,
135
,
137
,
138
,
19
,
137
,
138
,
135
,
137
,
138
,
137
,
138
,
135
,
...
...
@@ -464,7 +629,7 @@ static yyconst short int yy_acclist[1264] =
23
,
25
,
4
}
;
static
yyconst
short
in
t
yy_accept
[
743
]
=
static
yyconst
flex_int16_
t
yy_accept
[
743
]
=
{
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
4
,
7
,
...
...
@@ -550,7 +715,7 @@ static yyconst short int yy_accept[743] =
1264
,
1264
}
;
static
yyconst
in
t
yy_ec
[
256
]
=
static
yyconst
flex_int32_
t
yy_ec
[
256
]
=
{
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
3
,
4
,
4
,
5
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
...
...
@@ -582,7 +747,7 @@ static yyconst int yy_ec[256] =
1
,
1
,
1
,
1
,
1
}
;
static
yyconst
in
t
yy_meta
[
84
]
=
static
yyconst
flex_int32_
t
yy_meta
[
84
]
=
{
0
,
1
,
2
,
3
,
4
,
4
,
1
,
5
,
1
,
6
,
1
,
1
,
1
,
1
,
7
,
1
,
1
,
8
,
8
,
8
,
8
,
...
...
@@ -595,7 +760,7 @@ static yyconst int yy_meta[84] =
12
,
1
,
13
}
;
static
yyconst
short
in
t
yy_base
[
768
]
=
static
yyconst
flex_int16_
t
yy_base
[
768
]
=
{
0
,
0
,
0
,
81
,
84
,
87
,
99
,
94
,
96
,
93
,
108
,
91
,
103
,
186
,
269
,
352
,
0
,
1657
,
1646
,
130
,
138
,
...
...
@@ -683,7 +848,7 @@ static yyconst short int yy_base[768] =
4444
,
4448
,
4452
,
4463
,
4470
,
4481
,
4493
}
;
static
yyconst
short
in
t
yy_def
[
768
]
=
static
yyconst
flex_int16_
t
yy_def
[
768
]
=
{
0
,
741
,
1
,
742
,
742
,
742
,
742
,
743
,
743
,
744
,
744
,
745
,
745
,
746
,
746
,
741
,
15
,
741
,
741
,
741
,
741
,
...
...
@@ -771,7 +936,7 @@ static yyconst short int yy_def[768] =
741
,
741
,
741
,
741
,
741
,
741
,
741
}
;
static
yyconst
short
in
t
yy_nxt
[
4591
]
=
static
yyconst
flex_int16_
t
yy_nxt
[
4591
]
=
{
0
,
18
,
19
,
20
,
19
,
19
,
21
,
22
,
23
,
24
,
25
,
18
,
26
,
25
,
27
,
28
,
29
,
30
,
31
,
31
,
31
,
...
...
@@ -1279,7 +1444,7 @@ static yyconst short int yy_nxt[4591] =
741
,
741
,
741
,
741
,
741
,
741
,
741
,
741
,
741
,
741
}
;
static
yyconst
short
in
t
yy_chk
[
4591
]
=
static
yyconst
flex_int16_
t
yy_chk
[
4591
]
=
{
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
...
...
@@ -1787,10 +1952,21 @@ static yyconst short int yy_chk[4591] =
741
,
741
,
741
,
741
,
741
,
741
,
741
,
741
,
741
,
741
}
;
extern
int
yy_flex_debug
;
int
yy_flex_debug
=
1
;
static
yyconst
short
int
yy_rule_linenum
[
138
]
=
/* Table of booleans, true if rule could match eol. */
static
yyconst
flex_int32_t
yy_rule_can_match_eol
[
139
]
=
{
0
,
1
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
1
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
0
,
0
,
};
extern
int
asn1p__flex_debug
;
int
asn1p__flex_debug
=
1
;
static
yyconst
flex_int16_t
yy_rule_linenum
[
138
]
=
{
0
,
96
,
97
,
99
,
102
,
104
,
107
,
109
,
110
,
111
,
114
,
116
,
117
,
118
,
130
,
137
,
144
,
150
,
159
,
167
,
175
,
...
...
@@ -1809,22 +1985,22 @@ static yyconst short int yy_rule_linenum[138] =
428
,
441
,
444
,
469
,
513
,
515
,
526
}
;
static
yy_state_type
yy_state_buf
[
YY_BUF_SIZE
+
2
],
*
yy_state_ptr
;
static
yy_state_type
*
yy_state_buf
=
0
,
*
yy_state_ptr
=
0
;
static
char
*
yy_full_match
;
static
int
yy_lp
;
#define REJECT \
{ \
*yy_cp =
yy_hold_char;
/* undo effects of setting up yy
text */
\
yy_cp =
yy_full_match
;
/* restore poss. backed-over text */
\
++
yy_lp
; \
*yy_cp =
(yy_hold_char);
/* undo effects of setting up asn1p_
text */
\
yy_cp =
(yy_full_match)
;
/* restore poss. backed-over text */
\
++
(yy_lp)
; \
goto find_rule; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char
*
yy
text
;
char
*
asn1p_
text
;
#line 1 "asn1p_l.l"
#define INITIAL 0
#line 2 "asn1p_l.l"
#include <string.h>
...
...
@@ -1843,7 +2019,7 @@ void asn1p_lexer_hack_push_encoding_control(void); /* Used in .y */
fprintf(stderr, \
"lexer error at line %d, " \
"text \"%s\"\n", \
yylineno, yy
text); \
asn1p_lineno, asn1p_
text); \
exit(1); \
} while(0)
...
...
@@ -1893,28 +2069,87 @@ static double _lex_atod(const char *ptr);
asn1p_lval.tv_opaque.len = (tlen) + prev_len; \
} while(0)
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_INPUT 1
#define YY_STACK_USED 1
/* Performance penalty is OK */
/* Controlled from within application */
#define dash_comment 1
#define idash_comment 2
#define cpp_comment 3
#define quoted 4
#define opaque 5
#define encoding_control 6
#define with_syntax 7
/* Newline */
/* White-space */
#line 1918 "asn1p_l.c"
#line 2085 "asn1p_l.c"
#define INITIAL 0
#define dash_comment 1
#define idash_comment 2
#define cpp_comment 3
#define quoted 4
#define opaque 5
#define encoding_control 6
#define with_syntax 7
#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.
*/
/* %if-c-only */
#include <unistd.h>
/* %endif */
/* %if-c++-only */
/* %endif */
#endif
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
/* %if-c-only Reentrant structure and macros (non-C++). */
/* %if-reentrant */
/* %if-c-only */
static
int
yy_init_globals
(
void
);
/* %endif */
/* %if-reentrant */
/* %endif */
/* %endif End reentrant structures and macros. */
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int
asn1p_lex_destroy
(
void
);
int
asn1p_get_debug
(
void
);
void
asn1p_set_debug
(
int
debug_flag
);
YY_EXTRA_TYPE
asn1p_get_extra
(
void
);
void
asn1p_set_extra
(
YY_EXTRA_TYPE
user_defined
);
FILE
*
asn1p_get_in
(
void
);
void
asn1p_set_in
(
FILE
*
in_str
);
FILE
*
asn1p_get_out
(
void
);
void
asn1p_set_out
(
FILE
*
out_str
);
int
asn1p_get_leng
(
void
);
char
*
asn1p_get_text
(
void
);
int
asn1p_get_lineno
(
void
);
void
asn1p_set_lineno
(
int
line_number
);
/* %if-bison-bridge */
/* %endif */
/* Macros after this point can all be overridden by user definitions in
* section 1.
...
...
@@ -1922,66 +2157,55 @@ static double _lex_atod(const char *ptr);
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern
"C"
int
yywrap
YY_PROTO
((
void
)
);
extern
"C"
int
asn1p_wrap
(
void
);
#else
extern
int
yywrap
YY_PROTO
((
void
)
);
extern
int
asn1p_wrap
(
void
);
#endif
#endif
#ifndef YY_NO_UNPUT
static
void
yyunput
YY_PROTO
((
int
c
,
char
*
buf_ptr
));
#endif
/* %not-for-header */
static
void
yyunput
(
int
c
,
char
*
buf_ptr
);
/* %ok-for-header */
/* %endif */
#ifndef yytext_ptr
static
void
yy_flex_strncpy
YY_PROTO
((
char
*
,
yyconst
char
*
,
int
)
);
static
void
yy_flex_strncpy
(
char
*
,
yyconst
char
*
,
int
);
#endif
#ifdef YY_NEED_STRLEN
static
int
yy_flex_strlen
YY_PROTO
((
yyconst
char
*
)
);
static
int
yy_flex_strlen
(
yyconst
char
*
);
#endif
#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
#ifdef __cplusplus
static
int
yyinput
YY_PROTO
((
void
)
);
static
int
yyinput
(
void
);
#else
static
int
input
YY_PROTO
((
void
));
#endif
static
int
input
(
void
);
#endif
/* %ok-for-header */
#if YY_STACK_USED
static
int
yy_start_stack_ptr
=
0
;
static
int
yy_start_stack_depth
=
0
;
static
int
*
yy_start_stack
=
0
;
#ifndef YY_NO_PUSH_STATE
static
void
yy_push_state
YY_PROTO
((
int
new_state
));
#endif
#ifndef YY_NO_POP_STATE
static
void
yy_pop_state
YY_PROTO
((
void
));
#endif
#ifndef YY_NO_TOP_STATE
static
int
yy_top_state
YY_PROTO
((
void
));
/* %endif */
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
/* %if-c-only */
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
static
int
yy_start_stack_ptr
=
0
;
static
int
yy_start_stack_depth
=
0
;
static
int
*
yy_start_stack
=
NULL
;
static
void
yy_push_state
(
int
new_state
);
static
void
yy_pop_state
(
void
);
static
int
yy_top_state
(
void
);
/* %endif */
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
...
...
@@ -1989,12 +2213,15 @@ YY_MALLOC_DECL
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* %if-c-only Standard (non-C++) definition */
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#define ECHO fwrite( asn1p_text, asn1p_leng, 1, asn1p_out )
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
...
...
@@ -2002,21 +2229,38 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */
\
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*', n; \
int c = '*'; \
int n; \
for ( n = 0; n < max_size && \
(c = getc(
yy
in )) != EOF && c != '\n'; ++n ) \
(c = getc(
asn1p_
in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror(
yy
in ) ) \
if ( c == EOF && ferror(
asn1p_
in ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
else \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, asn1p_in))==0 && ferror(asn1p_in)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(asn1p_in); \
} \
}\
\
/* %if-c++-only C++ definition \ */
\
/* %endif */
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
...
...
@@ -2034,17 +2278,42 @@ YY_MALLOC_DECL
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
/* %if-c-only */
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
/* %endif */
/* %if-c++-only */
/* %endif */
#endif
/* %if-tables-serialization structures and prototypes */
/* %not-for-header */
/* %ok-for-header */
/* %not-for-header */
/* %tables-yydmap generated elements */
/* %endif */
/* end tables serialization structures and prototypes */
/* %ok-for-header */
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
#define YY_DECL_IS_OURS 1
/* %if-c-only Standard (non-C++) definition */
extern
int
asn1p_lex
(
void
);
#define YY_DECL int asn1p_lex (void)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif
/* !YY_DECL */
/* Code executed at the beginning of each rule, after
yytext and yy
leng
/* Code executed at the beginning of each rule, after
asn1p_text and asn1p_
leng
* have been set up.
*/
#ifndef YY_USER_ACTION
...
...
@@ -2056,59 +2325,85 @@ YY_MALLOC_DECL
#define YY_BREAK break;
#endif
/* %% [6.0] YY_RULE_SETUP definition goes here */
#define YY_RULE_SETUP \
YY_USER_ACTION
/* %not-for-header */
/** The main scanner function which does all the work.
*/
YY_DECL
{
{
register
yy_state_type
yy_current_state
;
register
char
*
yy_cp
,
*
yy_bp
;
register
int
yy_act
;
/* %% [7.0] user's declarations go here */
#line 94 "asn1p_l.l"
#line 2
072
"asn1p_l.c"
#line 2
347
"asn1p_l.c"
if
(
yy_init
)
if
(
!
(
yy_init
)
)
{
yy_init
=
0
;
(
yy_init
)
=
1
;
#ifdef YY_USER_INIT
YY_USER_INIT
;
#endif
if
(
!
yy_start
)
yy_start
=
1
;
/* first start state */
if
(
!
yyin
)
yyin
=
stdin
;
if
(
!
yyout
)
yyout
=
stdout
;
if
(
!
yy_current_buffer
)
yy_current_buffer
=
yy_create_buffer
(
yyin
,
YY_BUF_SIZE
);
/* Create the reject buffer large enough to save one state per allowed character. */
if
(
!
(
yy_state_buf
)
)
(
yy_state_buf
)
=
(
yy_state_type
*
)
asn1p_alloc
(
YY_STATE_BUF_SIZE
);
if
(
!
(
yy_state_buf
)
)
YY_FATAL_ERROR
(
"out of dynamic memory in asn1p_lex()"
);
if
(
!
(
yy_start
)
)
(
yy_start
)
=
1
;
/* first start state */
if
(
!
asn1p_in
)
/* %if-c-only */
asn1p_in
=
stdin
;
/* %endif */
/* %if-c++-only */
/* %endif */
if
(
!
asn1p_out
)
/* %if-c-only */
asn1p_out
=
stdout
;
/* %endif */
/* %if-c++-only */
/* %endif */
if
(
!
YY_CURRENT_BUFFER
)
{
asn1p_ensure_buffer_stack
();
YY_CURRENT_BUFFER_LVALUE
=
asn1p__create_buffer
(
asn1p_in
,
YY_BUF_SIZE
);
}
yy_load_buffer_state
(
);
asn1p__load_buffer_state
(
);
}
while
(
1
)
/* loops until end-of-file is reached */
{
yy_cp
=
yy_c_buf_p
;
/* %% [8.0] yymore()-related code goes here */
yy_cp
=
(
yy_c_buf_p
);
/* Support of
yy
text. */
*
yy_cp
=
yy_hold_char
;
/* Support of
asn1p_
text. */
*
yy_cp
=
(
yy_hold_char
)
;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp
=
yy_cp
;
yy_current_state
=
yy_start
;
yy_state_ptr
=
yy_state_buf
;
*
yy_state_ptr
++
=
yy_current_state
;
/* %% [9.0] code to set up and find next match goes here */
yy_current_state
=
(
yy_start
);
(
yy_state_ptr
)
=
(
yy_state_buf
);
*
(
yy_state_ptr
)
++
=
yy_current_state
;
yy_match:
do
{
...
...
@@ -2120,53 +2415,58 @@ yy_match:
yy_c
=
yy_meta
[(
unsigned
int
)
yy_c
];
}
yy_current_state
=
yy_nxt
[
yy_base
[
yy_current_state
]
+
(
unsigned
int
)
yy_c
];
*
yy_state_ptr
++
=
yy_current_state
;
*
(
yy_state_ptr
)
++
=
yy_current_state
;
++
yy_cp
;
}
while
(
yy_
base
[
yy_current_state
]
!=
4507
);
while
(
yy_
current_state
!=
741
);
yy_find_action:
yy_current_state
=
*--
yy_state_ptr
;
yy_
lp
=
yy_accept
[
yy_current_state
]
;
goto
find_rule
;
/* avoid `defined but not used' warning */
/* %% [10.0] code to find the action number goes here */
yy_
current_state
=
*--
(
yy_state_ptr
)
;
(
yy_lp
)
=
yy_accept
[
yy_current_state
];
find_rule:
/* we branch to this label when backing up */
for
(
;
;
)
/* until we find what rule we matched */
{
if
(
yy_lp
&&
yy_lp
<
yy_accept
[
yy_current_state
+
1
]
)
if
(
(
yy_lp
)
&&
(
yy_lp
)
<
yy_accept
[
yy_current_state
+
1
]
)
{
yy_act
=
yy_acclist
[
yy_lp
];
yy_act
=
yy_acclist
[
(
yy_lp
)
];
{
yy_full_match
=
yy_cp
;
(
yy_full_match
)
=
yy_cp
;
break
;
}
}
--
yy_cp
;
yy_current_state
=
*--
yy_state_ptr
;
yy_lp
=
yy_accept
[
yy_current_state
];
yy_current_state
=
*--
(
yy_state_ptr
)
;
(
yy_lp
)
=
yy_accept
[
yy_current_state
];
}
YY_DO_BEFORE_ACTION
;
if
(
yy_act
!=
YY_END_OF_BUFFER
)
/* %% [11.0] code for asn1p_lineno update goes here */
if
(
yy_act
!=
YY_END_OF_BUFFER
&&
yy_rule_can_match_eol
[
yy_act
]
)
{
int
yyl
;
for
(
yyl
=
0
;
yyl
<
yyleng
;
++
yyl
)
if
(
yytext
[
yyl
]
==
'\n'
)
++
yylineno
;
for
(
yyl
=
0
;
yyl
<
asn1p_leng
;
++
yyl
)
if
(
asn1p_text
[
yyl
]
==
'\n'
)
asn1p_lineno
++
;
;
}
do_action:
/* This label is used only to access EOF actions. */
if
(
yy_flex_debug
)
/* %% [12.0] debug code goes here */
if
(
asn1p__flex_debug
)
{
if
(
yy_act
==
0
)
fprintf
(
stderr
,
"--scanner backing up
\n
"
);
else
if
(
yy_act
<
138
)
fprintf
(
stderr
,
"--accepting rule at line %d (
\"
%s
\"
)
\n
"
,
yy_rule_linenum
[
yy_act
],
yy
text
);
fprintf
(
stderr
,
"--accepting rule at line %
l
d (
\"
%s
\"
)
\n
"
,
(
long
)
yy_rule_linenum
[
yy_act
],
asn1p_
text
);
else
if
(
yy_act
==
138
)
fprintf
(
stderr
,
"--accepting default rule (
\"
%s
\"
)
\n
"
,
yy
text
);
asn1p_
text
);
else
if
(
yy_act
==
139
)
fprintf
(
stderr
,
"--(end of buffer or a NUL)
\n
"
);
else
...
...
@@ -2175,18 +2475,20 @@ do_action: /* This label is used only to access EOF actions. */
switch
(
yy_act
)
{
/* beginning of action switch */
/* %% [13.0] actions go here */
case
1
:
*
yy_cp
=
yy_hold_char
;
/* undo effects of setting up yytext */
yy_c_buf_p
=
yy_cp
-=
1
;
YY_DO_BEFORE_ACTION
;
/* set up yytext again */
/* rule 1 can match eol */
*
yy_cp
=
(
yy_hold_char
);
/* undo effects of setting up asn1p_text */
(
yy_c_buf_p
)
=
yy_cp
-=
1
;
YY_DO_BEFORE_ACTION
;
/* set up asn1p_text again */
YY_RULE_SETUP
#line 96 "asn1p_l.l"
/* Immediately terminated long comment */
YY_BREAK
case
2
:
*
yy_cp
=
yy_hold_char
;
/* undo effects of setting up yy
text */
yy_c_buf_p
=
yy_cp
-=
1
;
YY_DO_BEFORE_ACTION
;
/* set up
yy
text again */
*
yy_cp
=
(
yy_hold_char
);
/* undo effects of setting up asn1p_
text */
(
yy_c_buf_p
)
=
yy_cp
-=
1
;
YY_DO_BEFORE_ACTION
;
/* set up
asn1p_
text again */
YY_RULE_SETUP
#line 97 "asn1p_l.l"
yy_push_state
(
idash_comment
);
/* Incorrect, but acceptable */
...
...
@@ -2210,6 +2512,7 @@ yy_push_state(dash_comment);
YY_BREAK
case
6
:
/* rule 6 can match eol */
YY_RULE_SETUP
#line 107 "asn1p_l.l"
yy_pop_state
();
...
...
@@ -2237,6 +2540,7 @@ yy_push_state(cpp_comment);
YY_BREAK
case
11
:
/* rule 11 can match eol */
YY_RULE_SETUP
#line 116 "asn1p_l.l"
/* Eat */
...
...
@@ -2264,8 +2568,8 @@ YY_RULE_SETUP
#line 130 "asn1p_l.l"
{
yy_push_state
(
opaque
);
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
yy
text
);
asn1p_lval
.
tv_opaque
.
len
=
yy
leng
;
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
asn1p_
text
);
asn1p_lval
.
tv_opaque
.
len
=
asn1p_
leng
;
return
TOK_opaque
;
}
YY_BREAK
...
...
@@ -2274,17 +2578,18 @@ YY_RULE_SETUP
#line 137 "asn1p_l.l"
{
yy_pop_state
();
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
yy
text
);
asn1p_lval
.
tv_opaque
.
len
=
yy
leng
;
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
asn1p_
text
);
asn1p_lval
.
tv_opaque
.
len
=
asn1p_
leng
;
return
TOK_opaque
;
}
YY_BREAK
case
16
:
/* rule 16 can match eol */
YY_RULE_SETUP
#line 144 "asn1p_l.l"
{
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
yy
text
);
asn1p_lval
.
tv_opaque
.
len
=
yy
leng
;
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
asn1p_
text
);
asn1p_lval
.
tv_opaque
.
len
=
asn1p_
leng
;
return
TOK_opaque
;
}
YY_BREAK
...
...
@@ -2296,7 +2601,7 @@ YY_RULE_SETUP
"ASN.1 Parser syncronization failure: "
"
\"
%s
\"
at line %d must not appear "
"inside value definition
\n
"
,
yytext
,
yy
lineno
);
asn1p_text
,
asn1p_
lineno
);
return
-
1
;
}
YY_BREAK
...
...
@@ -2304,19 +2609,20 @@ case 18:
YY_RULE_SETUP
#line 159 "asn1p_l.l"
{
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
yy
text
);
asn1p_lval
.
tv_opaque
.
len
=
yy
leng
;
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
asn1p_
text
);
asn1p_lval
.
tv_opaque
.
len
=
asn1p_
leng
;
return
TOK_opaque
;
}
YY_BREAK
case
19
:
/* rule 19 can match eol */
YY_RULE_SETUP
#line 167 "asn1p_l.l"
{
asn1p_lval
.
tv_opaque
.
buf
=
0
;
asn1p_lval
.
tv_opaque
.
len
=
0
;
QAPPEND
(
yytext
+
1
,
yy
leng
-
1
);
QAPPEND
(
asn1p_text
+
1
,
asn1p_
leng
-
1
);
yy_push_state
(
quoted
);
}
YY_BREAK
...
...
@@ -2324,12 +2630,13 @@ YY_RULE_SETUP
case
20
:
YY_RULE_SETUP
#line 175 "asn1p_l.l"
{
QAPPEND
(
yytext
,
yy
leng
-
1
);
}
/* Add a single quote */
{
QAPPEND
(
asn1p_text
,
asn1p_
leng
-
1
);
}
/* Add a single quote */
YY_BREAK
case
21
:
/* rule 21 can match eol */
YY_RULE_SETUP
#line 176 "asn1p_l.l"
{
QAPPEND
(
yytext
,
yy
leng
);
}
{
QAPPEND
(
asn1p_text
,
asn1p_
leng
);
}
YY_BREAK
case
22
:
YY_RULE_SETUP
...
...
@@ -2337,10 +2644,10 @@ YY_RULE_SETUP
{
yy_pop_state
();
/* Do not append last quote:
// QAPPEND(
yytext, yy
leng); */
// QAPPEND(
asn1p_text, asn1p_
leng); */
if
(
asn1p_lexer_pedantic_1990
&&
strchr
(
yy
text
,
'\n'
))
{
&&
strchr
(
asn1p_
text
,
'\n'
))
{
fprintf
(
stderr
,
"%s: "
"Newlines are prohibited by ASN.1:1990
\n
"
,
asn1p_lval
.
tv_opaque
.
buf
);
...
...
@@ -2383,26 +2690,29 @@ YY_RULE_SETUP
/* Eat everything else */
YY_BREAK
case
28
:
/* rule 28 can match eol */
YY_RULE_SETUP
#line 207 "asn1p_l.l"
YY_BREAK
case
29
:
/* rule 29 can match eol */
YY_RULE_SETUP
#line 210 "asn1p_l.l"
{
/* " \t\r\n" weren't allowed in ASN.1:1990. */
asn1p_lval
.
tv_str
=
yy
text
;
asn1p_lval
.
tv_str
=
asn1p_
text
;
return
TOK_hstring
;
}
YY_BREAK
case
30
:
/* rule 30 can match eol */
YY_RULE_SETUP
#line 216 "asn1p_l.l"
{
/* " \t\r\n" weren't allowed in ASN.1:1990. */
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_bstring
;
}
YY_BREAK
...
...
@@ -2410,7 +2720,7 @@ case 31:
YY_RULE_SETUP
#line 223 "asn1p_l.l"
{
asn1p_lval
.
a_int
=
_lex_atoi
(
yy
text
);
asn1p_lval
.
a_int
=
_lex_atoi
(
asn1p_
text
);
if
(
errno
==
ERANGE
)
return
-
1
;
return
TOK_number_negative
;
...
...
@@ -2420,7 +2730,7 @@ case 32:
YY_RULE_SETUP
#line 230 "asn1p_l.l"
{
asn1p_lval
.
a_int
=
_lex_atoi
(
yy
text
);
asn1p_lval
.
a_int
=
_lex_atoi
(
asn1p_
text
);
if
(
errno
==
ERANGE
)
return
-
1
;
return
TOK_number
;
...
...
@@ -2430,7 +2740,7 @@ case 33:
YY_RULE_SETUP
#line 237 "asn1p_l.l"
{
asn1p_lval
.
a_int
=
_lex_atoi
(
yy
text
);
asn1p_lval
.
a_int
=
_lex_atoi
(
asn1p_
text
);
if
(
errno
==
ERANGE
)
return
-
1
;
return
TOK_number
;
...
...
@@ -2440,7 +2750,7 @@ case 34:
YY_RULE_SETUP
#line 244 "asn1p_l.l"
{
asn1p_lval
.
a_dbl
=
_lex_atod
(
yy
text
);
asn1p_lval
.
a_dbl
=
_lex_atod
(
asn1p_
text
);
if
(
errno
==
ERANGE
)
return
-
1
;
return
TOK_realnumber
;
...
...
@@ -2464,7 +2774,7 @@ YY_RULE_SETUP
if
(
TYPE_LIFETIME
(
1990
,
1997
))
return
TOK_ANY
;
fprintf
(
stderr
,
"Keyword
\"
%s
\"
at line %d "
"is obsolete
\n
"
,
yytext
,
yy
lineno
);
"is obsolete
\n
"
,
asn1p_text
,
asn1p_
lineno
);
REJECT
;
}
YY_BREAK
...
...
@@ -2555,7 +2865,7 @@ YY_RULE_SETUP
if
(
TYPE_LIFETIME
(
1990
,
1997
))
return
TOK_DEFINED
;
fprintf
(
stderr
,
"Keyword
\"
%s
\"
at line %d "
"is obsolete
\n
"
,
yytext
,
yy
lineno
);
"is obsolete
\n
"
,
asn1p_text
,
asn1p_
lineno
);
/* Deprecated since */
REJECT
;
}
...
...
@@ -2887,7 +3197,7 @@ case 117:
YY_RULE_SETUP
#line 362 "asn1p_l.l"
{
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_typefieldreference
;
}
YY_BREAK
...
...
@@ -2895,7 +3205,7 @@ case 118:
YY_RULE_SETUP
#line 367 "asn1p_l.l"
{
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_valuefieldreference
;
}
YY_BREAK
...
...
@@ -2903,7 +3213,7 @@ case 119:
YY_RULE_SETUP
#line 373 "asn1p_l.l"
{
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_identifier
;
}
YY_BREAK
...
...
@@ -2914,7 +3224,7 @@ case 120:
YY_RULE_SETUP
#line 381 "asn1p_l.l"
{
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_capitalreference
;
}
YY_BREAK
...
...
@@ -2927,7 +3237,7 @@ case 121:
YY_RULE_SETUP
#line 391 "asn1p_l.l"
{
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_typereference
;
}
YY_BREAK
...
...
@@ -2951,7 +3261,7 @@ case 125:
YY_RULE_SETUP
#line 403 "asn1p_l.l"
{
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_Literal
;
}
YY_BREAK
...
...
@@ -2959,7 +3269,7 @@ case 126:
YY_RULE_SETUP
#line 408 "asn1p_l.l"
{
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_Literal
;
}
YY_BREAK
...
...
@@ -2968,7 +3278,7 @@ YY_RULE_SETUP
#line 413 "asn1p_l.l"
{
yy_push_state
(
with_syntax
);
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_Literal
;
}
YY_BREAK
...
...
@@ -2983,11 +3293,12 @@ YY_RULE_SETUP
return
']'
;
YY_BREAK
case
130
:
/* rule 130 can match eol */
YY_RULE_SETUP
#line 422 "asn1p_l.l"
{
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
yy
text
);
asn1p_lval
.
tv_opaque
.
len
=
yy
leng
;
asn1p_lval
.
tv_opaque
.
buf
=
strdup
(
asn1p_
text
);
asn1p_lval
.
tv_opaque
.
len
=
asn1p_
leng
;
return
TOK_whitespace
;
}
YY_BREAK
...
...
@@ -2997,7 +3308,7 @@ YY_RULE_SETUP
{
yy_pop_state
();
if
(
YYSTATE
==
with_syntax
)
{
asn1p_lval
.
tv_str
=
strdup
(
yy
text
);
asn1p_lval
.
tv_str
=
strdup
(
asn1p_
text
);
return
TOK_Literal
;
}
else
{
return
'}'
;
...
...
@@ -3006,17 +3317,19 @@ YY_RULE_SETUP
YY_BREAK
case
132
:
/* rule 132 can match eol */
YY_RULE_SETUP
#line 441 "asn1p_l.l"
/* Ignore whitespace */
YY_BREAK
case
133
:
/* rule 133 can match eol */
YY_RULE_SETUP
#line 444 "asn1p_l.l"
{
asn1c_integer_t
v1
=
-
1
,
v2
=
-
1
;
char
*
p
;
for
(
p
=
yy
text
;
*
p
;
p
++
)
for
(
p
=
asn1p_
text
;
*
p
;
p
++
)
if
(
*
p
>=
'0'
&&
*
p
<=
'9'
)
{
v1
=
_lex_atoi
(
p
);
break
;
}
while
(
*
p
>=
'0'
&&
*
p
<=
'9'
)
p
++
;
/* Skip digits */
...
...
@@ -3025,13 +3338,13 @@ YY_RULE_SETUP
if
(
v1
<
0
||
v1
>
7
)
{
fprintf
(
stderr
,
"%s at line %d: X.680:2003, #37.14 "
"mandates 0..7 range for Tuple's TableColumn
\n
"
,
yytext
,
yy
lineno
);
asn1p_text
,
asn1p_
lineno
);
return
-
1
;
}
if
(
v2
<
0
||
v2
>
15
)
{
fprintf
(
stderr
,
"%s at line %d: X.680:2003, #37.14 "
"mandates 0..15 range for Tuple's TableRow
\n
"
,
yytext
,
yy
lineno
);
asn1p_text
,
asn1p_
lineno
);
return
-
1
;
}
asn1p_lval
.
a_int
=
(
v1
<<
4
)
+
v2
;
...
...
@@ -3039,12 +3352,13 @@ YY_RULE_SETUP
}
YY_BREAK
case
134
:
/* rule 134 can match eol */
YY_RULE_SETUP
#line 469 "asn1p_l.l"
{
asn1c_integer_t
v1
=
-
1
,
v2
=
-
1
,
v3
=
-
1
,
v4
=
-
1
;
char
*
p
;
for
(
p
=
yy
text
;
*
p
;
p
++
)
for
(
p
=
asn1p_
text
;
*
p
;
p
++
)
if
(
*
p
>=
'0'
&&
*
p
<=
'9'
)
{
v1
=
_lex_atoi
(
p
);
break
;
}
while
(
*
p
>=
'0'
&&
*
p
<=
'9'
)
p
++
;
/* Skip digits */
...
...
@@ -3059,25 +3373,25 @@ YY_RULE_SETUP
if
(
v1
<
0
||
v1
>
127
)
{
fprintf
(
stderr
,
"%s at line %d: X.680:2003, #37.12 "
"mandates 0..127 range for Quadruple's Group
\n
"
,
yytext
,
yy
lineno
);
asn1p_text
,
asn1p_
lineno
);
return
-
1
;
}
if
(
v2
<
0
||
v2
>
255
)
{
fprintf
(
stderr
,
"%s at line %d: X.680:2003, #37.12 "
"mandates 0..255 range for Quadruple's Plane
\n
"
,
yytext
,
yy
lineno
);
asn1p_text
,
asn1p_
lineno
);
return
-
1
;
}
if
(
v3
<
0
||
v3
>
255
)
{
fprintf
(
stderr
,
"%s at line %d: X.680:2003, #37.12 "
"mandates 0..255 range for Quadruple's Row
\n
"
,
yytext
,
yy
lineno
);
asn1p_text
,
asn1p_
lineno
);
return
-
1
;
}
if
(
v4
<
0
||
v4
>
255
)
{
fprintf
(
stderr
,
"%s at line %d: X.680:2003, #37.12 "
"mandates 0..255 range for Quadruple's Cell
\n
"
,
yytext
,
yy
lineno
);
asn1p_text
,
asn1p_
lineno
);
return
-
1
;
}
asn1p_lval
.
a_int
=
(
v1
<<
24
)
|
(
v2
<<
16
)
|
(
v3
<<
8
)
|
v4
;
...
...
@@ -3087,9 +3401,10 @@ YY_RULE_SETUP
case
135
:
YY_RULE_SETUP
#line 513 "asn1p_l.l"
return
yy
text
[
0
];
return
asn1p_
text
[
0
];
YY_BREAK
case
136
:
/* rule 136 can match eol */
YY_RULE_SETUP
#line 515 "asn1p_l.l"
{
...
...
@@ -3098,7 +3413,7 @@ YY_RULE_SETUP
fprintf
(
stderr
,
"Symbol '%c' at line %d is prohibited "
"by ASN.1:1994 and ASN.1:1997
\n
"
,
yytext
[
0
],
yy
lineno
);
asn1p_text
[
0
],
asn1p_
lineno
);
if
(
TYPE_LIFETIME
(
1994
,
0
))
return
-
1
;
}
...
...
@@ -3109,7 +3424,7 @@ YY_RULE_SETUP
{
fprintf
(
stderr
,
"Unexpected token at line %d:
\"
%s
\"\n
"
,
yylineno
,
yy
text
);
asn1p_lineno
,
asn1p_
text
);
while
(
YYSTATE
!=
INITIAL
)
yy_pop_state
();
if
(
0
)
{
...
...
@@ -3139,31 +3454,31 @@ YY_RULE_SETUP
#line 546 "asn1p_l.l"
YY_FATAL_ERROR
(
"flex scanner jammed"
);
YY_BREAK
#line 3
143
"asn1p_l.c"
#line 3
458
"asn1p_l.c"
case
YY_END_OF_BUFFER
:
{
/* Amount of text matched not including the EOB char. */
int
yy_amount_of_matched_text
=
(
int
)
(
yy_cp
-
yytext_ptr
)
-
1
;
int
yy_amount_of_matched_text
=
(
int
)
(
yy_cp
-
(
yytext_ptr
)
)
-
1
;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*
yy_cp
=
yy_hold_char
;
*
yy_cp
=
(
yy_hold_char
)
;
YY_RESTORE_YY_MORE_OFFSET
if
(
yy_current_buffer
->
yy_buffer_status
==
YY_BUFFER_NEW
)
if
(
YY_CURRENT_BUFFER_LVALUE
->
yy_buffer_status
==
YY_BUFFER_NEW
)
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed
yy
in at a new source and called
*
yy
lex(). If so, then we have to assure
* consistency between
yy_current_buffer
and our
* just pointed
asn1p_
in at a new source and called
*
asn1p_
lex(). If so, then we have to assure
* consistency between
YY_CURRENT_BUFFER
and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars
=
yy_current_buffer
->
yy_n_chars
;
yy_current_buffer
->
yy_input_file
=
yy
in
;
yy_current_buffer
->
yy_buffer_status
=
YY_BUFFER_NORMAL
;
(
yy_n_chars
)
=
YY_CURRENT_BUFFER_LVALUE
->
yy_n_chars
;
YY_CURRENT_BUFFER_LVALUE
->
yy_input_file
=
asn1p_
in
;
YY_CURRENT_BUFFER_LVALUE
->
yy_buffer_status
=
YY_BUFFER_NORMAL
;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
...
...
@@ -3173,13 +3488,13 @@ YY_FATAL_ERROR( "flex scanner jammed" );
* end-of-buffer state). Contrast this with the test
* in input().
*/
if
(
yy_c_buf_p
<=
&
yy_current_buffer
->
yy_ch_buf
[
yy_n_chars
]
)
if
(
(
yy_c_buf_p
)
<=
&
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[(
yy_n_chars
)
]
)
{
/* This was really a NUL. */
yy_state_type
yy_next_state
;
yy_c_buf_p
=
yytext_ptr
+
yy_amount_of_matched_text
;
(
yy_c_buf_p
)
=
(
yytext_ptr
)
+
yy_amount_of_matched_text
;
yy_current_state
=
yy_get_previous_state
();
yy_current_state
=
yy_get_previous_state
(
);
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
...
...
@@ -3192,41 +3507,42 @@ YY_FATAL_ERROR( "flex scanner jammed" );
yy_next_state
=
yy_try_NUL_trans
(
yy_current_state
);
yy_bp
=
yytext_ptr
+
YY_MORE_ADJ
;
yy_bp
=
(
yytext_ptr
)
+
YY_MORE_ADJ
;
if
(
yy_next_state
)
{
/* Consume the NUL. */
yy_cp
=
++
yy_c_buf_p
;
yy_cp
=
++
(
yy_c_buf_p
)
;
yy_current_state
=
yy_next_state
;
goto
yy_match
;
}
else
{
yy_cp
=
yy_c_buf_p
;
/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
yy_cp
=
(
yy_c_buf_p
);
goto
yy_find_action
;
}
}
else
switch
(
yy_get_next_buffer
()
)
else
switch
(
yy_get_next_buffer
(
)
)
{
case
EOB_ACT_END_OF_FILE
:
{
yy_did_buffer_switch_on_eof
=
0
;
(
yy_did_buffer_switch_on_eof
)
=
0
;
if
(
yywrap
(
)
)
if
(
asn1p_wrap
(
)
)
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
*
yy
text, we can now set up
*
asn1p_
text, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p
=
yytext_ptr
+
YY_MORE_ADJ
;
(
yy_c_buf_p
)
=
(
yytext_ptr
)
+
YY_MORE_ADJ
;
yy_act
=
YY_STATE_EOF
(
YY_START
);
goto
do_action
;
...
...
@@ -3234,30 +3550,30 @@ YY_FATAL_ERROR( "flex scanner jammed" );
else
{
if
(
!
yy_did_buffer_switch_on_eof
)
if
(
!
(
yy_did_buffer_switch_on_eof
)
)
YY_NEW_FILE
;
}
break
;
}
case
EOB_ACT_CONTINUE_SCAN
:
yy_c_buf_p
=
yytext_ptr
+
yy_amount_of_matched_text
;
(
yy_c_buf_p
)
=
(
yytext_ptr
)
+
yy_amount_of_matched_text
;
yy_current_state
=
yy_get_previous_state
();
yy_current_state
=
yy_get_previous_state
(
);
yy_cp
=
yy_c_buf_p
;
yy_bp
=
yytext_ptr
+
YY_MORE_ADJ
;
yy_cp
=
(
yy_c_buf_p
)
;
yy_bp
=
(
yytext_ptr
)
+
YY_MORE_ADJ
;
goto
yy_match
;
case
EOB_ACT_LAST_MATCH
:
yy_c_buf_p
=
&
yy_current_buffer
->
yy_ch_buf
[
yy_n_chars
];
(
yy_c_buf_p
)
=
&
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[(
yy_n_chars
)
];
yy_current_state
=
yy_get_previous_state
();
yy_current_state
=
yy_get_previous_state
(
);
yy_cp
=
yy_c_buf_p
;
yy_bp
=
yytext_ptr
+
YY_MORE_ADJ
;
yy_cp
=
(
yy_c_buf_p
)
;
yy_bp
=
(
yytext_ptr
)
+
YY_MORE_ADJ
;
goto
yy_find_action
;
}
break
;
...
...
@@ -3268,8 +3584,15 @@ YY_FATAL_ERROR( "flex scanner jammed" );
"fatal flex scanner internal error--no action found"
);
}
/* end of action switch */
}
/* end of scanning one token */
}
/* end of yylex */
}
/* end of asn1p_lex */
/* %ok-for-header */
/* %if-c++-only */
/* %not-for-header */
/* %ok-for-header */
/* %endif */
/* yy_get_next_buffer - try to read in a new buffer
*
...
...
@@ -3278,21 +3601,24 @@ YY_FATAL_ERROR( "flex scanner jammed" );
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static
int
yy_get_next_buffer
()
{
register
char
*
dest
=
yy_current_buffer
->
yy_ch_buf
;
register
char
*
source
=
yytext_ptr
;
/* %if-c-only */
static
int
yy_get_next_buffer
(
void
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register
char
*
dest
=
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
;
register
char
*
source
=
(
yytext_ptr
);
register
int
number_to_move
,
i
;
int
ret_val
;
if
(
yy_c_buf_p
>
&
yy_current_buffer
->
yy_ch_buf
[
yy_n_chars
+
1
]
)
if
(
(
yy_c_buf_p
)
>
&
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[(
yy_n_chars
)
+
1
]
)
YY_FATAL_ERROR
(
"fatal flex scanner internal error--end of buffer missed"
);
if
(
yy_current_buffer
->
yy_fill_buffer
==
0
)
if
(
YY_CURRENT_BUFFER_LVALUE
->
yy_fill_buffer
==
0
)
{
/* Don't try to fill the buffer, so this is an EOF. */
if
(
yy_c_buf_p
-
yytext_ptr
-
YY_MORE_ADJ
==
1
)
if
(
(
yy_c_buf_p
)
-
(
yytext_ptr
)
-
YY_MORE_ADJ
==
1
)
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
...
...
@@ -3312,86 +3638,52 @@ static int yy_get_next_buffer()
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move
=
(
int
)
(
yy_c_buf_p
-
yytext_ptr
)
-
1
;
number_to_move
=
(
int
)
(
(
yy_c_buf_p
)
-
(
yytext_ptr
)
)
-
1
;
for
(
i
=
0
;
i
<
number_to_move
;
++
i
)
*
(
dest
++
)
=
*
(
source
++
);
if
(
yy_current_buffer
->
yy_buffer_status
==
YY_BUFFER_EOF_PENDING
)
if
(
YY_CURRENT_BUFFER_LVALUE
->
yy_buffer_status
==
YY_BUFFER_EOF_PENDING
)
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer
->
yy_n_chars
=
yy_n_chars
=
0
;
YY_CURRENT_BUFFER_LVALUE
->
yy_n_chars
=
(
yy_n_chars
)
=
0
;
else
{
int
num_to_read
=
yy_current_buffer
->
yy_buf_size
-
number_to_move
-
1
;
int
num_to_read
=
YY_CURRENT_BUFFER_LVALUE
->
yy_buf_size
-
number_to_move
-
1
;
while
(
num_to_read
<=
0
)
{
/* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR
(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT"
);
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE
b
=
yy_current_buffer
;
int
yy_c_buf_p_offset
=
(
int
)
(
yy_c_buf_p
-
b
->
yy_ch_buf
);
if
(
b
->
yy_is_our_buffer
)
{
int
new_size
=
b
->
yy_buf_size
*
2
;
if
(
new_size
<=
0
)
b
->
yy_buf_size
+=
b
->
yy_buf_size
/
8
;
else
b
->
yy_buf_size
*=
2
;
b
->
yy_ch_buf
=
(
char
*
)
/* Include room in for 2 EOB chars. */
yy_flex_realloc
(
(
void
*
)
b
->
yy_ch_buf
,
b
->
yy_buf_size
+
2
);
}
else
/* Can't grow it, we don't own it. */
b
->
yy_ch_buf
=
0
;
if
(
!
b
->
yy_ch_buf
)
YY_FATAL_ERROR
(
"fatal error - scanner input buffer overflow"
);
yy_c_buf_p
=
&
b
->
yy_ch_buf
[
yy_c_buf_p_offset
];
num_to_read
=
yy_current_buffer
->
yy_buf_size
-
number_to_move
-
1
;
#endif
}
if
(
num_to_read
>
YY_READ_BUF_SIZE
)
num_to_read
=
YY_READ_BUF_SIZE
;
/* Read in more data. */
YY_INPUT
(
(
&
yy_current_buffer
->
yy_ch_buf
[
number_to_move
]),
yy_n_chars
,
num_to_read
);
YY_INPUT
(
(
&
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[
number_to_move
]),
(
yy_n_chars
),
(
size_t
)
num_to_read
);
yy_current_buffer
->
yy_n_chars
=
yy_n_chars
;
YY_CURRENT_BUFFER_LVALUE
->
yy_n_chars
=
(
yy_n_chars
)
;
}
if
(
yy_n_chars
==
0
)
if
(
(
yy_n_chars
)
==
0
)
{
if
(
number_to_move
==
YY_MORE_ADJ
)
{
ret_val
=
EOB_ACT_END_OF_FILE
;
yyrestart
(
yyin
);
asn1p_restart
(
asn1p_in
);
}
else
{
ret_val
=
EOB_ACT_LAST_MATCH
;
yy_current_buffer
->
yy_buffer_status
=
YY_CURRENT_BUFFER_LVALUE
->
yy_buffer_status
=
YY_BUFFER_EOF_PENDING
;
}
}
...
...
@@ -3399,29 +3691,45 @@ static int yy_get_next_buffer()
else
ret_val
=
EOB_ACT_CONTINUE_SCAN
;
yy_n_chars
+=
number_to_move
;
yy_current_buffer
->
yy_ch_buf
[
yy_n_chars
]
=
YY_END_OF_BUFFER_CHAR
;
yy_current_buffer
->
yy_ch_buf
[
yy_n_chars
+
1
]
=
YY_END_OF_BUFFER_CHAR
;
if
((
yy_size_t
)
((
yy_n_chars
)
+
number_to_move
)
>
YY_CURRENT_BUFFER_LVALUE
->
yy_buf_size
)
{
/* Extend the array by 50%, plus the number we really need. */
yy_size_t
new_size
=
(
yy_n_chars
)
+
number_to_move
+
((
yy_n_chars
)
>>
1
);
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
=
(
char
*
)
asn1p_realloc
((
void
*
)
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
,
new_size
);
if
(
!
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
)
YY_FATAL_ERROR
(
"out of dynamic memory in yy_get_next_buffer()"
);
}
yytext_ptr
=
&
yy_current_buffer
->
yy_ch_buf
[
0
];
(
yy_n_chars
)
+=
number_to_move
;
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[(
yy_n_chars
)]
=
YY_END_OF_BUFFER_CHAR
;
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[(
yy_n_chars
)
+
1
]
=
YY_END_OF_BUFFER_CHAR
;
return
ret_val
;
}
(
yytext_ptr
)
=
&
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[
0
];
return
ret_val
;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static
yy_state_type
yy_get_previous_state
()
{
/* %if-c-only */
/* %not-for-header */
static
yy_state_type
yy_get_previous_state
(
void
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register
yy_state_type
yy_current_state
;
register
char
*
yy_cp
;
/* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state
=
(
yy_start
);
yy_current_state
=
yy_start
;
yy_state_ptr
=
yy_state_buf
;
*
yy_state_ptr
++
=
yy_current_state
;
(
yy_state_ptr
)
=
(
yy_state_buf
);
*
(
yy_state_ptr
)
++
=
yy_current_state
;
for
(
yy_cp
=
yytext_ptr
+
YY_MORE_ADJ
;
yy_cp
<
yy_c_buf_p
;
++
yy_cp
)
for
(
yy_cp
=
(
yytext_ptr
)
+
YY_MORE_ADJ
;
yy_cp
<
(
yy_c_buf_p
)
;
++
yy_cp
)
{
/* %% [16.0] code to find the next state goes here */
register
YY_CHAR
yy_c
=
(
*
yy_cp
?
yy_ec
[
YY_SC_TO_UI
(
*
yy_cp
)]
:
1
);
while
(
yy_chk
[
yy_base
[
yy_current_state
]
+
yy_c
]
!=
yy_current_state
)
{
...
...
@@ -3430,27 +3738,25 @@ static yy_state_type yy_get_previous_state()
yy_c
=
yy_meta
[(
unsigned
int
)
yy_c
];
}
yy_current_state
=
yy_nxt
[
yy_base
[
yy_current_state
]
+
(
unsigned
int
)
yy_c
];
*
yy_state_ptr
++
=
yy_current_state
;
*
(
yy_state_ptr
)
++
=
yy_current_state
;
}
return
yy_current_state
;
}
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static
yy_state_type
yy_try_NUL_trans
(
yy_state_type
yy_current_state
)
#else
static
yy_state_type
yy_try_NUL_trans
(
yy_current_state
)
yy_state_type
yy_current_state
;
#endif
{
/* %if-c-only */
static
yy_state_type
yy_try_NUL_trans
(
yy_state_type
yy_current_state
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register
int
yy_is_jam
;
/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
register
YY_CHAR
yy_c
=
1
;
while
(
yy_chk
[
yy_base
[
yy_current_state
]
+
yy_c
]
!=
yy_current_state
)
...
...
@@ -3462,85 +3768,94 @@ yy_state_type yy_current_state;
yy_current_state
=
yy_nxt
[
yy_base
[
yy_current_state
]
+
(
unsigned
int
)
yy_c
];
yy_is_jam
=
(
yy_current_state
==
741
);
if
(
!
yy_is_jam
)
*
yy_state_ptr
++
=
yy_current_state
;
*
(
yy_state_ptr
)
++
=
yy_current_state
;
return
yy_is_jam
?
0
:
yy_current_state
;
}
}
/* %if-c-only */
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static
void
yyunput
(
int
c
,
register
char
*
yy_bp
)
#else
static
void
yyunput
(
c
,
yy_bp
)
int
c
;
register
char
*
yy_bp
;
#endif
{
register
char
*
yy_cp
=
yy_c_buf_p
;
static
void
yyunput
(
int
c
,
register
char
*
yy_bp
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register
char
*
yy_cp
;
yy_cp
=
(
yy_c_buf_p
);
/* undo effects of setting up
yy
text */
*
yy_cp
=
yy_hold_char
;
/* undo effects of setting up
asn1p_
text */
*
yy_cp
=
(
yy_hold_char
)
;
if
(
yy_cp
<
yy_current_buffer
->
yy_ch_buf
+
2
)
if
(
yy_cp
<
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
+
2
)
{
/* need to shift things up to make room */
/* +2 for EOB chars. */
register
int
number_to_move
=
yy_n_chars
+
2
;
register
char
*
dest
=
&
yy_current_buffer
->
yy_ch_buf
[
yy_current_buffer
->
yy_buf_size
+
2
];
register
int
number_to_move
=
(
yy_n_chars
)
+
2
;
register
char
*
dest
=
&
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[
YY_CURRENT_BUFFER_LVALUE
->
yy_buf_size
+
2
];
register
char
*
source
=
&
yy_current_buffer
->
yy_ch_buf
[
number_to_move
];
&
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[
number_to_move
];
while
(
source
>
yy_current_buffer
->
yy_ch_buf
)
while
(
source
>
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
)
*--
dest
=
*--
source
;
yy_cp
+=
(
int
)
(
dest
-
source
);
yy_bp
+=
(
int
)
(
dest
-
source
);
yy_current_buffer
->
yy_n_chars
=
yy_n_chars
=
yy_current_buffer
->
yy_buf_size
;
YY_CURRENT_BUFFER_LVALUE
->
yy_n_chars
=
(
yy_n_chars
)
=
YY_CURRENT_BUFFER_LVALUE
->
yy_buf_size
;
if
(
yy_cp
<
yy_current_buffer
->
yy_ch_buf
+
2
)
if
(
yy_cp
<
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
+
2
)
YY_FATAL_ERROR
(
"flex scanner push-back overflow"
);
}
*--
yy_cp
=
(
char
)
c
;
if
(
c
==
'\n'
)
--
yylineno
;
/* %% [18.0] update asn1p_lineno here */
yytext_ptr
=
yy_bp
;
yy_hold_char
=
*
yy_cp
;
yy_c_buf_p
=
yy_cp
;
}
#endif
/* ifndef YY_NO_UNPUT */
if
(
c
==
'\n'
){
--
asn1p_lineno
;
}
(
yytext_ptr
)
=
yy_bp
;
(
yy_hold_char
)
=
*
yy_cp
;
(
yy_c_buf_p
)
=
yy_cp
;
}
/* %if-c-only */
/* %endif */
/* %if-c-only */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static
int
yyinput
(
)
static
int
yyinput
(
void
)
#else
static
int
input
(
)
static
int
input
(
void
)
#endif
{
int
c
;
*
yy_c_buf_p
=
yy_hold_char
;
/* %endif */
/* %if-c++-only */
/* %endif */
{
int
c
;
*
(
yy_c_buf_p
)
=
(
yy_hold_char
);
if
(
*
yy_c_buf_p
==
YY_END_OF_BUFFER_CHAR
)
if
(
*
(
yy_c_buf_p
)
==
YY_END_OF_BUFFER_CHAR
)
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if
(
yy_c_buf_p
<
&
yy_current_buffer
->
yy_ch_buf
[
yy_n_chars
]
)
if
(
(
yy_c_buf_p
)
<
&
YY_CURRENT_BUFFER_LVALUE
->
yy_ch_buf
[(
yy_n_chars
)
]
)
/* This was really a NUL. */
*
yy_c_buf_p
=
'\0'
;
*
(
yy_c_buf_p
)
=
'\0'
;
else
{
/* need more input */
int
offset
=
yy_c_buf_p
-
yytext_ptr
;
++
yy_c_buf_p
;
int
offset
=
(
yy_c_buf_p
)
-
(
yytext_ptr
)
;
++
(
yy_c_buf_p
)
;
switch
(
yy_get_next_buffer
()
)
switch
(
yy_get_next_buffer
(
)
)
{
case
EOB_ACT_LAST_MATCH
:
/* This happens because yy_g_n_b()
...
...
@@ -3554,16 +3869,16 @@ static int input()
*/
/* Reset buffer status. */
yyrestart
(
yy
in
);
asn1p_restart
(
asn1p_
in
);
/*
fall through
*/
/*
FALLTHROUGH
*/
case
EOB_ACT_END_OF_FILE
:
{
if
(
yywrap
(
)
)
if
(
asn1p_wrap
(
)
)
return
EOF
;
if
(
!
yy_did_buffer_switch_on_eof
)
if
(
!
(
yy_did_buffer_switch_on_eof
)
)
YY_NEW_FILE
;
#ifdef __cplusplus
return
yyinput
();
...
...
@@ -3573,174 +3888,213 @@ static int input()
}
case
EOB_ACT_CONTINUE_SCAN
:
yy_c_buf_p
=
yytext_ptr
+
offset
;
(
yy_c_buf_p
)
=
(
yytext_ptr
)
+
offset
;
break
;
}
}
}
c
=
*
(
unsigned
char
*
)
yy_c_buf_p
;
/* cast for 8-bit char's */
*
yy_c_buf_p
=
'\0'
;
/* preserve yy
text */
yy_hold_char
=
*++
yy_c_buf_p
;
c
=
*
(
unsigned
char
*
)
(
yy_c_buf_p
)
;
/* cast for 8-bit char's */
*
(
yy_c_buf_p
)
=
'\0'
;
/* preserve asn1p_
text */
(
yy_hold_char
)
=
*++
(
yy_c_buf_p
)
;
/* %% [19.0] update BOL and asn1p_lineno */
if
(
c
==
'\n'
)
++
yylineno
;
asn1p_lineno
++
;
;
return
c
;
}
/* %if-c-only */
#endif
/* ifndef YY_NO_INPUT */
/* %endif */
/** 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 .
*/
/* %if-c-only */
void
asn1p_restart
(
FILE
*
input_file
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
if
(
!
YY_CURRENT_BUFFER
){
asn1p_ensure_buffer_stack
();
YY_CURRENT_BUFFER_LVALUE
=
asn1p__create_buffer
(
asn1p_in
,
YY_BUF_SIZE
);
}
asn1p__init_buffer
(
YY_CURRENT_BUFFER
,
input_file
);
asn1p__load_buffer_state
(
);
}
#ifdef YY_USE_PROTOS
void
yyrestart
(
FILE
*
input_file
)
#else
void
yyrestart
(
input_file
)
FILE
*
input_file
;
#endif
{
if
(
!
yy_current_buffer
)
yy_current_buffer
=
yy_create_buffer
(
yyin
,
YY_BUF_SIZE
);
yy_init_buffer
(
yy_current_buffer
,
input_file
);
yy_load_buffer_state
();
}
#ifdef YY_USE_PROTOS
void
yy_switch_to_buffer
(
YY_BUFFER_STATE
new_buffer
)
#else
void
yy_switch_to_buffer
(
new_buffer
)
YY_BUFFER_STATE
new_buffer
;
#endif
{
if
(
yy_current_buffer
==
new_buffer
)
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
/* %if-c-only */
void
asn1p__switch_to_buffer
(
YY_BUFFER_STATE
new_buffer
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
/* TODO. We should be able to replace this entire function body
* with
* asn1p_pop_buffer_state();
* asn1p_push_buffer_state(new_buffer);
*/
asn1p_ensure_buffer_stack
();
if
(
YY_CURRENT_BUFFER
==
new_buffer
)
return
;
if
(
yy_current_buffer
)
if
(
YY_CURRENT_BUFFER
)
{
/* Flush out information for old buffer. */
*
yy_c_buf_p
=
yy_hold_char
;
yy_current_buffer
->
yy_buf_pos
=
yy_c_buf_p
;
yy_current_buffer
->
yy_n_chars
=
yy_n_chars
;
*
(
yy_c_buf_p
)
=
(
yy_hold_char
)
;
YY_CURRENT_BUFFER_LVALUE
->
yy_buf_pos
=
(
yy_c_buf_p
)
;
YY_CURRENT_BUFFER_LVALUE
->
yy_n_chars
=
(
yy_n_chars
)
;
}
yy_current_buffer
=
new_buffer
;
yy_load_buffer_state
(
);
YY_CURRENT_BUFFER_LVALUE
=
new_buffer
;
asn1p__load_buffer_state
(
);
/* We don't actually know whether we did this switch during
* EOF (
yy
wrap()) processing, but the only time this flag
* is looked at is after
yy
wrap() is called, so it's safe
* EOF (
asn1p_
wrap()) processing, but the only time this flag
* is looked at is after
asn1p_
wrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof
=
1
;
}
#ifdef YY_USE_PROTOS
void
yy_load_buffer_state
(
void
)
#else
void
yy_load_buffer_state
()
#endif
{
yy_n_chars
=
yy_current_buffer
->
yy_n_chars
;
yytext_ptr
=
yy_c_buf_p
=
yy_current_buffer
->
yy_buf_pos
;
yyin
=
yy_current_buffer
->
yy_input_file
;
yy_hold_char
=
*
yy_c_buf_p
;
}
(
yy_did_buffer_switch_on_eof
)
=
1
;
}
/* %if-c-only */
static
void
asn1p__load_buffer_state
(
void
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
(
yy_n_chars
)
=
YY_CURRENT_BUFFER_LVALUE
->
yy_n_chars
;
(
yytext_ptr
)
=
(
yy_c_buf_p
)
=
YY_CURRENT_BUFFER_LVALUE
->
yy_buf_pos
;
asn1p_in
=
YY_CURRENT_BUFFER_LVALUE
->
yy_input_file
;
(
yy_hold_char
)
=
*
(
yy_c_buf_p
);
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE
yy_create_buffer
(
FILE
*
file
,
int
size
)
#else
YY_BUFFER_STATE
yy_create_buffer
(
file
,
size
)
FILE
*
file
;
int
size
;
#endif
{
/** 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.
*/
/* %if-c-only */
YY_BUFFER_STATE
asn1p__create_buffer
(
FILE
*
file
,
int
size
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
YY_BUFFER_STATE
b
;
b
=
(
YY_BUFFER_STATE
)
yy_flex_alloc
(
sizeof
(
struct
yy_buffer_state
)
);
b
=
(
YY_BUFFER_STATE
)
asn1p_alloc
(
sizeof
(
struct
yy_buffer_state
)
);
if
(
!
b
)
YY_FATAL_ERROR
(
"out of dynamic memory in
yy
_create_buffer()"
);
YY_FATAL_ERROR
(
"out of dynamic memory in
asn1p_
_create_buffer()"
);
b
->
yy_buf_size
=
size
;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b
->
yy_ch_buf
=
(
char
*
)
yy_flex_alloc
(
b
->
yy_buf_size
+
2
);
b
->
yy_ch_buf
=
(
char
*
)
asn1p_alloc
(
b
->
yy_buf_size
+
2
);
if
(
!
b
->
yy_ch_buf
)
YY_FATAL_ERROR
(
"out of dynamic memory in
yy
_create_buffer()"
);
YY_FATAL_ERROR
(
"out of dynamic memory in
asn1p_
_create_buffer()"
);
b
->
yy_is_our_buffer
=
1
;
yy_init_buffer
(
b
,
file
);
asn1p__init_buffer
(
b
,
file
);
return
b
;
}
}
#ifdef YY_USE_PROTOS
void
yy_delete_buffer
(
YY_BUFFER_STATE
b
)
#else
void
yy_delete_buffer
(
b
)
YY_BUFFER_STATE
b
;
#endif
{
/** Destroy the buffer.
* @param b a buffer created with asn1p__create_buffer()
*
*/
/* %if-c-only */
void
asn1p__delete_buffer
(
YY_BUFFER_STATE
b
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
if
(
!
b
)
return
;
if
(
b
==
yy_current_buffer
)
yy_current_buffer
=
(
YY_BUFFER_STATE
)
0
;
if
(
b
==
YY_CURRENT_BUFFER
)
/* Not sure if we should pop here. */
YY_CURRENT_BUFFER_LVALUE
=
(
YY_BUFFER_STATE
)
0
;
if
(
b
->
yy_is_our_buffer
)
yy_flex_free
(
(
void
*
)
b
->
yy_ch_buf
);
asn1p_free
((
void
*
)
b
->
yy_ch_buf
);
yy_flex_free
(
(
void
*
)
b
);
}
asn1p_free
((
void
*
)
b
);
}
/* %if-c-only */
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern
int
isatty
YY_PROTO
((
int
));
#endif
#endif
/* %endif */
#ifdef YY_USE_PROTOS
void
yy_init_buffer
(
YY_BUFFER_STATE
b
,
FILE
*
file
)
#else
void
yy_init_buffer
(
b
,
file
)
YY_BUFFER_STATE
b
;
FILE
*
file
;
#endif
/* %if-c++-only */
/* %endif */
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a asn1p_restart() or at EOF.
*/
/* %if-c-only */
static
void
asn1p__init_buffer
(
YY_BUFFER_STATE
b
,
FILE
*
file
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
yy_flush_buffer
(
b
);
{
int
oerrno
=
errno
;
asn1p__flush_buffer
(
b
);
b
->
yy_input_file
=
file
;
b
->
yy_fill_buffer
=
1
;
#if YY_ALWAYS_INTERACTIVE
b
->
yy_is_interactive
=
1
;
#else
#if YY_NEVER_INTERACTIVE
b
->
yy_is_interactive
=
0
;
#else
b
->
yy_is_interactive
=
file
?
(
isatty
(
fileno
(
file
)
)
>
0
)
:
0
;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void
yy_flush_buffer
(
YY_BUFFER_STATE
b
)
#else
void
yy_flush_buffer
(
b
)
YY_BUFFER_STATE
b
;
#endif
/* If b is the current buffer, then asn1p__init_buffer was _probably_
* called from asn1p_restart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if
(
b
!=
YY_CURRENT_BUFFER
){
b
->
yy_bs_lineno
=
1
;
b
->
yy_bs_column
=
0
;
}
/* %if-c-only */
b
->
yy_is_interactive
=
0
;
/* %endif */
/* %if-c++-only */
/* %endif */
errno
=
oerrno
;
}
{
if
(
!
b
)
/** 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.
*
*/
/* %if-c-only */
void
asn1p__flush_buffer
(
YY_BUFFER_STATE
b
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
if
(
!
b
)
return
;
b
->
yy_n_chars
=
0
;
...
...
@@ -3757,31 +4111,146 @@ YY_BUFFER_STATE b;
b
->
yy_at_bol
=
1
;
b
->
yy_buffer_status
=
YY_BUFFER_NEW
;
if
(
b
==
yy_current_buffer
)
yy_load_buffer_state
();
if
(
b
==
YY_CURRENT_BUFFER
)
asn1p__load_buffer_state
(
);
}
/* %if-c-or-c++ */
/** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
*
*/
/* %if-c-only */
void
asn1p_push_buffer_state
(
YY_BUFFER_STATE
new_buffer
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
if
(
new_buffer
==
NULL
)
return
;
asn1p_ensure_buffer_stack
();
/* This block is copied from asn1p__switch_to_buffer. */
if
(
YY_CURRENT_BUFFER
)
{
/* Flush out information for old buffer. */
*
(
yy_c_buf_p
)
=
(
yy_hold_char
);
YY_CURRENT_BUFFER_LVALUE
->
yy_buf_pos
=
(
yy_c_buf_p
);
YY_CURRENT_BUFFER_LVALUE
->
yy_n_chars
=
(
yy_n_chars
);
}
/* Only push if top exists. Otherwise, replace top. */
if
(
YY_CURRENT_BUFFER
)
(
yy_buffer_stack_top
)
++
;
YY_CURRENT_BUFFER_LVALUE
=
new_buffer
;
/* copied from asn1p__switch_to_buffer. */
asn1p__load_buffer_state
(
);
(
yy_did_buffer_switch_on_eof
)
=
1
;
}
/* %endif */
/* %if-c-or-c++ */
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*/
/* %if-c-only */
void
asn1p_pop_buffer_state
(
void
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
if
(
!
YY_CURRENT_BUFFER
)
return
;
asn1p__delete_buffer
(
YY_CURRENT_BUFFER
);
YY_CURRENT_BUFFER_LVALUE
=
NULL
;
if
((
yy_buffer_stack_top
)
>
0
)
--
(
yy_buffer_stack_top
);
if
(
YY_CURRENT_BUFFER
)
{
asn1p__load_buffer_state
(
);
(
yy_did_buffer_switch_on_eof
)
=
1
;
}
}
/* %endif */
/* %if-c-or-c++ */
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
/* %if-c-only */
static
void
asn1p_ensure_buffer_stack
(
void
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
int
num_to_alloc
;
if
(
!
(
yy_buffer_stack
))
{
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc
=
1
;
(
yy_buffer_stack
)
=
(
struct
yy_buffer_state
**
)
asn1p_alloc
(
num_to_alloc
*
sizeof
(
struct
yy_buffer_state
*
)
);
if
(
!
(
yy_buffer_stack
)
)
YY_FATAL_ERROR
(
"out of dynamic memory in asn1p_ensure_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
;
}
if
((
yy_buffer_stack_top
)
>=
((
yy_buffer_stack_max
))
-
1
){
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE
yy_scan_buffer
(
char
*
base
,
yy_size_t
size
)
#else
YY_BUFFER_STATE
yy_scan_buffer
(
base
,
size
)
char
*
base
;
yy_size_t
size
;
#endif
{
YY_BUFFER_STATE
b
;
/* Increase the buffer to prepare for a possible push. */
int
grow_size
=
8
/* arbitrary grow size */
;
num_to_alloc
=
(
yy_buffer_stack_max
)
+
grow_size
;
(
yy_buffer_stack
)
=
(
struct
yy_buffer_state
**
)
asn1p_realloc
((
yy_buffer_stack
),
num_to_alloc
*
sizeof
(
struct
yy_buffer_state
*
)
);
if
(
!
(
yy_buffer_stack
)
)
YY_FATAL_ERROR
(
"out of dynamic memory in asn1p_ensure_buffer_stack()"
)
;
/* zero only the new slots.*/
memset
((
yy_buffer_stack
)
+
(
yy_buffer_stack_max
),
0
,
grow_size
*
sizeof
(
struct
yy_buffer_state
*
));
(
yy_buffer_stack_max
)
=
num_to_alloc
;
}
}
/* %endif */
/* %if-c-only */
/** 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.
*/
YY_BUFFER_STATE
asn1p__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
)
/* They forgot to leave room for the EOB's. */
return
0
;
b
=
(
YY_BUFFER_STATE
)
yy_flex_alloc
(
sizeof
(
struct
yy_buffer_state
)
);
b
=
(
YY_BUFFER_STATE
)
asn1p_alloc
(
sizeof
(
struct
yy_buffer_state
)
);
if
(
!
b
)
YY_FATAL_ERROR
(
"out of dynamic memory in
yy
_scan_buffer()"
);
YY_FATAL_ERROR
(
"out of dynamic memory in
asn1p_
_scan_buffer()"
);
b
->
yy_buf_size
=
size
-
2
;
/* "- 2" to take care of EOB's */
b
->
yy_buf_pos
=
b
->
yy_ch_buf
=
base
;
...
...
@@ -3793,58 +4262,57 @@ yy_size_t size;
b
->
yy_fill_buffer
=
0
;
b
->
yy_buffer_status
=
YY_BUFFER_NEW
;
yy_switch_to_buffer
(
b
);
asn1p__switch_to_buffer
(
b
);
return
b
;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE
yy_scan_string
(
yyconst
char
*
yy_str
)
#else
YY_BUFFER_STATE
yy_scan_string
(
yy_str
)
yyconst
char
*
yy_str
;
#endif
{
int
len
;
for
(
len
=
0
;
yy_str
[
len
];
++
len
)
;
return
yy_scan_bytes
(
yy_str
,
len
);
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE
yy_scan_bytes
(
yyconst
char
*
bytes
,
int
len
)
#else
YY_BUFFER_STATE
yy_scan_bytes
(
bytes
,
len
)
yyconst
char
*
bytes
;
int
len
;
#endif
{
}
/* %endif */
/* %if-c-only */
/** Setup the input buffer state to scan a string. The next call to asn1p_lex() 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
* asn1p__scan_bytes() instead.
*/
YY_BUFFER_STATE
asn1p__scan_string
(
yyconst
char
*
yystr
)
{
return
asn1p__scan_bytes
(
yystr
,
strlen
(
yystr
)
);
}
/* %endif */
/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to asn1p_lex() will
* 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
asn1p__scan_bytes
(
yyconst
char
*
yybytes
,
int
_yybytes_len
)
{
YY_BUFFER_STATE
b
;
char
*
buf
;
yy_size_t
n
;
int
i
;
/* Get memory for full buffer, including space for trailing EOB's. */
n
=
len
+
2
;
buf
=
(
char
*
)
yy_flex_alloc
(
n
);
n
=
_yybytes_
len
+
2
;
buf
=
(
char
*
)
asn1p_alloc
(
n
);
if
(
!
buf
)
YY_FATAL_ERROR
(
"out of dynamic memory in
yy
_scan_bytes()"
);
YY_FATAL_ERROR
(
"out of dynamic memory in
asn1p_
_scan_bytes()"
);
for
(
i
=
0
;
i
<
len
;
++
i
)
buf
[
i
]
=
bytes
[
i
];
for
(
i
=
0
;
i
<
_yybytes_
len
;
++
i
)
buf
[
i
]
=
yy
bytes
[
i
];
buf
[
len
]
=
buf
[
len
+
1
]
=
YY_END_OF_BUFFER_CHAR
;
buf
[
_yybytes_len
]
=
buf
[
_yybytes_
len
+
1
]
=
YY_END_OF_BUFFER_CHAR
;
b
=
yy_scan_buffer
(
buf
,
n
);
b
=
asn1p__scan_buffer
(
buf
,
n
);
if
(
!
b
)
YY_FATAL_ERROR
(
"bad buffer in
yy
_scan_bytes()"
);
YY_FATAL_ERROR
(
"bad buffer in
asn1p_
_scan_bytes()"
);
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
...
...
@@ -3852,78 +4320,71 @@ int len;
b
->
yy_is_our_buffer
=
1
;
return
b
;
}
#endif
}
/* %endif */
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static
void
yy_push_state
(
int
new_state
)
#else
static
void
yy_push_state
(
new_state
)
int
new_state
;
#endif
{
if
(
yy_start_stack_ptr
>=
yy_start_stack_depth
)
/* %if-c-only */
static
void
yy_push_state
(
int
new_state
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
if
(
(
yy_start_stack_ptr
)
>=
(
yy_start_stack_depth
)
)
{
yy_size_t
new_size
;
yy_start_stack_depth
+=
YY_START_STACK_INCR
;
new_size
=
yy_start_stack_depth
*
sizeof
(
int
);
(
yy_start_stack_depth
)
+=
YY_START_STACK_INCR
;
new_size
=
(
yy_start_stack_depth
)
*
sizeof
(
int
);
if
(
!
yy_start_stack
)
yy_start_stack
=
(
int
*
)
yy_flex_alloc
(
new_size
);
if
(
!
(
yy_start_stack
)
)
(
yy_start_stack
)
=
(
int
*
)
asn1p_alloc
(
new_size
);
else
yy_start_stack
=
(
int
*
)
yy_flex_realloc
(
(
void
*
)
yy_start_stack
,
new_size
);
(
yy_start_stack
)
=
(
int
*
)
asn1p_realloc
((
void
*
)
(
yy_start_stack
),
new_size
);
if
(
!
yy_start_stack
)
YY_FATAL_ERROR
(
"out of memory expanding start-condition stack"
);
if
(
!
(
yy_start_stack
)
)
YY_FATAL_ERROR
(
"out of memory expanding start-condition stack"
);
}
yy_start_stack
[
yy_start_stack_ptr
++
]
=
YY_START
;
(
yy_start_stack
)[(
yy_start_stack_ptr
)
++
]
=
YY_START
;
BEGIN
(
new_state
);
}
#endif
}
#ifndef YY_NO_POP_STATE
static
void
yy_pop_state
()
{
if
(
--
yy_start_stack_ptr
<
0
)
/* %if-c-only */
static
void
yy_pop_state
(
void
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
if
(
--
(
yy_start_stack_ptr
)
<
0
)
YY_FATAL_ERROR
(
"start-condition stack underflow"
);
BEGIN
(
yy_start_stack
[
yy_start_stack_ptr
]);
}
#endif
BEGIN
((
yy_start_stack
)[(
yy_start_stack_ptr
)]);
}
#ifndef YY_NO_TOP_STATE
static
int
yy_top_state
()
{
return
yy_start_stack
[
yy_start_stack_ptr
-
1
];
}
#endif
/* %if-c-only */
static
int
yy_top_state
(
void
)
/* %endif */
/* %if-c++-only */
/* %endif */
{
return
(
yy_start_stack
)[(
yy_start_stack_ptr
)
-
1
];
}
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static
void
yy_fatal_error
(
yyconst
char
msg
[]
)
#else
static
void
yy_fatal_error
(
msg
)
char
msg
[];
#endif
{
(
void
)
fprintf
(
stderr
,
"%s
\n
"
,
msg
);
/* %if-c-only */
static
void
yy_fatal_error
(
yyconst
char
*
msg
)
{
(
void
)
fprintf
(
stderr
,
"%s
\n
"
,
msg
);
exit
(
YY_EXIT_FAILURE
);
}
}
/* %endif */
/* %if-c++-only */
/* %endif */
/* Redefine yyless() so it works in section 3 code. */
...
...
@@ -3931,69 +4392,217 @@ char msg[];
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */
\
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
/* Undo effects of setting up asn1p_text. */
\
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
asn1p_text[asn1p_leng] = (yy_hold_char); \
(yy_c_buf_p) = asn1p_text + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
asn1p_leng = yyless_macro_arg; \
} \
while ( 0 )
/* Accessor methods (get/set functions) to struct members. */
/* Internal utility routines. */
/* %if-c-only */
/* %if-reentrant */
/* %endif */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static
void
yy_flex_strncpy
(
char
*
s1
,
yyconst
char
*
s2
,
int
n
)
/** Get the current line number.
*
*/
int
asn1p_get_lineno
(
void
)
{
return
asn1p_lineno
;
}
/** Get the input stream.
*
*/
FILE
*
asn1p_get_in
(
void
)
{
return
asn1p_in
;
}
/** Get the output stream.
*
*/
FILE
*
asn1p_get_out
(
void
)
{
return
asn1p_out
;
}
/** Get the length of the current token.
*
*/
int
asn1p_get_leng
(
void
)
{
return
asn1p_leng
;
}
/** Get the current token.
*
*/
char
*
asn1p_get_text
(
void
)
{
return
asn1p_text
;
}
/* %if-reentrant */
/* %endif */
/** Set the current line number.
* @param line_number
*
*/
void
asn1p_set_lineno
(
int
line_number
)
{
asn1p_lineno
=
line_number
;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
* @see asn1p__switch_to_buffer
*/
void
asn1p_set_in
(
FILE
*
in_str
)
{
asn1p_in
=
in_str
;
}
void
asn1p_set_out
(
FILE
*
out_str
)
{
asn1p_out
=
out_str
;
}
int
asn1p_get_debug
(
void
)
{
return
asn1p__flex_debug
;
}
void
asn1p_set_debug
(
int
bdebug
)
{
asn1p__flex_debug
=
bdebug
;
}
/* %endif */
/* %if-reentrant */
/* %if-bison-bridge */
/* %endif */
/* %endif if-c-only */
/* %if-c-only */
static
int
yy_init_globals
(
void
)
{
/* Initialization is the same as for the non-reentrant scanner.
* This function is called from asn1p_lex_destroy(), so don't allocate here.
*/
/* We do not touch asn1p_lineno unless the option is enabled. */
asn1p_lineno
=
1
;
(
yy_buffer_stack
)
=
0
;
(
yy_buffer_stack_top
)
=
0
;
(
yy_buffer_stack_max
)
=
0
;
(
yy_c_buf_p
)
=
(
char
*
)
0
;
(
yy_init
)
=
0
;
(
yy_start
)
=
0
;
(
yy_start_stack_ptr
)
=
0
;
(
yy_start_stack_depth
)
=
0
;
(
yy_start_stack
)
=
NULL
;
(
yy_state_buf
)
=
0
;
(
yy_state_ptr
)
=
0
;
(
yy_full_match
)
=
0
;
(
yy_lp
)
=
0
;
/* Defined in main.c */
#ifdef YY_STDINIT
asn1p_in
=
stdin
;
asn1p_out
=
stdout
;
#else
static
void
yy_flex_strncpy
(
s1
,
s2
,
n
)
char
*
s1
;
yyconst
char
*
s2
;
int
n
;
asn1p_in
=
(
FILE
*
)
0
;
asn1p_out
=
(
FILE
*
)
0
;
#endif
{
/* For future reference: Set errno on error, since we are called by
* asn1p_lex_init()
*/
return
0
;
}
/* %endif */
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
/* asn1p_lex_destroy is for both reentrant and non-reentrant scanners. */
int
asn1p_lex_destroy
(
void
)
{
/* Pop the buffer stack, destroying each element. */
while
(
YY_CURRENT_BUFFER
){
asn1p__delete_buffer
(
YY_CURRENT_BUFFER
);
YY_CURRENT_BUFFER_LVALUE
=
NULL
;
asn1p_pop_buffer_state
();
}
/* Destroy the stack itself. */
asn1p_free
((
yy_buffer_stack
)
);
(
yy_buffer_stack
)
=
NULL
;
/* Destroy the start condition stack. */
asn1p_free
((
yy_start_stack
)
);
(
yy_start_stack
)
=
NULL
;
asn1p_free
(
(
yy_state_buf
)
);
(
yy_state_buf
)
=
NULL
;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
* asn1p_lex() is called, initialization will occur. */
yy_init_globals
(
);
/* %if-reentrant */
/* %endif */
return
0
;
}
/* %endif */
/*
* Internal utility routines.
*/
#ifndef yytext_ptr
static
void
yy_flex_strncpy
(
char
*
s1
,
yyconst
char
*
s2
,
int
n
)
{
register
int
i
;
for
(
i
=
0
;
i
<
n
;
++
i
)
s1
[
i
]
=
s2
[
i
];
}
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static
int
yy_flex_strlen
(
yyconst
char
*
s
)
#else
static
int
yy_flex_strlen
(
s
)
yyconst
char
*
s
;
#endif
{
static
int
yy_flex_strlen
(
yyconst
char
*
s
)
{
register
int
n
;
for
(
n
=
0
;
s
[
n
];
++
n
)
;
return
n
;
}
}
#endif
#ifdef YY_USE_PROTOS
static
void
*
yy_flex_alloc
(
yy_size_t
size
)
#else
static
void
*
yy_flex_alloc
(
size
)
yy_size_t
size
;
#endif
{
void
*
asn1p_alloc
(
yy_size_t
size
)
{
return
(
void
*
)
malloc
(
size
);
}
}
#ifdef YY_USE_PROTOS
static
void
*
yy_flex_realloc
(
void
*
ptr
,
yy_size_t
size
)
#else
static
void
*
yy_flex_realloc
(
ptr
,
size
)
void
*
ptr
;
yy_size_t
size
;
#endif
{
void
*
asn1p_realloc
(
void
*
ptr
,
yy_size_t
size
)
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
...
...
@@ -4002,28 +4611,24 @@ yy_size_t size;
* as though doing an assignment.
*/
return
(
void
*
)
realloc
(
(
char
*
)
ptr
,
size
);
}
}
#ifdef YY_USE_PROTOS
static
void
yy_flex_free
(
void
*
ptr
)
#else
static
void
yy_flex_free
(
ptr
)
void
*
ptr
;
#endif
{
free
(
ptr
);
}
void
asn1p_free
(
void
*
ptr
)
{
free
(
(
char
*
)
ptr
);
/* see asn1p_realloc() for (char *) cast */
}
/* %if-tables-serialization definitions */
/* %define-yytables The name for this specific scanner's tables. */
#define YYTABLES_NAME "yytables"
/* %endif */
/* %ok-for-header */
#if YY_MAIN
int
main
()
{
yylex
();
return
0
;
}
#endif
#line 546 "asn1p_l.l"
/*
* Very dirty but wonderful hack allowing to rule states from within .y file.
*/
...
...
@@ -4046,7 +4651,7 @@ _lex_atoi(const char *ptr) {
fprintf
(
stderr
,
"Value
\"
%s
\"
at line %d is too large "
"for this compiler! Please contact the asn1c author.
\n
"
,
ptr
,
yy
lineno
);
ptr
,
asn1p_
lineno
);
errno
=
ERANGE
;
}
return
value
;
...
...
@@ -4061,9 +4666,10 @@ _lex_atod(const char *ptr) {
fprintf
(
stderr
,
"Value
\"
%s
\"
at line %d is outside of `double` range "
"in this compiler! Please contact the asn1c author.
\n
"
,
ptr
,
yy
lineno
);
ptr
,
asn1p_
lineno
);
errno
=
ERANGE
;
}
return
value
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment