OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [ld/] [ldlex.c] - Diff between revs 205 and 210

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 205 Rev 210
Line 1... Line 1...
 
 
#line 3 "/Users/gingold/Repositories/fsf/binutils-2_20/ld/ldlex.c"
#line 3 "../../srcw/ld/ldlex.c"
 
 
#define  YY_INT_ALIGNED short int
#define  YY_INT_ALIGNED short int
 
 
/* A lexical scanner generated by flex */
/* A lexical scanner generated by flex */
 
 
Line 150... Line 150...
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
#endif
 
 
#ifndef YY_TYPEDEF_YY_SIZE_T
extern int yyleng;
#define YY_TYPEDEF_YY_SIZE_T
 
typedef size_t yy_size_t;
 
#endif
 
 
 
extern yy_size_t yyleng;
 
 
 
extern FILE *yyin, *yyout;
extern FILE *yyin, *yyout;
 
 
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_END_OF_FILE 1
Line 181... Line 176...
                } \
                } \
        while ( 0 )
        while ( 0 )
 
 
#define unput(c) yyunput( c, (yytext_ptr)  )
#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
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
struct yy_buffer_state
        {
        {
        FILE *yy_input_file;
        FILE *yy_input_file;
Line 198... Line 198...
        yy_size_t yy_buf_size;
        yy_size_t yy_buf_size;
 
 
        /* Number of characters read into yy_ch_buf, not including EOB
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
         * characters.
         */
         */
        yy_size_t yy_n_chars;
        int yy_n_chars;
 
 
        /* Whether we "own" the buffer - i.e., we know we created it,
        /* Whether we "own" the buffer - i.e., we know we created it,
         * and can realloc() it to grow it, and should free() it to
         * and can realloc() it to grow it, and should free() it to
         * delete it.
         * delete it.
         */
         */
Line 268... Line 268...
 */
 */
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 
 
/* yy_hold_char holds the character lost when yytext is formed. */
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static char yy_hold_char;
static yy_size_t yy_n_chars;            /* number of characters read into yy_ch_buf */
static int yy_n_chars;          /* number of characters read into yy_ch_buf */
yy_size_t yyleng;
int yyleng;
 
 
/* Points to current character in buffer. */
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0;          /* whether we need to initialize */
static int yy_init = 0;          /* whether we need to initialize */
static int yy_start = 0; /* start state number */
static int yy_start = 0; /* start state number */
Line 297... Line 297...
 
 
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
 
 
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
 
 
void *yyalloc (yy_size_t  );
void *yyalloc (yy_size_t  );
void *yyrealloc (void *,yy_size_t  );
void *yyrealloc (void *,yy_size_t  );
void yyfree (void *  );
void yyfree (void *  );
 
 
Line 1653... Line 1653...
 
 
 
 
 
 
 
 
 
 
#line 1659 "/Users/gingold/Repositories/fsf/binutils-2_20/ld/ldlex.c"
#line 1659 "../../srcw/ld/ldlex.c"
 
 
#define INITIAL 0
#define INITIAL 0
#define SCRIPT 1
#define SCRIPT 1
#define EXPRESSION 2
#define EXPRESSION 2
#define BOTH 3
#define BOTH 3
Line 1700... Line 1700...
 
 
FILE *yyget_out (void );
FILE *yyget_out (void );
 
 
void yyset_out  (FILE * out_str  );
void yyset_out  (FILE * out_str  );
 
 
yy_size_t yyget_leng (void );
int yyget_leng (void );
 
 
char *yyget_text (void );
char *yyget_text (void );
 
 
int yyget_lineno (void );
int yyget_lineno (void );
 
 
Line 1761... Line 1761...
#ifndef YY_INPUT
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
#define YY_INPUT(buf,result,max_size) \
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                { \
                int c = '*'; \
                int c = '*'; \
                yy_size_t n; \
                unsigned n; \
                for ( n = 0; n < max_size && \
                for ( n = 0; n < max_size && \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
                        buf[n] = (char) c; \
                if ( c == '\n' ) \
                if ( c == '\n' ) \
                        buf[n++] = (char) c; \
                        buf[n++] = (char) c; \
Line 1862... Line 1862...
        case input_defsym: return INPUT_DEFSYM; break;
        case input_defsym: return INPUT_DEFSYM; break;
        default: abort ();
        default: abort ();
        }
        }
    }
    }
 
 
#line 1868 "/Users/gingold/Repositories/fsf/binutils-2_20/ld/ldlex.c"
#line 1868 "../../srcw/ld/ldlex.c"
 
 
        if ( !(yy_init) )
        if ( !(yy_init) )
                {
                {
                (yy_init) = 1;
                (yy_init) = 1;
 
 
Line 3029... Line 3029...
case 190:
case 190:
YY_RULE_SETUP
YY_RULE_SETUP
#line 463 "ldlex.l"
#line 463 "ldlex.l"
ECHO;
ECHO;
        YY_BREAK
        YY_BREAK
#line 3035 "/Users/gingold/Repositories/fsf/binutils-2_20/ld/ldlex.c"
#line 3035 "../../srcw/ld/ldlex.c"
 
 
        case YY_END_OF_BUFFER:
        case YY_END_OF_BUFFER:
                {
                {
                /* Amount of text matched not including the EOB char. */
                /* 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;
Line 3213... Line 3213...
                 */
                 */
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
 
 
        else
        else
                {
                {
                        yy_size_t num_to_read =
                        int num_to_read =
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
 
                while ( num_to_read <= 0 )
                while ( num_to_read <= 0 )
                        { /* Not enough room in the buffer - grow it. */
                        { /* Not enough room in the buffer - grow it. */
 
 
Line 3227... Line 3227...
                        int yy_c_buf_p_offset =
                        int yy_c_buf_p_offset =
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
 
 
                        if ( b->yy_is_our_buffer )
                        if ( b->yy_is_our_buffer )
                                {
                                {
                                yy_size_t new_size = b->yy_buf_size * 2;
                                int new_size = b->yy_buf_size * 2;
 
 
                                if ( new_size <= 0 )
                                if ( new_size <= 0 )
                                        b->yy_buf_size += b->yy_buf_size / 8;
                                        b->yy_buf_size += b->yy_buf_size / 8;
                                else
                                else
                                        b->yy_buf_size *= 2;
                                        b->yy_buf_size *= 2;
Line 3258... Line 3258...
                if ( num_to_read > YY_READ_BUF_SIZE )
                if ( num_to_read > YY_READ_BUF_SIZE )
                        num_to_read = YY_READ_BUF_SIZE;
                        num_to_read = YY_READ_BUF_SIZE;
 
 
                /* Read in more data. */
                /* Read in more data. */
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
                        (yy_n_chars), num_to_read );
                        (yy_n_chars), (size_t) num_to_read );
 
 
                YY_CURRENT_BUFFER_LVALUE->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 )
Line 3368... Line 3368...
        *yy_cp = (yy_hold_char);
        *yy_cp = (yy_hold_char);
 
 
        if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
        if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
                { /* need to shift things up to make room */
                { /* need to shift things up to make room */
                /* +2 for EOB chars. */
                /* +2 for EOB chars. */
                register yy_size_t number_to_move = (yy_n_chars) + 2;
                register int number_to_move = (yy_n_chars) + 2;
                register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
                register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
                register char *source =
                register char *source =
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 
 
Line 3417... Line 3417...
                        /* This was really a NUL. */
                        /* This was really a NUL. */
                        *(yy_c_buf_p) = '\0';
                        *(yy_c_buf_p) = '\0';
 
 
                else
                else
                        { /* need more input */
                        { /* need more input */
                        yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
                        int offset = (yy_c_buf_p) - (yytext_ptr);
                        ++(yy_c_buf_p);
                        ++(yy_c_buf_p);
 
 
                        switch ( yy_get_next_buffer(  ) )
                        switch ( yy_get_next_buffer(  ) )
                                {
                                {
                                case EOB_ACT_LAST_MATCH:
                                case EOB_ACT_LAST_MATCH:
Line 3441... Line 3441...
                                        /*FALLTHROUGH*/
                                        /*FALLTHROUGH*/
 
 
                                case EOB_ACT_END_OF_FILE:
                                case EOB_ACT_END_OF_FILE:
                                        {
                                        {
                                        if ( yywrap( ) )
                                        if ( yywrap( ) )
                                                return 0;
                                                return EOF;
 
 
                                        if ( ! (yy_did_buffer_switch_on_eof) )
                                        if ( ! (yy_did_buffer_switch_on_eof) )
                                                YY_NEW_FILE;
                                                YY_NEW_FILE;
#ifdef __cplusplus
#ifdef __cplusplus
                                        return yyinput();
                                        return yyinput();
Line 3693... Line 3693...
/* Allocates the stack if it does not exist.
/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 *  Guarantees space for at least one push.
 */
 */
static void yyensure_buffer_stack (void)
static void yyensure_buffer_stack (void)
{
{
        yy_size_t num_to_alloc;
        int num_to_alloc;
 
 
        if (!(yy_buffer_stack)) {
        if (!(yy_buffer_stack)) {
 
 
                /* First allocation is just for 2 elements, since we don't know if this
                /* 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
                 * scanner will even need a stack. We use 2 instead of 1 to avoid an
Line 3790... Line 3790...
 * @param bytes the byte buffer to scan
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 *
 *
 * @return the newly allocated buffer state object.
 * @return the newly allocated buffer state object.
 */
 */
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
{
        YY_BUFFER_STATE b;
        YY_BUFFER_STATE b;
        char *buf;
        char *buf;
        yy_size_t n, i;
        yy_size_t n;
 
        int i;
 
 
        /* Get memory for full buffer, including space for trailing EOB's. */
        /* Get memory for full buffer, including space for trailing EOB's. */
        n = _yybytes_len + 2;
        n = _yybytes_len + 2;
        buf = (char *) yyalloc(n  );
        buf = (char *) yyalloc(n  );
        if ( ! buf )
        if ( ! buf )
Line 3876... Line 3877...
}
}
 
 
/** Get the length of the current token.
/** Get the length of the current token.
 *
 *
 */
 */
yy_size_t yyget_leng  (void)
int yyget_leng  (void)
{
{
        return yyleng;
        return yyleng;
}
}
 
 
/** Get the current token.
/** Get the current token.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.