1 /* Lexical analyzer for C and Objective C.
2 Copyright (C) 1987, 88, 89, 92, 94-96, 1997 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. */
96 extern tree
is_class_name ();
100 /* File used for outputting assembler code. */
101 extern FILE *asm_out_file
;
103 #ifndef WCHAR_TYPE_SIZE
105 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
107 #define WCHAR_TYPE_SIZE BITS_PER_WORD
111 /* Number of bytes in a wide character. */
112 #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT)
114 static int maxtoken
; /* Current nominal length of token buffer. */
115 char *token_buffer
; /* Pointer to token buffer.
116 Actual allocated length is maxtoken + 2.
117 This is not static because objc-parse.y uses it. */
119 static int indent_level
= 0; /* Number of { minus number of }. */
121 /* Nonzero if end-of-file has been seen on input. */
122 static int end_of_file
;
125 /* Buffered-back input character; faster than using ungetc. */
126 static int nextchar
= -1;
129 #ifdef HANDLE_SYSV_PRAGMA
130 static int handle_sysv_pragma
PROTO((int));
131 #endif /* HANDLE_SYSV_PRAGMA */
132 static int skip_white_space
PROTO((int));
133 static char *extend_token_buffer
PROTO((char *));
134 static int readescape
PROTO((int *));
135 int check_newline ();
137 /* Do not insert generated code into the source, instead, include it.
138 This allows us to build gcc automatically even for targets that
139 need to add or modify the reserved keyword lists. */
142 /* Return something to represent absolute declarators containing a *.
143 TARGET is the absolute declarator that the * contains.
144 TYPE_QUALS is a list of modifiers such as const or volatile
145 to apply to the pointer type, represented as identifiers.
147 We return an INDIRECT_REF whose "contents" are TARGET
148 and whose type is the modifier list. */
151 make_pointer_declarator (type_quals
, target
)
152 tree type_quals
, target
;
154 return build1 (INDIRECT_REF
, type_quals
, target
);
158 forget_protocol_qualifiers ()
160 int i
, n
= sizeof wordlist
/ sizeof (struct resword
);
162 for (i
= 0; i
< n
; i
++)
163 if ((int) wordlist
[i
].rid
>= (int) RID_IN
164 && (int) wordlist
[i
].rid
<= (int) RID_ONEWAY
)
165 wordlist
[i
].name
= "";
169 remember_protocol_qualifiers ()
171 int i
, n
= sizeof wordlist
/ sizeof (struct resword
);
173 for (i
= 0; i
< n
; i
++)
174 if (wordlist
[i
].rid
== RID_IN
)
175 wordlist
[i
].name
= "in";
176 else if (wordlist
[i
].rid
== RID_OUT
)
177 wordlist
[i
].name
= "out";
178 else if (wordlist
[i
].rid
== RID_INOUT
)
179 wordlist
[i
].name
= "inout";
180 else if (wordlist
[i
].rid
== RID_BYCOPY
)
181 wordlist
[i
].name
= "bycopy";
182 else if (wordlist
[i
].rid
== RID_ONEWAY
)
183 wordlist
[i
].name
= "oneway";
188 init_parse (filename
)
195 cpp_reader_init (&parse_in
);
196 parse_in
.data
= &parse_options
;
197 cpp_options_init (&parse_options
);
198 cpp_handle_options (&parse_in
, 0, NULL
); /* FIXME */
199 parse_in
.show_column
= 1;
200 if (! cpp_start_read (&parse_in
, filename
))
207 cpp_finish (&parse_in
);
214 /* Make identifier nodes long enough for the language-specific slots. */
215 set_identifier_size (sizeof (struct lang_identifier
));
217 /* Start it at 0, because check_newline is called at the very beginning
218 and will increment it to 1. */
221 #ifdef MULTIBYTE_CHARS
222 /* Change to the native locale for multibyte conversions. */
223 setlocale (LC_CTYPE
, "");
227 token_buffer
= (char *) xmalloc (maxtoken
+ 2);
229 ridpointers
[(int) RID_INT
] = get_identifier ("int");
230 ridpointers
[(int) RID_CHAR
] = get_identifier ("char");
231 ridpointers
[(int) RID_VOID
] = get_identifier ("void");
232 ridpointers
[(int) RID_FLOAT
] = get_identifier ("float");
233 ridpointers
[(int) RID_DOUBLE
] = get_identifier ("double");
234 ridpointers
[(int) RID_SHORT
] = get_identifier ("short");
235 ridpointers
[(int) RID_LONG
] = get_identifier ("long");
236 ridpointers
[(int) RID_UNSIGNED
] = get_identifier ("unsigned");
237 ridpointers
[(int) RID_SIGNED
] = get_identifier ("signed");
238 ridpointers
[(int) RID_INLINE
] = get_identifier ("inline");
239 ridpointers
[(int) RID_CONST
] = get_identifier ("const");
240 ridpointers
[(int) RID_VOLATILE
] = get_identifier ("volatile");
241 ridpointers
[(int) RID_AUTO
] = get_identifier ("auto");
242 ridpointers
[(int) RID_STATIC
] = get_identifier ("static");
243 ridpointers
[(int) RID_EXTERN
] = get_identifier ("extern");
244 ridpointers
[(int) RID_TYPEDEF
] = get_identifier ("typedef");
245 ridpointers
[(int) RID_REGISTER
] = get_identifier ("register");
246 ridpointers
[(int) RID_ITERATOR
] = get_identifier ("iterator");
247 ridpointers
[(int) RID_COMPLEX
] = get_identifier ("complex");
248 ridpointers
[(int) RID_ID
] = get_identifier ("id");
249 ridpointers
[(int) RID_IN
] = get_identifier ("in");
250 ridpointers
[(int) RID_OUT
] = get_identifier ("out");
251 ridpointers
[(int) RID_INOUT
] = get_identifier ("inout");
252 ridpointers
[(int) RID_BYCOPY
] = get_identifier ("bycopy");
253 ridpointers
[(int) RID_ONEWAY
] = get_identifier ("oneway");
254 forget_protocol_qualifiers();
256 /* Some options inhibit certain reserved words.
257 Clear those words out of the hash table so they won't be recognized. */
258 #define UNSET_RESERVED_WORD(STRING) \
259 do { struct resword *s = is_reserved_word (STRING, sizeof (STRING) - 1); \
260 if (s) s->name = ""; } while (0)
262 if (! doing_objc_thang
)
263 UNSET_RESERVED_WORD ("id");
265 if (flag_traditional
)
267 UNSET_RESERVED_WORD ("const");
268 UNSET_RESERVED_WORD ("volatile");
269 UNSET_RESERVED_WORD ("typeof");
270 UNSET_RESERVED_WORD ("signed");
271 UNSET_RESERVED_WORD ("inline");
272 UNSET_RESERVED_WORD ("iterator");
273 UNSET_RESERVED_WORD ("complex");
277 UNSET_RESERVED_WORD ("asm");
278 UNSET_RESERVED_WORD ("typeof");
279 UNSET_RESERVED_WORD ("inline");
280 UNSET_RESERVED_WORD ("iterator");
281 UNSET_RESERVED_WORD ("complex");
286 reinit_parse_for_function ()
290 /* Function used when yydebug is set, to print a token in more detail. */
293 yyprint (file
, yychar
, yylval
)
305 if (IDENTIFIER_POINTER (t
))
306 fprintf (file
, " `%s'", IDENTIFIER_POINTER (t
));
311 if (TREE_CODE (t
) == INTEGER_CST
)
313 #if HOST_BITS_PER_WIDE_INT == 64
314 #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
317 #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
324 #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
330 TREE_INT_CST_HIGH (t
), TREE_INT_CST_LOW (t
));
335 /* Iff C is a carriage return, warn about it - if appropriate -
336 and return nonzero. */
341 static int newline_warning
= 0;
345 /* ANSI C says the effects of a carriage return in a source file
347 if (pedantic
&& !newline_warning
)
349 warning ("carriage return in source file");
350 warning ("(we only warn about the first carriage return)");
358 /* If C is not whitespace, return C.
359 Otherwise skip whitespace and return first nonwhite char read. */
369 /* We don't recognize comments here, because
370 cpp output can include / and * consecutively as operators.
371 Also, there's no need, since cpp removes all comments. */
374 c
= check_newline ();
395 error ("stray '\\' in program");
405 /* Skips all of the white space at the current location in the input file.
406 Must use and reset nextchar if it has the next character. */
409 position_after_white_space ()
415 c
= nextchar
, nextchar
= -1;
420 UNGETC (skip_white_space (c
));
423 /* Like skip_white_space, but don't advance beyond the end of line.
424 Moreover, we don't get passed a character to start with. */
426 skip_white_space_on_line ()
455 /* Make the token buffer longer, preserving the data in it.
456 P should point to just beyond the last valid character in the old buffer.
457 The value we return is a pointer to the new buffer
458 at a place corresponding to P. */
461 extend_token_buffer (p
)
464 int offset
= p
- token_buffer
;
466 maxtoken
= maxtoken
* 2 + 10;
467 token_buffer
= (char *) xrealloc (token_buffer
, maxtoken
+ 2);
469 return token_buffer
+ offset
;
473 #define GET_DIRECTIVE_LINE() get_directive_line (finput)
474 #else /* USE_CPPLIB */
475 /* Read the rest of a #-directive from input stream FINPUT.
476 In normal use, the directive name and the white space after it
477 have already been read, so they won't be included in the result.
478 We allow for the fact that the directive line may contain
479 a newline embedded within a character or string literal which forms
480 a part of the directive.
482 The value is a string in a reusable buffer. It remains valid
483 only until the next time this function is called. */
486 GET_DIRECTIVE_LINE ()
488 static char *directive_buffer
= NULL
;
489 static unsigned buffer_length
= 0;
491 register char *buffer_limit
;
492 register int looking_for
= 0;
493 register int char_escaped
= 0;
495 if (buffer_length
== 0)
497 directive_buffer
= (char *)xmalloc (128);
501 buffer_limit
= &directive_buffer
[buffer_length
];
503 for (p
= directive_buffer
; ; )
507 /* Make buffer bigger if it is full. */
508 if (p
>= buffer_limit
)
510 register unsigned bytes_used
= (p
- directive_buffer
);
514 = (char *)xrealloc (directive_buffer
, buffer_length
);
515 p
= &directive_buffer
[bytes_used
];
516 buffer_limit
= &directive_buffer
[buffer_length
];
521 /* Discard initial whitespace. */
522 if ((c
== ' ' || c
== '\t') && p
== directive_buffer
)
525 /* Detect the end of the directive. */
526 if (c
== '\n' && looking_for
== 0)
535 return directive_buffer
;
537 /* Handle string and character constant syntax. */
540 if (looking_for
== c
&& !char_escaped
)
541 looking_for
= 0; /* Found terminator... stop looking. */
544 if (c
== '\'' || c
== '"')
545 looking_for
= c
; /* Don't stop buffering until we see another
546 another one of these (or an EOF). */
548 /* Handle backslash. */
549 char_escaped
= (c
== '\\' && ! char_escaped
);
552 #endif /* USE_CPPLIB */
554 /* At the beginning of a line, increment the line number
555 and process any #-directive on this line.
556 If the line is a #-directive, read the entire line and return a newline.
557 Otherwise, return the line's first non-whitespace character. */
567 /* Read first nonwhite char on the line. */
570 while (c
== ' ' || c
== '\t')
575 /* If not #, return it so caller will use it. */
579 /* Read first nonwhite char after the `#'. */
582 while (c
== ' ' || c
== '\t')
585 /* If a letter follows, then if the word here is `line', skip
586 it and ignore it; otherwise, ignore the line, with an error
587 if the word isn't `pragma', `ident', `define', or `undef'. */
589 if ((c
>= 'a' && c
<= 'z') || (c
>= 'A' && c
<= 'Z'))
598 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'
599 || whitespace_cr (c
) ))
601 while (c
== ' ' || c
== '\t' || whitespace_cr (c
))
605 #ifdef HANDLE_SYSV_PRAGMA
608 if (token
!= IDENTIFIER
)
610 return handle_sysv_pragma (token
);
611 #else /* !HANDLE_SYSV_PRAGMA */
616 if (token
!= IDENTIFIER
)
618 if (HANDLE_PRAGMA (finput
, yylval
.ttype
))
624 ??? do not know what to
do ???;
625 #endif /* !USE_CPPLIB */
626 #endif /* HANDLE_PRAGMA */
627 #endif /* !HANDLE_SYSV_PRAGMA */
639 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'))
642 debug_define (lineno
, GET_DIRECTIVE_LINE ());
652 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'))
655 debug_undef (lineno
, GET_DIRECTIVE_LINE ());
664 && ((c
= GETC()) == ' ' || c
== '\t'))
673 && ((c
= GETC()) == ' ' || c
== '\t'))
675 /* #ident. The pedantic warning is now in cccp.c. */
677 /* Here we have just seen `#ident '.
678 A string constant should follow. */
680 c
= skip_white_space_on_line ();
682 /* If no argument, ignore the line. */
689 || TREE_CODE (yylval
.ttype
) != STRING_CST
)
691 error ("invalid #ident");
697 #ifdef ASM_OUTPUT_IDENT
698 ASM_OUTPUT_IDENT (asm_out_file
, TREE_STRING_POINTER (yylval
.ttype
));
702 /* Skip the rest of this line. */
707 error ("undefined or invalid # directive");
712 /* Here we have either `#line' or `# <nonletter>'.
713 In either case, it should be a line number; a digit should follow. */
715 /* Can't use skip_white_space here, but must handle all whitespace
716 that is not '\n', lest we get a recursion for '\r' '\n' when
719 c
= skip_white_space_on_line ();
721 /* If the # is the only nonwhite char on the line,
722 just ignore it. Check the new newline. */
726 /* Something follows the #; read a token. */
731 if (token
== CONSTANT
732 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
)
734 int old_lineno
= lineno
;
736 /* subtract one, because it is the following line that
737 gets the specified number */
739 int l
= TREE_INT_CST_LOW (yylval
.ttype
) - 1;
741 /* Is this the last nonwhite stuff on the line? */
742 c
= skip_white_space_on_line ();
745 /* No more: store the line number and check following line. */
751 /* More follows: it must be a string constant (filename). */
753 /* Read the string constant. */
756 if (token
!= STRING
|| TREE_CODE (yylval
.ttype
) != STRING_CST
)
758 error ("invalid #line");
763 = (char *) permalloc (TREE_STRING_LENGTH (yylval
.ttype
) + 1);
764 strcpy (input_filename
, TREE_STRING_POINTER (yylval
.ttype
));
767 /* Each change of file name
768 reinitializes whether we are now in a system header. */
769 in_system_header
= 0;
771 if (main_input_filename
== 0)
772 main_input_filename
= input_filename
;
774 /* Is this the last nonwhite stuff on the line? */
775 c
= skip_white_space_on_line ();
778 /* Update the name in the top element of input_file_stack. */
779 if (input_file_stack
)
780 input_file_stack
->name
= input_filename
;
789 /* `1' after file name means entering new file.
790 `2' after file name means just left a file. */
792 if (token
== CONSTANT
793 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
)
795 if (TREE_INT_CST_LOW (yylval
.ttype
) == 1)
797 /* Pushing to a new file. */
799 = (struct file_stack
*) xmalloc (sizeof (struct file_stack
));
800 input_file_stack
->line
= old_lineno
;
801 p
->next
= input_file_stack
;
802 p
->name
= input_filename
;
803 p
->indent_level
= indent_level
;
804 input_file_stack
= p
;
805 input_file_stack_tick
++;
806 debug_start_source_file (input_filename
);
809 else if (TREE_INT_CST_LOW (yylval
.ttype
) == 2)
811 /* Popping out of a file. */
812 if (input_file_stack
->next
)
814 struct file_stack
*p
= input_file_stack
;
815 if (indent_level
!= p
->indent_level
)
817 warning_with_file_and_line
818 (p
->name
, old_lineno
,
819 "This file contains more `%c's than `%c's.",
820 indent_level
> p
->indent_level
? '{' : '}',
821 indent_level
> p
->indent_level
? '}' : '{');
823 input_file_stack
= p
->next
;
825 input_file_stack_tick
++;
826 debug_end_source_file (input_file_stack
->line
);
829 error ("#-lines for entering and leaving files don't match");
835 /* Now that we've pushed or popped the input stack,
836 update the name in the top element. */
837 if (input_file_stack
)
838 input_file_stack
->name
= input_filename
;
840 /* If we have handled a `1' or a `2',
841 see if there is another number to read. */
844 /* Is this the last nonwhite stuff on the line? */
845 c
= skip_white_space_on_line ();
854 /* `3' after file name means this is a system header file. */
856 if (token
== CONSTANT
857 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
858 && TREE_INT_CST_LOW (yylval
.ttype
) == 3)
859 in_system_header
= 1, used_up
= 1;
863 /* Is this the last nonwhite stuff on the line? */
864 c
= skip_white_space_on_line ();
870 warning ("unrecognized text at end of #line");
873 error ("invalid #-line");
875 /* skip the rest of this line. */
878 if (c
!= '\n' && c
!= EOF
&& nextchar
>= 0)
879 c
= nextchar
, nextchar
= -1;
881 while (c
!= '\n' && c
!= EOF
)
886 #ifdef HANDLE_SYSV_PRAGMA
888 /* Handle a #pragma directive.
889 TOKEN is the token we read after `#pragma'. Processes the entire input
890 line and returns a character for the caller to reread: either \n or EOF. */
892 /* This function has to be in this file, in order to get at
896 handle_sysv_pragma (token
)
909 handle_pragma_token (token_buffer
, yylval
.ttype
);
912 handle_pragma_token (token_buffer
, 0);
916 c
= nextchar
, nextchar
= -1;
921 while (c
== ' ' || c
== '\t')
923 if (c
== '\n' || c
== EOF
)
925 handle_pragma_token (0, 0);
933 #endif /* HANDLE_SYSV_PRAGMA */
935 #define ENDFILE -1 /* token that represents end-of-file */
937 /* Read an escape sequence, returning its equivalent as a character,
938 or store 1 in *ignore_ptr if it is backslash-newline. */
941 readescape (ignore_ptr
)
944 register int c
= GETC();
946 register unsigned count
;
947 unsigned firstdig
= 0;
953 if (warn_traditional
)
954 warning ("the meaning of `\\x' varies with -traditional");
956 if (flag_traditional
)
965 if (!(c
>= 'a' && c
<= 'f')
966 && !(c
>= 'A' && c
<= 'F')
967 && !(c
>= '0' && c
<= '9'))
973 if (c
>= 'a' && c
<= 'f')
974 code
+= c
- 'a' + 10;
975 if (c
>= 'A' && c
<= 'F')
976 code
+= c
- 'A' + 10;
977 if (c
>= '0' && c
<= '9')
979 if (code
!= 0 || count
!= 0)
988 error ("\\x used with no following hex digits");
990 /* Digits are all 0's. Ok. */
992 else if ((count
- 1) * 4 >= TYPE_PRECISION (integer_type_node
)
994 && ((1 << (TYPE_PRECISION (integer_type_node
) - (count
- 1) * 4))
996 pedwarn ("hex escape out of range");
999 case '0': case '1': case '2': case '3': case '4':
1000 case '5': case '6': case '7':
1003 while ((c
<= '7') && (c
>= '0') && (count
++ < 3))
1005 code
= (code
* 8) + (c
- '0');
1011 case '\\': case '\'': case '"':
1020 return TARGET_NEWLINE
;
1035 if (warn_traditional
)
1036 warning ("the meaning of `\\a' varies with -traditional");
1038 if (flag_traditional
)
1043 #if 0 /* Vertical tab is present in common usage compilers. */
1044 if (flag_traditional
)
1052 pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c
);
1058 /* `\(', etc, are used at beginning of line to avoid confusing Emacs. */
1062 /* `\%' is used to prevent SCCS from getting confused. */
1065 pedwarn ("non-ANSI escape sequence `\\%c'", c
);
1068 if (c
>= 040 && c
< 0177)
1069 pedwarn ("unknown escape sequence `\\%c'", c
);
1071 pedwarn ("unknown escape sequence: `\\' followed by char code 0x%x", c
);
1081 strcpy (buf
, string
);
1083 /* We can't print string and character constants well
1084 because the token_buffer contains the result of processing escapes. */
1086 strcat (buf
, " at end of input");
1087 else if (token_buffer
[0] == 0)
1088 strcat (buf
, " at null character");
1089 else if (token_buffer
[0] == '"')
1090 strcat (buf
, " before string constant");
1091 else if (token_buffer
[0] == '\'')
1092 strcat (buf
, " before character constant");
1093 else if (token_buffer
[0] < 040 || (unsigned char) token_buffer
[0] >= 0177)
1094 sprintf (buf
+ strlen (buf
), " before character 0%o",
1095 (unsigned char) token_buffer
[0]);
1097 strcat (buf
, " before `%s'");
1099 error (buf
, token_buffer
);
1109 char long_long_flag
;
1112 struct try_type type_sequence
[] =
1114 { &integer_type_node
, 0, 0, 0},
1115 { &unsigned_type_node
, 1, 0, 0},
1116 { &long_integer_type_node
, 0, 1, 0},
1117 { &long_unsigned_type_node
, 1, 1, 0},
1118 { &long_long_integer_type_node
, 0, 1, 1},
1119 { &long_long_unsigned_type_node
, 1, 1, 1}
1134 c
= nextchar
, nextchar
= -1;
1139 /* Effectively do c = skip_white_space (c)
1140 but do it faster in the usual cases. */
1153 /* Call skip_white_space so we can warn if appropriate. */
1158 c
= skip_white_space (c
);
1160 goto found_nonwhite
;
1164 token_buffer
[0] = c
;
1165 token_buffer
[1] = 0;
1167 /* yylloc.first_line = lineno; */
1173 token_buffer
[0] = 0;
1178 /* Capital L may start a wide-string or wide-character constant. */
1180 register int c
= GETC();
1189 goto string_constant
;
1196 if (!doing_objc_thang
)
1203 /* '@' may start a constant string object. */
1204 register int c
= GETC ();
1208 goto string_constant
;
1211 /* Fall through to treat '@' as the start of an identifier. */
1214 case 'A': case 'B': case 'C': case 'D': case 'E':
1215 case 'F': case 'G': case 'H': case 'I': case 'J':
1216 case 'K': case 'M': case 'N': case 'O':
1217 case 'P': case 'Q': case 'R': case 'S': case 'T':
1218 case 'U': case 'V': case 'W': case 'X': case 'Y':
1220 case 'a': case 'b': case 'c': case 'd': case 'e':
1221 case 'f': case 'g': case 'h': case 'i': case 'j':
1222 case 'k': case 'l': case 'm': case 'n': case 'o':
1223 case 'p': case 'q': case 'r': case 's': case 't':
1224 case 'u': case 'v': case 'w': case 'x': case 'y':
1230 while (isalnum (c
) || c
== '_' || c
== '$' || c
== '@')
1232 /* Make sure this char really belongs in an identifier. */
1233 if (c
== '@' && ! doing_objc_thang
)
1237 if (! dollars_in_ident
)
1238 error ("`$' in identifier");
1240 pedwarn ("`$' in identifier");
1243 if (p
>= token_buffer
+ maxtoken
)
1244 p
= extend_token_buffer (p
);
1260 /* Try to recognize a keyword. Uses minimum-perfect hash function */
1263 register struct resword
*ptr
;
1265 if ((ptr
= is_reserved_word (token_buffer
, p
- token_buffer
)))
1268 yylval
.ttype
= ridpointers
[(int) ptr
->rid
];
1269 value
= (int) ptr
->token
;
1271 /* Only return OBJECTNAME if it is a typedef. */
1272 if (doing_objc_thang
&& value
== OBJECTNAME
)
1274 lastiddecl
= lookup_name(yylval
.ttype
);
1276 if (lastiddecl
== NULL_TREE
1277 || TREE_CODE (lastiddecl
) != TYPE_DECL
)
1281 /* Even if we decided to recognize asm, still perhaps warn. */
1283 && (value
== ASM_KEYWORD
|| value
== TYPEOF
1284 || ptr
->rid
== RID_INLINE
)
1285 && token_buffer
[0] != '_')
1286 pedwarn ("ANSI does not permit the keyword `%s'",
1291 /* If we did not find a keyword, look for an identifier
1294 if (value
== IDENTIFIER
)
1296 if (token_buffer
[0] == '@')
1297 error("invalid identifier `%s'", token_buffer
);
1299 yylval
.ttype
= get_identifier (token_buffer
);
1300 lastiddecl
= lookup_name (yylval
.ttype
);
1302 if (lastiddecl
!= 0 && TREE_CODE (lastiddecl
) == TYPE_DECL
)
1304 /* A user-invisible read-only initialized variable
1305 should be replaced by its value.
1306 We handle only strings since that's the only case used in C. */
1307 else if (lastiddecl
!= 0 && TREE_CODE (lastiddecl
) == VAR_DECL
1308 && DECL_IGNORED_P (lastiddecl
)
1309 && TREE_READONLY (lastiddecl
)
1310 && DECL_INITIAL (lastiddecl
) != 0
1311 && TREE_CODE (DECL_INITIAL (lastiddecl
)) == STRING_CST
)
1313 tree stringval
= DECL_INITIAL (lastiddecl
);
1315 /* Copy the string value so that we won't clobber anything
1316 if we put something in the TREE_CHAIN of this one. */
1317 yylval
.ttype
= build_string (TREE_STRING_LENGTH (stringval
),
1318 TREE_STRING_POINTER (stringval
));
1321 else if (doing_objc_thang
)
1323 tree objc_interface_decl
= is_class_name (yylval
.ttype
);
1325 if (objc_interface_decl
)
1328 yylval
.ttype
= objc_interface_decl
;
1338 /* Check first for common special case: single-digit 0 or 1. */
1341 UNGETC (next_c
); /* Always undo this lookahead. */
1342 if (!isalnum (next_c
) && next_c
!= '.')
1344 token_buffer
[0] = (char)c
, token_buffer
[1] = '\0';
1345 yylval
.ttype
= (c
== '0') ? integer_zero_node
: integer_one_node
;
1351 case '2': case '3': case '4':
1352 case '5': case '6': case '7': case '8': case '9':
1357 int largest_digit
= 0;
1359 /* for multi-precision arithmetic,
1360 we actually store only HOST_BITS_PER_CHAR bits in each part.
1361 The number of parts is chosen so as to be sufficient to hold
1362 the enough bits to fit into the two HOST_WIDE_INTs that contain
1363 the integer value (this is always at least as many bits as are
1364 in a target `long long' value, but may be wider). */
1365 #define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2)
1366 int parts
[TOTAL_PARTS
];
1369 enum anon1
{ NOT_FLOAT
, AFTER_POINT
, TOO_MANY_POINTS
} floatflag
1372 for (count
= 0; count
< TOTAL_PARTS
; count
++)
1380 *p
++ = (c
= GETC());
1381 if ((c
== 'x') || (c
== 'X'))
1384 *p
++ = (c
= GETC());
1386 /* Leading 0 forces octal unless the 0 is the only digit. */
1387 else if (c
>= '0' && c
<= '9')
1396 /* Read all the digits-and-decimal-points. */
1399 || (isalnum (c
) && c
!= 'l' && c
!= 'L'
1400 && c
!= 'u' && c
!= 'U'
1401 && c
!= 'i' && c
!= 'I' && c
!= 'j' && c
!= 'J'
1402 && (floatflag
== NOT_FLOAT
|| ((c
!= 'f') && (c
!= 'F')))))
1407 error ("floating constant may not be in radix 16");
1408 if (floatflag
== TOO_MANY_POINTS
)
1409 /* We have already emitted an error. Don't need another. */
1411 else if (floatflag
== AFTER_POINT
)
1413 error ("malformed floating constant");
1414 floatflag
= TOO_MANY_POINTS
;
1415 /* Avoid another error from atof by forcing all characters
1416 from here on to be ignored. */
1420 floatflag
= AFTER_POINT
;
1424 /* Accept '.' as the start of a floating-point number
1425 only when it is followed by a digit.
1426 Otherwise, unread the following non-digit
1427 and use the '.' as a structural token. */
1428 if (p
== token_buffer
+ 2 && !isdigit (c
))
1439 error ("parse error at `..'");
1442 token_buffer
[1] = 0;
1449 /* It is not a decimal point.
1450 It should be a digit (perhaps a hex digit). */
1456 else if (base
<= 10)
1458 if (c
== 'e' || c
== 'E')
1461 floatflag
= AFTER_POINT
;
1462 break; /* start of exponent */
1464 error ("nondigits in number and not hexadecimal");
1475 if (c
>= largest_digit
)
1479 for (count
= 0; count
< TOTAL_PARTS
; count
++)
1481 parts
[count
] *= base
;
1485 += (parts
[count
-1] >> HOST_BITS_PER_CHAR
);
1487 &= (1 << HOST_BITS_PER_CHAR
) - 1;
1493 /* If the extra highest-order part ever gets anything in it,
1494 the number is certainly too big. */
1495 if (parts
[TOTAL_PARTS
- 1] != 0)
1498 if (p
>= token_buffer
+ maxtoken
- 3)
1499 p
= extend_token_buffer (p
);
1500 *p
++ = (c
= GETC());
1505 error ("numeric constant with no digits");
1507 if (largest_digit
>= base
)
1508 error ("numeric constant contains digits beyond the radix");
1510 /* Remove terminating char from the token buffer and delimit the string */
1513 if (floatflag
!= NOT_FLOAT
)
1515 tree type
= double_type_node
;
1516 int exceeds_double
= 0;
1518 REAL_VALUE_TYPE value
;
1521 /* Read explicit exponent if any, and put it in tokenbuf. */
1523 if ((c
== 'e') || (c
== 'E'))
1525 if (p
>= token_buffer
+ maxtoken
- 3)
1526 p
= extend_token_buffer (p
);
1529 if ((c
== '+') || (c
== '-'))
1535 error ("floating constant exponent has no digits");
1538 if (p
>= token_buffer
+ maxtoken
- 3)
1539 p
= extend_token_buffer (p
);
1548 /* Convert string to a double, checking for overflow. */
1549 if (setjmp (handler
))
1551 error ("floating constant out of range");
1556 int fflag
= 0, lflag
= 0;
1557 /* Copy token_buffer now, while it has just the number
1558 and not the suffixes; once we add `f' or `i',
1559 REAL_VALUE_ATOF may not work any more. */
1560 char *copy
= (char *) alloca (p
- token_buffer
+ 1);
1561 bcopy (token_buffer
, copy
, p
- token_buffer
+ 1);
1563 set_float_handler (handler
);
1569 /* Read the suffixes to choose a data type. */
1574 error ("more than one `f' in numeric constant");
1580 error ("more than one `l' in numeric constant");
1586 error ("more than one `i' or `j' in numeric constant");
1588 pedwarn ("ANSI C forbids imaginary numeric constants");
1599 if (p
>= token_buffer
+ maxtoken
- 3)
1600 p
= extend_token_buffer (p
);
1606 /* The second argument, machine_mode, of REAL_VALUE_ATOF
1607 tells the desired precision of the binary result
1608 of decimal-to-binary conversion. */
1613 error ("both `f' and `l' in floating constant");
1615 type
= float_type_node
;
1616 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
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
;
1626 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
1627 if (REAL_VALUE_ISINF (value
) && pedantic
)
1628 warning ("floating point number exceeds range of `long double'");
1632 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
1633 if (REAL_VALUE_ISINF (value
) && pedantic
)
1634 warning ("floating point number exceeds range of `double'");
1637 set_float_handler (NULL_PTR
);
1640 if (errno
== ERANGE
&& !flag_traditional
&& pedantic
)
1642 /* ERANGE is also reported for underflow,
1643 so test the value to distinguish overflow from that. */
1644 if (REAL_VALUES_LESS (dconst1
, value
)
1645 || REAL_VALUES_LESS (value
, dconstm1
))
1647 warning ("floating point number exceeds range of `double'");
1653 /* If the result is not a number, assume it must have been
1654 due to some error message above, so silently convert
1656 if (REAL_VALUE_ISNAN (value
))
1659 /* Create a node with determined type and value. */
1661 yylval
.ttype
= build_complex (NULL_TREE
,
1662 convert (type
, integer_zero_node
),
1663 build_real (type
, value
));
1665 yylval
.ttype
= build_real (type
, value
);
1669 tree traditional_type
, ansi_type
, type
;
1670 HOST_WIDE_INT high
, low
;
1671 int spec_unsigned
= 0;
1673 int spec_long_long
= 0;
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.");