1 /* Lexical analyzer for C and Objective C.
2 Copyright (C) 1987, 88, 89, 92, 94-97, 1998 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
34 /* MULTIBYTE_CHARS support only works for native compilers.
35 ??? Ideally what we want is to model widechar support after
36 the current floating point support. */
38 #undef MULTIBYTE_CHARS
41 #ifdef MULTIBYTE_CHARS
48 cpp_options parse_options
;
49 static enum cpp_token cpp_token
;
52 /* The elements of `ridpointers' are identifier nodes
53 for the reserved type names and storage classes.
54 It is indexed by a RID_... value. */
55 tree ridpointers
[(int) RID_MAX
];
57 /* Cause the `yydebug' variable to be defined. */
61 static unsigned char *yy_cur
, *yy_lim
;
68 parse_in
.limit
= parse_in
.token_buffer
;
69 cpp_token
= cpp_get_token (&parse_in
);
70 if (cpp_token
== CPP_EOF
)
72 yy_lim
= CPP_PWRITTEN (&parse_in
);
73 yy_cur
= parse_in
.token_buffer
;
79 #define GETC() (yy_cur < yy_lim ? *yy_cur++ : yy_get_token ())
80 #define UNGETC(c) ((c), yy_cur--)
82 #define GETC() getc (finput)
83 #define UNGETC(c) ungetc (c, finput)
86 /* the declaration found for the last IDENTIFIER token read in.
87 yylex must look this up to detect typedefs, which get token type TYPENAME,
88 so it is left around in case the identifier is not a typedef but is
89 used in a context which makes it a reference to a variable. */
92 /* Nonzero enables objc features. */
98 /* File used for outputting assembler code. */
99 extern FILE *asm_out_file
;
101 #ifndef WCHAR_TYPE_SIZE
103 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
105 #define WCHAR_TYPE_SIZE BITS_PER_WORD
109 /* Number of bytes in a wide character. */
110 #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT)
112 static int maxtoken
; /* Current nominal length of token buffer. */
113 char *token_buffer
; /* Pointer to token buffer.
114 Actual allocated length is maxtoken + 2.
115 This is not static because objc-parse.y uses it. */
117 static int indent_level
= 0; /* Number of { minus number of }. */
119 /* Nonzero if end-of-file has been seen on input. */
120 static int end_of_file
;
123 /* Buffered-back input character; faster than using ungetc. */
124 static int nextchar
= -1;
127 #ifdef HANDLE_SYSV_PRAGMA
128 static int handle_sysv_pragma
PROTO((int));
129 #endif /* HANDLE_SYSV_PRAGMA */
130 static int whitespace_cr
PROTO((int));
131 static int skip_white_space
PROTO((int));
132 static char *extend_token_buffer
PROTO((char *));
133 static int readescape
PROTO((int *));
134 int check_newline ();
136 /* Do not insert generated code into the source, instead, include it.
137 This allows us to build gcc automatically even for targets that
138 need to add or modify the reserved keyword lists. */
141 /* Return something to represent absolute declarators containing a *.
142 TARGET is the absolute declarator that the * contains.
143 TYPE_QUALS is a list of modifiers such as const or volatile
144 to apply to the pointer type, represented as identifiers.
146 We return an INDIRECT_REF whose "contents" are TARGET
147 and whose type is the modifier list. */
150 make_pointer_declarator (type_quals
, target
)
151 tree type_quals
, target
;
153 return build1 (INDIRECT_REF
, type_quals
, target
);
157 forget_protocol_qualifiers ()
159 int i
, n
= sizeof wordlist
/ sizeof (struct resword
);
161 for (i
= 0; i
< n
; i
++)
162 if ((int) wordlist
[i
].rid
>= (int) RID_IN
163 && (int) wordlist
[i
].rid
<= (int) RID_ONEWAY
)
164 wordlist
[i
].name
= "";
168 remember_protocol_qualifiers ()
170 int i
, n
= sizeof wordlist
/ sizeof (struct resword
);
172 for (i
= 0; i
< n
; i
++)
173 if (wordlist
[i
].rid
== RID_IN
)
174 wordlist
[i
].name
= "in";
175 else if (wordlist
[i
].rid
== RID_OUT
)
176 wordlist
[i
].name
= "out";
177 else if (wordlist
[i
].rid
== RID_INOUT
)
178 wordlist
[i
].name
= "inout";
179 else if (wordlist
[i
].rid
== RID_BYCOPY
)
180 wordlist
[i
].name
= "bycopy";
181 else if (wordlist
[i
].rid
== RID_ONEWAY
)
182 wordlist
[i
].name
= "oneway";
187 init_parse (filename
)
194 cpp_reader_init (&parse_in
);
195 parse_in
.data
= &parse_options
;
196 cpp_options_init (&parse_options
);
197 cpp_handle_options (&parse_in
, 0, NULL
); /* FIXME */
198 parse_in
.show_column
= 1;
199 if (! cpp_start_read (&parse_in
, filename
))
206 cpp_finish (&parse_in
);
213 /* Make identifier nodes long enough for the language-specific slots. */
214 set_identifier_size (sizeof (struct lang_identifier
));
216 /* Start it at 0, because check_newline is called at the very beginning
217 and will increment it to 1. */
220 #ifdef MULTIBYTE_CHARS
221 /* Change to the native locale for multibyte conversions. */
222 setlocale (LC_CTYPE
, "");
226 token_buffer
= (char *) xmalloc (maxtoken
+ 2);
228 ridpointers
[(int) RID_INT
] = get_identifier ("int");
229 ridpointers
[(int) RID_CHAR
] = get_identifier ("char");
230 ridpointers
[(int) RID_VOID
] = get_identifier ("void");
231 ridpointers
[(int) RID_FLOAT
] = get_identifier ("float");
232 ridpointers
[(int) RID_DOUBLE
] = get_identifier ("double");
233 ridpointers
[(int) RID_SHORT
] = get_identifier ("short");
234 ridpointers
[(int) RID_LONG
] = get_identifier ("long");
235 ridpointers
[(int) RID_UNSIGNED
] = get_identifier ("unsigned");
236 ridpointers
[(int) RID_SIGNED
] = get_identifier ("signed");
237 ridpointers
[(int) RID_INLINE
] = get_identifier ("inline");
238 ridpointers
[(int) RID_CONST
] = get_identifier ("const");
239 ridpointers
[(int) RID_VOLATILE
] = get_identifier ("volatile");
240 ridpointers
[(int) RID_AUTO
] = get_identifier ("auto");
241 ridpointers
[(int) RID_STATIC
] = get_identifier ("static");
242 ridpointers
[(int) RID_EXTERN
] = get_identifier ("extern");
243 ridpointers
[(int) RID_TYPEDEF
] = get_identifier ("typedef");
244 ridpointers
[(int) RID_REGISTER
] = get_identifier ("register");
245 ridpointers
[(int) RID_ITERATOR
] = get_identifier ("iterator");
246 ridpointers
[(int) RID_COMPLEX
] = get_identifier ("complex");
247 ridpointers
[(int) RID_ID
] = get_identifier ("id");
248 ridpointers
[(int) RID_IN
] = get_identifier ("in");
249 ridpointers
[(int) RID_OUT
] = get_identifier ("out");
250 ridpointers
[(int) RID_INOUT
] = get_identifier ("inout");
251 ridpointers
[(int) RID_BYCOPY
] = get_identifier ("bycopy");
252 ridpointers
[(int) RID_ONEWAY
] = get_identifier ("oneway");
253 forget_protocol_qualifiers();
255 /* Some options inhibit certain reserved words.
256 Clear those words out of the hash table so they won't be recognized. */
257 #define UNSET_RESERVED_WORD(STRING) \
258 do { struct resword *s = is_reserved_word (STRING, sizeof (STRING) - 1); \
259 if (s) s->name = ""; } while (0)
261 if (! doing_objc_thang
)
262 UNSET_RESERVED_WORD ("id");
264 if (flag_traditional
)
266 UNSET_RESERVED_WORD ("const");
267 UNSET_RESERVED_WORD ("volatile");
268 UNSET_RESERVED_WORD ("typeof");
269 UNSET_RESERVED_WORD ("signed");
270 UNSET_RESERVED_WORD ("inline");
271 UNSET_RESERVED_WORD ("iterator");
272 UNSET_RESERVED_WORD ("complex");
276 UNSET_RESERVED_WORD ("asm");
277 UNSET_RESERVED_WORD ("typeof");
278 UNSET_RESERVED_WORD ("inline");
279 UNSET_RESERVED_WORD ("iterator");
280 UNSET_RESERVED_WORD ("complex");
285 reinit_parse_for_function ()
289 /* Function used when yydebug is set, to print a token in more detail. */
292 yyprint (file
, yychar
, yylval
)
304 if (IDENTIFIER_POINTER (t
))
305 fprintf (file
, " `%s'", IDENTIFIER_POINTER (t
));
310 if (TREE_CODE (t
) == INTEGER_CST
)
312 #if HOST_BITS_PER_WIDE_INT == 64
313 #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
316 #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
323 #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
329 TREE_INT_CST_HIGH (t
), TREE_INT_CST_LOW (t
));
334 /* Iff C is a carriage return, warn about it - if appropriate -
335 and return nonzero. */
340 static int newline_warning
= 0;
344 /* ANSI C says the effects of a carriage return in a source file
346 if (pedantic
&& !newline_warning
)
348 warning ("carriage return in source file");
349 warning ("(we only warn about the first carriage return)");
357 /* If C is not whitespace, return C.
358 Otherwise skip whitespace and return first nonwhite char read. */
368 /* We don't recognize comments here, because
369 cpp output can include / and * consecutively as operators.
370 Also, there's no need, since cpp removes all comments. */
373 c
= check_newline ();
394 error ("stray '\\' in program");
404 /* Skips all of the white space at the current location in the input file.
405 Must use and reset nextchar if it has the next character. */
408 position_after_white_space ()
414 c
= nextchar
, nextchar
= -1;
419 UNGETC (skip_white_space (c
));
422 /* Like skip_white_space, but don't advance beyond the end of line.
423 Moreover, we don't get passed a character to start with. */
425 skip_white_space_on_line ()
454 /* Make the token buffer longer, preserving the data in it.
455 P should point to just beyond the last valid character in the old buffer.
456 The value we return is a pointer to the new buffer
457 at a place corresponding to P. */
460 extend_token_buffer (p
)
463 int offset
= p
- token_buffer
;
465 maxtoken
= maxtoken
* 2 + 10;
466 token_buffer
= (char *) xrealloc (token_buffer
, maxtoken
+ 2);
468 return token_buffer
+ offset
;
472 #define GET_DIRECTIVE_LINE() get_directive_line (finput)
473 #else /* USE_CPPLIB */
474 /* Read the rest of a #-directive from input stream FINPUT.
475 In normal use, the directive name and the white space after it
476 have already been read, so they won't be included in the result.
477 We allow for the fact that the directive line may contain
478 a newline embedded within a character or string literal which forms
479 a part of the directive.
481 The value is a string in a reusable buffer. It remains valid
482 only until the next time this function is called. */
485 GET_DIRECTIVE_LINE ()
487 static char *directive_buffer
= NULL
;
488 static unsigned buffer_length
= 0;
490 register char *buffer_limit
;
491 register int looking_for
= 0;
492 register int char_escaped
= 0;
494 if (buffer_length
== 0)
496 directive_buffer
= (char *)xmalloc (128);
500 buffer_limit
= &directive_buffer
[buffer_length
];
502 for (p
= directive_buffer
; ; )
506 /* Make buffer bigger if it is full. */
507 if (p
>= buffer_limit
)
509 register unsigned bytes_used
= (p
- directive_buffer
);
513 = (char *)xrealloc (directive_buffer
, buffer_length
);
514 p
= &directive_buffer
[bytes_used
];
515 buffer_limit
= &directive_buffer
[buffer_length
];
520 /* Discard initial whitespace. */
521 if ((c
== ' ' || c
== '\t') && p
== directive_buffer
)
524 /* Detect the end of the directive. */
525 if (c
== '\n' && looking_for
== 0)
534 return directive_buffer
;
536 /* Handle string and character constant syntax. */
539 if (looking_for
== c
&& !char_escaped
)
540 looking_for
= 0; /* Found terminator... stop looking. */
543 if (c
== '\'' || c
== '"')
544 looking_for
= c
; /* Don't stop buffering until we see another
545 another one of these (or an EOF). */
547 /* Handle backslash. */
548 char_escaped
= (c
== '\\' && ! char_escaped
);
551 #endif /* USE_CPPLIB */
553 /* At the beginning of a line, increment the line number
554 and process any #-directive on this line.
555 If the line is a #-directive, read the entire line and return a newline.
556 Otherwise, return the line's first non-whitespace character. */
566 /* Read first nonwhite char on the line. */
569 while (c
== ' ' || c
== '\t')
574 /* If not #, return it so caller will use it. */
578 /* Read first nonwhite char after the `#'. */
581 while (c
== ' ' || c
== '\t')
584 /* If a letter follows, then if the word here is `line', skip
585 it and ignore it; otherwise, ignore the line, with an error
586 if the word isn't `pragma', `ident', `define', or `undef'. */
588 if ((c
>= 'a' && c
<= 'z') || (c
>= 'A' && c
<= 'Z'))
597 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'
598 || whitespace_cr (c
) ))
600 while (c
== ' ' || c
== '\t' || whitespace_cr (c
))
604 #ifdef HANDLE_SYSV_PRAGMA
607 if (token
!= IDENTIFIER
)
609 return handle_sysv_pragma (token
);
610 #else /* !HANDLE_SYSV_PRAGMA */
615 if (token
!= IDENTIFIER
)
617 if (HANDLE_PRAGMA (finput
, yylval
.ttype
))
623 ??? do not know what to
do ???;
624 #endif /* !USE_CPPLIB */
625 #endif /* HANDLE_PRAGMA */
626 #endif /* !HANDLE_SYSV_PRAGMA */
638 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'))
641 debug_define (lineno
, GET_DIRECTIVE_LINE ());
651 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'))
654 debug_undef (lineno
, GET_DIRECTIVE_LINE ());
663 && ((c
= GETC()) == ' ' || c
== '\t'))
672 && ((c
= GETC()) == ' ' || c
== '\t'))
674 /* #ident. The pedantic warning is now in cccp.c. */
676 /* Here we have just seen `#ident '.
677 A string constant should follow. */
679 c
= skip_white_space_on_line ();
681 /* If no argument, ignore the line. */
688 || TREE_CODE (yylval
.ttype
) != STRING_CST
)
690 error ("invalid #ident");
696 #ifdef ASM_OUTPUT_IDENT
697 ASM_OUTPUT_IDENT (asm_out_file
, TREE_STRING_POINTER (yylval
.ttype
));
701 /* Skip the rest of this line. */
706 error ("undefined or invalid # directive");
711 /* Here we have either `#line' or `# <nonletter>'.
712 In either case, it should be a line number; a digit should follow. */
714 /* Can't use skip_white_space here, but must handle all whitespace
715 that is not '\n', lest we get a recursion for '\r' '\n' when
718 c
= skip_white_space_on_line ();
720 /* If the # is the only nonwhite char on the line,
721 just ignore it. Check the new newline. */
725 /* Something follows the #; read a token. */
730 if (token
== CONSTANT
731 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
)
733 int old_lineno
= lineno
;
735 /* subtract one, because it is the following line that
736 gets the specified number */
738 int l
= TREE_INT_CST_LOW (yylval
.ttype
) - 1;
740 /* Is this the last nonwhite stuff on the line? */
741 c
= skip_white_space_on_line ();
744 /* No more: store the line number and check following line. */
750 /* More follows: it must be a string constant (filename). */
752 /* Read the string constant. */
755 if (token
!= STRING
|| TREE_CODE (yylval
.ttype
) != STRING_CST
)
757 error ("invalid #line");
762 = (char *) permalloc (TREE_STRING_LENGTH (yylval
.ttype
) + 1);
763 strcpy (input_filename
, TREE_STRING_POINTER (yylval
.ttype
));
766 /* Each change of file name
767 reinitializes whether we are now in a system header. */
768 in_system_header
= 0;
770 if (main_input_filename
== 0)
771 main_input_filename
= input_filename
;
773 /* Is this the last nonwhite stuff on the line? */
774 c
= skip_white_space_on_line ();
777 /* Update the name in the top element of input_file_stack. */
778 if (input_file_stack
)
779 input_file_stack
->name
= input_filename
;
788 /* `1' after file name means entering new file.
789 `2' after file name means just left a file. */
791 if (token
== CONSTANT
792 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
)
794 if (TREE_INT_CST_LOW (yylval
.ttype
) == 1)
796 /* Pushing to a new file. */
798 = (struct file_stack
*) xmalloc (sizeof (struct file_stack
));
799 input_file_stack
->line
= old_lineno
;
800 p
->next
= input_file_stack
;
801 p
->name
= input_filename
;
802 p
->indent_level
= indent_level
;
803 input_file_stack
= p
;
804 input_file_stack_tick
++;
805 debug_start_source_file (input_filename
);
808 else if (TREE_INT_CST_LOW (yylval
.ttype
) == 2)
810 /* Popping out of a file. */
811 if (input_file_stack
->next
)
813 struct file_stack
*p
= input_file_stack
;
814 if (indent_level
!= p
->indent_level
)
816 warning_with_file_and_line
817 (p
->name
, old_lineno
,
818 "This file contains more `%c's than `%c's.",
819 indent_level
> p
->indent_level
? '{' : '}',
820 indent_level
> p
->indent_level
? '}' : '{');
822 input_file_stack
= p
->next
;
824 input_file_stack_tick
++;
825 debug_end_source_file (input_file_stack
->line
);
828 error ("#-lines for entering and leaving files don't match");
834 /* Now that we've pushed or popped the input stack,
835 update the name in the top element. */
836 if (input_file_stack
)
837 input_file_stack
->name
= input_filename
;
839 /* If we have handled a `1' or a `2',
840 see if there is another number to read. */
843 /* Is this the last nonwhite stuff on the line? */
844 c
= skip_white_space_on_line ();
853 /* `3' after file name means this is a system header file. */
855 if (token
== CONSTANT
856 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
857 && TREE_INT_CST_LOW (yylval
.ttype
) == 3)
858 in_system_header
= 1, used_up
= 1;
862 /* Is this the last nonwhite stuff on the line? */
863 c
= skip_white_space_on_line ();
869 warning ("unrecognized text at end of #line");
872 error ("invalid #-line");
874 /* skip the rest of this line. */
877 if (c
!= '\n' && c
!= EOF
&& nextchar
>= 0)
878 c
= nextchar
, nextchar
= -1;
880 while (c
!= '\n' && c
!= EOF
)
885 #ifdef HANDLE_SYSV_PRAGMA
887 /* Handle a #pragma directive.
888 TOKEN is the token we read after `#pragma'. Processes the entire input
889 line and returns a character for the caller to reread: either \n or EOF. */
891 /* This function has to be in this file, in order to get at
895 handle_sysv_pragma (token
)
908 handle_pragma_token (token_buffer
, yylval
.ttype
);
911 handle_pragma_token (token_buffer
, 0);
915 c
= nextchar
, nextchar
= -1;
920 while (c
== ' ' || c
== '\t')
922 if (c
== '\n' || c
== EOF
)
924 handle_pragma_token (0, 0);
932 #endif /* HANDLE_SYSV_PRAGMA */
934 #define ENDFILE -1 /* token that represents end-of-file */
936 /* Read an escape sequence, returning its equivalent as a character,
937 or store 1 in *ignore_ptr if it is backslash-newline. */
940 readescape (ignore_ptr
)
943 register int c
= GETC();
945 register unsigned count
;
946 unsigned firstdig
= 0;
952 if (warn_traditional
)
953 warning ("the meaning of `\\x' varies with -traditional");
955 if (flag_traditional
)
964 if (!(c
>= 'a' && c
<= 'f')
965 && !(c
>= 'A' && c
<= 'F')
966 && !(c
>= '0' && c
<= '9'))
972 if (c
>= 'a' && c
<= 'f')
973 code
+= c
- 'a' + 10;
974 if (c
>= 'A' && c
<= 'F')
975 code
+= c
- 'A' + 10;
976 if (c
>= '0' && c
<= '9')
978 if (code
!= 0 || count
!= 0)
987 error ("\\x used with no following hex digits");
989 /* Digits are all 0's. Ok. */
991 else if ((count
- 1) * 4 >= TYPE_PRECISION (integer_type_node
)
993 && ((1 << (TYPE_PRECISION (integer_type_node
) - (count
- 1) * 4))
995 pedwarn ("hex escape out of range");
998 case '0': case '1': case '2': case '3': case '4':
999 case '5': case '6': case '7':
1002 while ((c
<= '7') && (c
>= '0') && (count
++ < 3))
1004 code
= (code
* 8) + (c
- '0');
1010 case '\\': case '\'': case '"':
1019 return TARGET_NEWLINE
;
1034 if (warn_traditional
)
1035 warning ("the meaning of `\\a' varies with -traditional");
1037 if (flag_traditional
)
1042 #if 0 /* Vertical tab is present in common usage compilers. */
1043 if (flag_traditional
)
1051 pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c
);
1057 /* `\(', etc, are used at beginning of line to avoid confusing Emacs. */
1061 /* `\%' is used to prevent SCCS from getting confused. */
1064 pedwarn ("non-ANSI escape sequence `\\%c'", c
);
1067 if (c
>= 040 && c
< 0177)
1068 pedwarn ("unknown escape sequence `\\%c'", c
);
1070 pedwarn ("unknown escape sequence: `\\' followed by char code 0x%x", c
);
1080 strcpy (buf
, string
);
1082 /* We can't print string and character constants well
1083 because the token_buffer contains the result of processing escapes. */
1085 strcat (buf
, " at end of input");
1086 else if (token_buffer
[0] == 0)
1087 strcat (buf
, " at null character");
1088 else if (token_buffer
[0] == '"')
1089 strcat (buf
, " before string constant");
1090 else if (token_buffer
[0] == '\'')
1091 strcat (buf
, " before character constant");
1092 else if (token_buffer
[0] < 040 || (unsigned char) token_buffer
[0] >= 0177)
1093 sprintf (buf
+ strlen (buf
), " before character 0%o",
1094 (unsigned char) token_buffer
[0]);
1096 strcat (buf
, " before `%s'");
1098 error (buf
, token_buffer
);
1108 char long_long_flag
;
1111 struct try_type type_sequence
[] =
1113 { &integer_type_node
, 0, 0, 0},
1114 { &unsigned_type_node
, 1, 0, 0},
1115 { &long_integer_type_node
, 0, 1, 0},
1116 { &long_unsigned_type_node
, 1, 1, 0},
1117 { &long_long_integer_type_node
, 0, 1, 1},
1118 { &long_long_unsigned_type_node
, 1, 1, 1}
1133 c
= nextchar
, nextchar
= -1;
1138 /* Effectively do c = skip_white_space (c)
1139 but do it faster in the usual cases. */
1152 /* Call skip_white_space so we can warn if appropriate. */
1157 c
= skip_white_space (c
);
1159 goto found_nonwhite
;
1163 token_buffer
[0] = c
;
1164 token_buffer
[1] = 0;
1166 /* yylloc.first_line = lineno; */
1172 token_buffer
[0] = 0;
1177 /* Capital L may start a wide-string or wide-character constant. */
1179 register int c
= GETC();
1188 goto string_constant
;
1195 if (!doing_objc_thang
)
1202 /* '@' may start a constant string object. */
1203 register int c
= GETC ();
1207 goto string_constant
;
1210 /* Fall through to treat '@' as the start of an identifier. */
1213 case 'A': case 'B': case 'C': case 'D': case 'E':
1214 case 'F': case 'G': case 'H': case 'I': case 'J':
1215 case 'K': case 'M': case 'N': case 'O':
1216 case 'P': case 'Q': case 'R': case 'S': case 'T':
1217 case 'U': case 'V': case 'W': case 'X': case 'Y':
1219 case 'a': case 'b': case 'c': case 'd': case 'e':
1220 case 'f': case 'g': case 'h': case 'i': case 'j':
1221 case 'k': case 'l': case 'm': case 'n': case 'o':
1222 case 'p': case 'q': case 'r': case 's': case 't':
1223 case 'u': case 'v': case 'w': case 'x': case 'y':
1229 while (isalnum (c
) || c
== '_' || c
== '$' || c
== '@')
1231 /* Make sure this char really belongs in an identifier. */
1232 if (c
== '@' && ! doing_objc_thang
)
1236 if (! dollars_in_ident
)
1237 error ("`$' in identifier");
1239 pedwarn ("`$' in identifier");
1242 if (p
>= token_buffer
+ maxtoken
)
1243 p
= extend_token_buffer (p
);
1259 /* Try to recognize a keyword. Uses minimum-perfect hash function */
1262 register struct resword
*ptr
;
1264 if ((ptr
= is_reserved_word (token_buffer
, p
- token_buffer
)))
1267 yylval
.ttype
= ridpointers
[(int) ptr
->rid
];
1268 value
= (int) ptr
->token
;
1270 /* Only return OBJECTNAME if it is a typedef. */
1271 if (doing_objc_thang
&& value
== OBJECTNAME
)
1273 lastiddecl
= lookup_name(yylval
.ttype
);
1275 if (lastiddecl
== NULL_TREE
1276 || TREE_CODE (lastiddecl
) != TYPE_DECL
)
1280 /* Even if we decided to recognize asm, still perhaps warn. */
1282 && (value
== ASM_KEYWORD
|| value
== TYPEOF
1283 || ptr
->rid
== RID_INLINE
)
1284 && token_buffer
[0] != '_')
1285 pedwarn ("ANSI does not permit the keyword `%s'",
1290 /* If we did not find a keyword, look for an identifier
1293 if (value
== IDENTIFIER
)
1295 if (token_buffer
[0] == '@')
1296 error("invalid identifier `%s'", token_buffer
);
1298 yylval
.ttype
= get_identifier (token_buffer
);
1299 lastiddecl
= lookup_name (yylval
.ttype
);
1301 if (lastiddecl
!= 0 && TREE_CODE (lastiddecl
) == TYPE_DECL
)
1303 /* A user-invisible read-only initialized variable
1304 should be replaced by its value.
1305 We handle only strings since that's the only case used in C. */
1306 else if (lastiddecl
!= 0 && TREE_CODE (lastiddecl
) == VAR_DECL
1307 && DECL_IGNORED_P (lastiddecl
)
1308 && TREE_READONLY (lastiddecl
)
1309 && DECL_INITIAL (lastiddecl
) != 0
1310 && TREE_CODE (DECL_INITIAL (lastiddecl
)) == STRING_CST
)
1312 tree stringval
= DECL_INITIAL (lastiddecl
);
1314 /* Copy the string value so that we won't clobber anything
1315 if we put something in the TREE_CHAIN of this one. */
1316 yylval
.ttype
= build_string (TREE_STRING_LENGTH (stringval
),
1317 TREE_STRING_POINTER (stringval
));
1320 else if (doing_objc_thang
)
1322 tree objc_interface_decl
= is_class_name (yylval
.ttype
);
1324 if (objc_interface_decl
)
1327 yylval
.ttype
= objc_interface_decl
;
1337 /* Check first for common special case: single-digit 0 or 1. */
1340 UNGETC (next_c
); /* Always undo this lookahead. */
1341 if (!isalnum (next_c
) && next_c
!= '.')
1343 token_buffer
[0] = (char)c
, token_buffer
[1] = '\0';
1344 yylval
.ttype
= (c
== '0') ? integer_zero_node
: integer_one_node
;
1350 case '2': case '3': case '4':
1351 case '5': case '6': case '7': case '8': case '9':
1356 int largest_digit
= 0;
1358 /* for multi-precision arithmetic,
1359 we actually store only HOST_BITS_PER_CHAR bits in each part.
1360 The number of parts is chosen so as to be sufficient to hold
1361 the enough bits to fit into the two HOST_WIDE_INTs that contain
1362 the integer value (this is always at least as many bits as are
1363 in a target `long long' value, but may be wider). */
1364 #define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2)
1365 int parts
[TOTAL_PARTS
];
1368 enum anon1
{ NOT_FLOAT
, AFTER_POINT
, TOO_MANY_POINTS
} floatflag
1371 for (count
= 0; count
< TOTAL_PARTS
; count
++)
1379 *p
++ = (c
= GETC());
1380 if ((c
== 'x') || (c
== 'X'))
1383 *p
++ = (c
= GETC());
1385 /* Leading 0 forces octal unless the 0 is the only digit. */
1386 else if (c
>= '0' && c
<= '9')
1395 /* Read all the digits-and-decimal-points. */
1398 || (isalnum (c
) && c
!= 'l' && c
!= 'L'
1399 && c
!= 'u' && c
!= 'U'
1400 && c
!= 'i' && c
!= 'I' && c
!= 'j' && c
!= 'J'
1401 && (floatflag
== NOT_FLOAT
|| ((c
!= 'f') && (c
!= 'F')))))
1406 error ("floating constant may not be in radix 16");
1407 if (floatflag
== TOO_MANY_POINTS
)
1408 /* We have already emitted an error. Don't need another. */
1410 else if (floatflag
== AFTER_POINT
)
1412 error ("malformed floating constant");
1413 floatflag
= TOO_MANY_POINTS
;
1414 /* Avoid another error from atof by forcing all characters
1415 from here on to be ignored. */
1419 floatflag
= AFTER_POINT
;
1423 /* Accept '.' as the start of a floating-point number
1424 only when it is followed by a digit.
1425 Otherwise, unread the following non-digit
1426 and use the '.' as a structural token. */
1427 if (p
== token_buffer
+ 2 && !isdigit (c
))
1438 error ("parse error at `..'");
1441 token_buffer
[1] = 0;
1448 /* It is not a decimal point.
1449 It should be a digit (perhaps a hex digit). */
1455 else if (base
<= 10)
1457 if (c
== 'e' || c
== 'E')
1460 floatflag
= AFTER_POINT
;
1461 break; /* start of exponent */
1463 error ("nondigits in number and not hexadecimal");
1474 if (c
>= largest_digit
)
1478 for (count
= 0; count
< TOTAL_PARTS
; count
++)
1480 parts
[count
] *= base
;
1484 += (parts
[count
-1] >> HOST_BITS_PER_CHAR
);
1486 &= (1 << HOST_BITS_PER_CHAR
) - 1;
1492 /* If the extra highest-order part ever gets anything in it,
1493 the number is certainly too big. */
1494 if (parts
[TOTAL_PARTS
- 1] != 0)
1497 if (p
>= token_buffer
+ maxtoken
- 3)
1498 p
= extend_token_buffer (p
);
1499 *p
++ = (c
= GETC());
1504 error ("numeric constant with no digits");
1506 if (largest_digit
>= base
)
1507 error ("numeric constant contains digits beyond the radix");
1509 /* Remove terminating char from the token buffer and delimit the string */
1512 if (floatflag
!= NOT_FLOAT
)
1514 tree type
= double_type_node
;
1516 int conversion_errno
= 0;
1517 REAL_VALUE_TYPE value
;
1520 /* Read explicit exponent if any, and put it in tokenbuf. */
1522 if ((c
== 'e') || (c
== 'E'))
1524 if (p
>= token_buffer
+ maxtoken
- 3)
1525 p
= extend_token_buffer (p
);
1528 if ((c
== '+') || (c
== '-'))
1534 error ("floating constant exponent has no digits");
1537 if (p
>= token_buffer
+ maxtoken
- 3)
1538 p
= extend_token_buffer (p
);
1546 /* Convert string to a double, checking for overflow. */
1547 if (setjmp (handler
))
1549 error ("floating constant out of range");
1554 int fflag
= 0, lflag
= 0;
1555 /* Copy token_buffer now, while it has just the number
1556 and not the suffixes; once we add `f' or `i',
1557 REAL_VALUE_ATOF may not work any more. */
1558 char *copy
= (char *) alloca (p
- token_buffer
+ 1);
1559 bcopy (token_buffer
, copy
, p
- token_buffer
+ 1);
1561 set_float_handler (handler
);
1567 /* Read the suffixes to choose a data type. */
1572 error ("more than one `f' in numeric constant");
1578 error ("more than one `l' in numeric constant");
1584 error ("more than one `i' or `j' in numeric constant");
1586 pedwarn ("ANSI C forbids imaginary numeric constants");
1597 if (p
>= token_buffer
+ maxtoken
- 3)
1598 p
= extend_token_buffer (p
);
1604 /* The second argument, machine_mode, of REAL_VALUE_ATOF
1605 tells the desired precision of the binary result
1606 of decimal-to-binary conversion. */
1611 error ("both `f' and `l' in floating constant");
1613 type
= float_type_node
;
1615 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
1616 conversion_errno
= errno
;
1617 /* A diagnostic is required here by some ANSI C testsuites.
1618 This is not pedwarn, become some people don't want
1619 an error for this. */
1620 if (REAL_VALUE_ISINF (value
) && pedantic
)
1621 warning ("floating point number exceeds range of `float'");
1625 type
= long_double_type_node
;
1627 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
1628 conversion_errno
= errno
;
1629 if (REAL_VALUE_ISINF (value
) && pedantic
)
1630 warning ("floating point number exceeds range of `long double'");
1635 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
1636 conversion_errno
= errno
;
1637 if (REAL_VALUE_ISINF (value
) && pedantic
)
1638 warning ("floating point number exceeds range of `double'");
1641 set_float_handler (NULL_PTR
);
1644 /* ERANGE is also reported for underflow,
1645 so test the value to distinguish overflow from that. */
1646 if (conversion_errno
== ERANGE
&& !flag_traditional
&& pedantic
1647 && (REAL_VALUES_LESS (dconst1
, value
)
1648 || REAL_VALUES_LESS (value
, dconstm1
)))
1649 warning ("floating point number exceeds range of `double'");
1652 /* If the result is not a number, assume it must have been
1653 due to some error message above, so silently convert
1655 if (REAL_VALUE_ISNAN (value
))
1658 /* Create a node with determined type and value. */
1660 yylval
.ttype
= build_complex (NULL_TREE
,
1661 convert (type
, integer_zero_node
),
1662 build_real (type
, value
));
1664 yylval
.ttype
= build_real (type
, value
);
1668 tree traditional_type
, ansi_type
, type
;
1669 HOST_WIDE_INT high
, low
;
1670 int spec_unsigned
= 0;
1672 int spec_long_long
= 0;
1676 traditional_type
= ansi_type
= type
= NULL_TREE
;
1679 if (c
== 'u' || c
== 'U')
1682 error ("two `u's in integer constant");
1685 else if (c
== 'l' || c
== 'L')
1690 error ("three `l's in integer constant");
1692 pedwarn ("ANSI C forbids long long integer constants");
1697 else if (c
== 'i' || c
== 'j' || c
== 'I' || c
== 'J')
1700 error ("more than one `i' or `j' in numeric constant");
1702 pedwarn ("ANSI C forbids imaginary numeric constants");
1707 if (p
>= token_buffer
+ maxtoken
- 3)
1708 p
= extend_token_buffer (p
);
1713 /* If the constant won't fit in an unsigned long long,
1714 then warn that the constant is out of range. */
1716 /* ??? This assumes that long long and long integer types are
1717 a multiple of 8 bits. This better than the original code
1718 though which assumed that long was exactly 32 bits and long
1719 long was exactly 64 bits. */
1721 bytes
= TYPE_PRECISION (long_long_integer_type_node
) / 8;
1724 for (i
= bytes
; i
< TOTAL_PARTS
; i
++)
1728 pedwarn ("integer constant out of range");
1730 /* This is simplified by the fact that our constant
1731 is always positive. */
1735 for (i
= 0; i
< HOST_BITS_PER_WIDE_INT
/ HOST_BITS_PER_CHAR
; i
++)
1737 high
|= ((HOST_WIDE_INT
) parts
[i
+ (HOST_BITS_PER_WIDE_INT
1738 / HOST_BITS_PER_CHAR
)]
1739 << (i
* HOST_BITS_PER_CHAR
));
1740 low
|= (HOST_WIDE_INT
) parts
[i
] << (i
* HOST_BITS_PER_CHAR
);
1743 yylval
.ttype
= build_int_2 (low
, high
);
1744 TREE_TYPE (yylval
.ttype
) = long_long_unsigned_type_node
;
1746 /* If warn_traditional, calculate both the ANSI type and the
1747 traditional type, then see if they disagree.
1748 Otherwise, calculate only the type for the dialect in use. */
1749 if (warn_traditional
|| flag_traditional
)
1751 /* Calculate the traditional type. */
1752 /* Traditionally, any constant is signed;
1753 but if unsigned is specified explicitly, obey that.
1754 Use the smallest size with the right number of bits,
1755 except for one special case with decimal constants. */
1756 if (! spec_long
&& base
!= 10
1757 && int_fits_type_p (yylval
.ttype
, unsigned_type_node
))
1758 traditional_type
= (spec_unsigned
? unsigned_type_node
1759 : integer_type_node
);
1760 /* A decimal constant must be long
1761 if it does not fit in type int.
1762 I think this is independent of whether
1763 the constant is signed. */
1764 else if (! spec_long
&& base
== 10
1765 && int_fits_type_p (yylval
.ttype
, integer_type_node
))
1766 traditional_type
= (spec_unsigned
? unsigned_type_node
1767 : integer_type_node
);
1768 else if (! spec_long_long
)
1769 traditional_type
= (spec_unsigned
? long_unsigned_type_node
1770 : long_integer_type_node
);
1772 traditional_type
= (spec_unsigned
1773 ? long_long_unsigned_type_node
1774 : long_long_integer_type_node
);
1776 if (warn_traditional
|| ! flag_traditional
)
1778 /* Calculate the ANSI type. */
1779 if (! spec_long
&& ! spec_unsigned
1780 && int_fits_type_p (yylval
.ttype
, integer_type_node
))
1781 ansi_type
= integer_type_node
;
1782 else if (! spec_long
&& (base
!= 10 || spec_unsigned
)
1783 && int_fits_type_p (yylval
.ttype
, unsigned_type_node
))
1784 ansi_type
= unsigned_type_node
;
1785 else if (! spec_unsigned
&& !spec_long_long
1786 && int_fits_type_p (yylval
.ttype
, long_integer_type_node
))
1787 ansi_type
= long_integer_type_node
;
1788 else if (! spec_long_long
1789 && int_fits_type_p (yylval
.ttype
,
1790 long_unsigned_type_node
))
1791 ansi_type
= long_unsigned_type_node
;
1792 else if (! spec_unsigned
1793 && int_fits_type_p (yylval
.ttype
,
1794 long_long_integer_type_node
))
1795 ansi_type
= long_long_integer_type_node
;
1797 ansi_type
= long_long_unsigned_type_node
;
1800 type
= flag_traditional
? traditional_type
: ansi_type
;
1802 if (warn_traditional
&& traditional_type
!= ansi_type
)
1804 if (TYPE_PRECISION (traditional_type
)
1805 != TYPE_PRECISION (ansi_type
))
1806 warning ("width of integer constant changes with -traditional");
1807 else if (TREE_UNSIGNED (traditional_type
)
1808 != TREE_UNSIGNED (ansi_type
))
1809 warning ("integer constant is unsigned in ANSI C, signed with -traditional");
1811 warning ("width of integer constant may change on other systems with -traditional");
1814 if (pedantic
&& !flag_traditional
&& !spec_long_long
&& !warn
1815 && (TYPE_PRECISION (long_integer_type_node
)
1816 < TYPE_PRECISION (type
)))
1817 pedwarn ("integer constant out of range");
1819 if (base
== 10 && ! spec_unsigned
&& TREE_UNSIGNED (type
))
1820 warning ("decimal constant is so large that it is unsigned");
1824 if (TYPE_PRECISION (type
)
1825 <= TYPE_PRECISION (integer_type_node
))
1827 = build_complex (NULL_TREE
, integer_zero_node
,
1828 convert (integer_type_node
,
1831 error ("complex integer constant is too wide for `complex int'");
1833 else if (flag_traditional
&& !int_fits_type_p (yylval
.ttype
, type
))
1834 /* The traditional constant 0x80000000 is signed
1835 but doesn't fit in the range of int.
1836 This will change it to -0x80000000, which does fit. */
1838 TREE_TYPE (yylval
.ttype
) = unsigned_type (type
);
1839 yylval
.ttype
= convert (type
, yylval
.ttype
);
1840 TREE_OVERFLOW (yylval
.ttype
)
1841 = TREE_CONSTANT_OVERFLOW (yylval
.ttype
) = 0;
1844 TREE_TYPE (yylval
.ttype
) = type
;
1850 if (isalnum (c
) || c
== '.' || c
== '_' || c
== '$'
1851 || (!flag_traditional
&& (c
== '-' || c
== '+')
1852 && (p
[-1] == 'e' || p
[-1] == 'E')))
1853 error ("missing white space after number `%s'", token_buffer
);
1855 value
= CONSTANT
; break;
1861 register int result
= 0;
1862 register int num_chars
= 0;
1863 unsigned width
= TYPE_PRECISION (char_type_node
);
1868 width
= WCHAR_TYPE_SIZE
;
1869 #ifdef MULTIBYTE_CHARS
1870 max_chars
= MB_CUR_MAX
;
1876 max_chars
= TYPE_PRECISION (integer_type_node
) / width
;
1884 if (c
== '\'' || c
== EOF
)
1890 c
= readescape (&ignore
);
1893 if (width
< HOST_BITS_PER_INT
1894 && (unsigned) c
>= (1 << width
))
1895 pedwarn ("escape sequence out of range for character");
1896 #ifdef MAP_CHARACTER
1898 c
= MAP_CHARACTER (c
);
1904 pedwarn ("ANSI C forbids newline in character constant");
1907 #ifdef MAP_CHARACTER
1909 c
= MAP_CHARACTER (c
);
1913 if (num_chars
> maxtoken
- 4)
1914 extend_token_buffer (token_buffer
);
1916 token_buffer
[num_chars
] = c
;
1918 /* Merge character into result; ignore excess chars. */
1919 if (num_chars
< max_chars
+ 1)
1921 if (width
< HOST_BITS_PER_INT
)
1922 result
= (result
<< width
) | (c
& ((1 << width
) - 1));
1928 token_buffer
[num_chars
+ 1] = '\'';
1929 token_buffer
[num_chars
+ 2] = 0;
1932 error ("malformatted character constant");
1933 else if (num_chars
== 0)
1934 error ("empty character constant");
1935 else if (num_chars
> max_chars
)
1937 num_chars
= max_chars
;
1938 error ("character constant too long");
1940 else if (num_chars
!= 1 && ! flag_traditional
)
1941 warning ("multi-character character constant");
1943 /* If char type is signed, sign-extend the constant. */
1946 int num_bits
= num_chars
* width
;
1948 /* We already got an error; avoid invalid shift. */
1949 yylval
.ttype
= build_int_2 (0, 0);
1950 else if (TREE_UNSIGNED (char_type_node
)
1951 || ((result
>> (num_bits
- 1)) & 1) == 0)
1953 = build_int_2 (result
& (~(unsigned HOST_WIDE_INT
) 0
1954 >> (HOST_BITS_PER_WIDE_INT
- num_bits
)),
1958 = build_int_2 (result
| ~(~(unsigned HOST_WIDE_INT
) 0
1959 >> (HOST_BITS_PER_WIDE_INT
- num_bits
)),
1961 TREE_TYPE (yylval
.ttype
) = integer_type_node
;
1965 #ifdef MULTIBYTE_CHARS
1966 /* Set the initial shift state and convert the next sequence. */
1968 /* In all locales L'\0' is zero and mbtowc will return zero,
1971 || (num_chars
== 1 && token_buffer
[1] != '\0'))
1974 (void) mbtowc (NULL_PTR
, NULL_PTR
, 0);
1975 if (mbtowc (& wc
, token_buffer
+ 1, num_chars
) == num_chars
)
1978 warning ("Ignoring invalid multibyte character");
1981 yylval
.ttype
= build_int_2 (result
, 0);
1982 TREE_TYPE (yylval
.ttype
) = wchar_type_node
;
1993 p
= token_buffer
+ 1;
1995 while (c
!= '"' && c
>= 0)
2000 c
= readescape (&ignore
);
2004 && TYPE_PRECISION (char_type_node
) < HOST_BITS_PER_INT
2005 && c
>= (1 << TYPE_PRECISION (char_type_node
)))
2006 pedwarn ("escape sequence out of range for character");
2011 pedwarn ("ANSI C forbids newline in string constant");
2015 if (p
== token_buffer
+ maxtoken
)
2016 p
= extend_token_buffer (p
);
2025 error ("Unterminated string constant");
2027 /* We have read the entire constant.
2028 Construct a STRING_CST for the result. */
2032 /* If this is a L"..." wide-string, convert the multibyte string
2033 to a wide character string. */
2034 char *widep
= (char *) alloca ((p
- token_buffer
) * WCHAR_BYTES
);
2037 #ifdef MULTIBYTE_CHARS
2038 len
= mbstowcs ((wchar_t *) widep
, token_buffer
+ 1, p
- token_buffer
);
2039 if (len
< 0 || len
>= (p
- token_buffer
))
2041 warning ("Ignoring invalid multibyte string");
2044 bzero (widep
+ (len
* WCHAR_BYTES
), WCHAR_BYTES
);
2049 wp
= widep
+ (BYTES_BIG_ENDIAN
? WCHAR_BYTES
- 1 : 0);
2050 bzero (widep
, (p
- token_buffer
) * WCHAR_BYTES
);
2051 for (cp
= token_buffer
+ 1; cp
< p
; cp
++)
2052 *wp
= *cp
, wp
+= WCHAR_BYTES
;
2053 len
= p
- token_buffer
- 1;
2056 yylval
.ttype
= build_string ((len
+ 1) * WCHAR_BYTES
, widep
);
2057 TREE_TYPE (yylval
.ttype
) = wchar_array_type_node
;
2062 extern tree
build_objc_string();
2063 /* Return an Objective-C @"..." constant string object. */
2064 yylval
.ttype
= build_objc_string (p
- token_buffer
,
2066 TREE_TYPE (yylval
.ttype
) = char_array_type_node
;
2067 value
= OBJC_STRING
;
2071 yylval
.ttype
= build_string (p
- token_buffer
, token_buffer
+ 1);
2072 TREE_TYPE (yylval
.ttype
) = char_array_type_node
;
2103 yylval
.code
= PLUS_EXPR
; break;
2105 yylval
.code
= MINUS_EXPR
; break;
2107 yylval
.code
= BIT_AND_EXPR
; break;
2109 yylval
.code
= BIT_IOR_EXPR
; break;
2111 yylval
.code
= MULT_EXPR
; break;
2113 yylval
.code
= TRUNC_DIV_EXPR
; break;
2115 yylval
.code
= TRUNC_MOD_EXPR
; break;
2117 yylval
.code
= BIT_XOR_EXPR
; break;
2119 yylval
.code
= LSHIFT_EXPR
; break;
2121 yylval
.code
= RSHIFT_EXPR
; break;
2123 yylval
.code
= LT_EXPR
; break;
2125 yylval
.code
= GT_EXPR
; break;
2128 token_buffer
[1] = c1
= GETC();
2129 token_buffer
[2] = 0;
2136 value
= ARITHCOMPARE
; yylval
.code
= LE_EXPR
; goto done
;
2138 value
= ARITHCOMPARE
; yylval
.code
= GE_EXPR
; goto done
;
2140 value
= EQCOMPARE
; yylval
.code
= NE_EXPR
; goto done
;
2142 value
= EQCOMPARE
; yylval
.code
= EQ_EXPR
; goto done
;
2144 value
= ASSIGN
; goto done
;
2150 value
= PLUSPLUS
; goto done
;
2152 value
= MINUSMINUS
; goto done
;
2154 value
= ANDAND
; goto done
;
2156 value
= OROR
; goto done
;
2169 { value
= POINTSAT
; goto done
; }
2173 { value
= ']'; goto done
; }
2177 { value
= '{'; indent_level
++; goto done
; }
2179 { value
= '['; goto done
; }
2183 { value
= '}'; indent_level
--; goto done
; }
2187 token_buffer
[1] = 0;
2189 if ((c
== '<') || (c
== '>'))
2190 value
= ARITHCOMPARE
;
2196 /* Don't make yyparse think this is eof. */
2215 /* yylloc.last_line = lineno; */
2220 /* Sets the value of the 'yydebug' variable to VALUE.
2221 This is a function so we don't have to have YYDEBUG defined
2222 in order to build the compiler. */
2231 warning ("YYDEBUG not defined.");