Annotation of gcc/cp-lex.h, revision 1.1.1.3

1.1.1.2   root        1: /* Define constants and variables for communication with cp-parse.y.
1.1.1.3 ! root        2:    Copyright (C) 1987, 1992, 1993 Free Software Foundation, Inc.
        !             3:    Hacked by Michael Tiemann ([email protected])
        !             4:    and by Brendan Kehoe ([email protected]).
1.1       root        5: 
                      6: This file is part of GNU CC.
                      7: 
                      8: GNU CC is distributed in the hope that it will be useful,
                      9: but WITHOUT ANY WARRANTY.  No author or distributor
                     10: accepts responsibility to anyone for the consequences of using it
                     11: or for whether it serves any particular purpose or works at all,
                     12: unless he says so in writing.  Refer to the GNU CC General Public
                     13: License for full details.
                     14: 
                     15: Everyone is granted permission to copy, modify and redistribute
                     16: GNU CC, but only under the conditions described in the
                     17: GNU CC General Public License.   A copy of this license is
                     18: supposed to have been given to you along with GNU CC so you
                     19: can know your rights and responsibilities.  It should be in a
                     20: file named COPYING.  Among other things, the copyright notice
                     21: and this notice must be preserved on all copies.  */
                     22: 
                     23: 
                     24: 
                     25: enum rid
                     26: {
                     27:   RID_UNUSED,
                     28:   RID_INT,
                     29:   RID_CHAR,
1.1.1.3 ! root       30:   RID_WCHAR,
1.1       root       31:   RID_FLOAT,
                     32:   RID_DOUBLE,
                     33:   RID_VOID,
                     34: 
                     35:   /* C++ extension */
                     36:   RID_CLASS,
                     37:   RID_RECORD,
                     38:   RID_UNION,
                     39:   RID_ENUM,
                     40:   RID_LONGLONG,
                     41: 
1.1.1.3 ! root       42:   /* This is where grokdeclarator starts its search when setting the specbits.
        !            43:      The first seven are in the order of most frequently used, as found
        !            44:      building libg++.  */
        !            45: 
        !            46:   RID_EXTERN,
        !            47:   RID_CONST,
        !            48:   RID_LONG,
        !            49:   RID_TYPEDEF,
1.1       root       50:   RID_UNSIGNED,
                     51:   RID_SHORT,
1.1.1.3 ! root       52:   RID_INLINE,
        !            53: 
1.1       root       54:   RID_STATIC,
1.1.1.3 ! root       55: 
1.1       root       56:   RID_REGISTER,
                     57:   RID_VOLATILE,
                     58:   RID_FRIEND,
                     59:   RID_VIRTUAL,
                     60:   RID_PUBLIC,
                     61:   RID_PRIVATE,
                     62:   RID_PROTECTED,
1.1.1.3 ! root       63:   RID_SIGNED,
        !            64:   RID_EXCEPTION,
        !            65:   RID_RAISES,
        !            66:   RID_AUTO,
        !            67: 
        !            68:   /* Note this is 31, and is unusable in shifts where ints are 32 bits.
        !            69:      As soon as a new rid has to be added to this enum, you have to
        !            70:      stop and come up with a better way to do all of this than by
        !            71:      doing `specbits & (1 << (int) RID_FOO)', since you'll end up
        !            72:      with an integer overflow.  */
        !            73:   RID_UNUSED1,
1.1       root       74: 
                     75:   RID_MAX
                     76: };
                     77: 
1.1.1.2   root       78: #define NORID RID_UNUSED
                     79: 
1.1.1.3 ! root       80: #define RID_FIRST_MODIFIER RID_EXTERN
        !            81: 
        !            82: /* The integral type that can represent all values of RIDBIT.  */
        !            83: typedef unsigned long RID_BIT_TYPE;
        !            84: 
        !            85: /* A bit that represents the given RID_... value.  */
        !            86: #define RIDBIT(N)  ((RID_BIT_TYPE) 1 << (int) (N))
1.1.1.2   root       87: 
                     88: /* The elements of `ridpointers' are identifier nodes
                     89:    for the reserved type names and storage classes.
                     90:    It is indexed by a RID_... value.  */
                     91: extern tree ridpointers[(int) RID_MAX];
                     92: 
                     93: /* the declaration found for the last IDENTIFIER token read in.
                     94:    yylex must look this up to detect typedefs, which get token type TYPENAME,
                     95:    so it is left around in case the identifier is not a typedef but is
                     96:    used in a context which makes it a reference to a variable.  */
                     97: extern tree lastiddecl;
                     98: 
                     99: extern char *token_buffer;     /* Pointer to token buffer.  */
                    100: 
                    101: /* Back-door communication channel to the lexer.  */
                    102: extern int looking_for_typename;
                    103: 
                    104: extern tree make_pointer_declarator (), make_reference_declarator ();
                    105: extern void reinit_parse_for_function ();
                    106: extern void reinit_parse_for_method ();
                    107: extern int yylex ();

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.