1 /* Lexical analyzer for C and Objective C.
2 Copyright (C) 1987, 1988, 1989, 1992 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
34 #ifdef MULTIBYTE_CHARS
43 /* The elements of `ridpointers' are identifier nodes
44 for the reserved type names and storage classes.
45 It is indexed by a RID_... value. */
46 tree ridpointers[(int) RID_MAX];
48 /* Cause the `yydebug' variable to be defined. */
51 /* the declaration found for the last IDENTIFIER token read in.
52 yylex must look this up to detect typedefs, which get token type TYPENAME,
53 so it is left around in case the identifier is not a typedef but is
54 used in a context which makes it a reference to a variable. */
57 /* Nonzero enables objc features. */
61 extern tree is_class_name ();
65 /* File used for outputting assembler code. */
66 extern FILE *asm_out_file;
68 #ifndef WCHAR_TYPE_SIZE
70 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
72 #define WCHAR_TYPE_SIZE BITS_PER_WORD
76 /* Number of bytes in a wide character. */
77 #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT)
79 static int maxtoken; /* Current nominal length of token buffer. */
80 char *token_buffer; /* Pointer to token buffer.
81 Actual allocated length is maxtoken + 2.
82 This is not static because objc-parse.y uses it. */
84 /* Nonzero if end-of-file has been seen on input. */
85 static int end_of_file;
87 /* Buffered-back input character; faster than using ungetc. */
88 static int nextchar = -1;
92 /* Nonzero tells yylex to ignore \ in string constants. */
93 static int ignore_escape_flag = 0;
95 /* C code produced by gperf version 2.5 (GNU C++ version) */
96 /* Command-line: gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ c-parse.gperf */
97 struct resword { char *name; short token; enum rid rid; };
99 #define TOTAL_KEYWORDS 79
100 #define MIN_WORD_LENGTH 2
101 #define MAX_WORD_LENGTH 20
102 #define MIN_HASH_VALUE 10
103 #define MAX_HASH_VALUE 144
104 /* maximum key range = 135, duplicates = 0 */
112 register int unsigned len;
114 static unsigned char asso_values[] =
116 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
117 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
118 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
119 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
120 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
121 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
122 145, 145, 145, 145, 25, 145, 145, 145, 145, 145,
123 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
124 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
125 145, 145, 145, 145, 145, 1, 145, 46, 8, 15,
126 61, 6, 36, 48, 3, 5, 145, 18, 63, 25,
127 29, 76, 1, 145, 13, 2, 1, 51, 37, 9,
128 9, 1, 3, 145, 145, 145, 145, 145,
130 register int hval = len;
136 hval += asso_values[str[2]];
139 hval += asso_values[str[0]];
141 return hval + asso_values[str[len - 1]];
144 static struct resword wordlist[] =
146 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
148 {"int", TYPESPEC, RID_INT},
150 {"__typeof__", TYPEOF, NORID},
151 {"__signed__", TYPESPEC, RID_SIGNED},
152 {"__imag__", IMAGPART, NORID},
153 {"switch", SWITCH, NORID},
154 {"__inline__", SCSPEC, RID_INLINE},
155 {"else", ELSE, NORID},
156 {"__iterator__", SCSPEC, RID_ITERATOR},
157 {"__inline", SCSPEC, RID_INLINE},
158 {"__extension__", EXTENSION, NORID},
159 {"struct", STRUCT, NORID},
160 {"__real__", REALPART, NORID},
161 {"__const", TYPE_QUAL, RID_CONST},
162 {"while", WHILE, NORID},
163 {"__const__", TYPE_QUAL, RID_CONST},
164 {"case", CASE, NORID},
165 {"__complex__", TYPESPEC, RID_COMPLEX},
166 {"__iterator", SCSPEC, RID_ITERATOR},
167 {"bycopy", TYPE_QUAL, RID_BYCOPY},
169 {"__complex", TYPESPEC, RID_COMPLEX},
171 {"in", TYPE_QUAL, RID_IN},
172 {"break", BREAK, NORID},
173 {"@defs", DEFS, NORID},
175 {"extern", SCSPEC, RID_EXTERN},
177 {"typeof", TYPEOF, NORID},
178 {"typedef", SCSPEC, RID_TYPEDEF},
179 {"__typeof", TYPEOF, NORID},
180 {"sizeof", SIZEOF, NORID},
182 {"return", RETURN, NORID},
183 {"const", TYPE_QUAL, RID_CONST},
184 {"__volatile__", TYPE_QUAL, RID_VOLATILE},
185 {"@private", PRIVATE, NORID},
186 {"@selector", SELECTOR, NORID},
187 {"__volatile", TYPE_QUAL, RID_VOLATILE},
188 {"__asm__", ASM_KEYWORD, NORID},
190 {"continue", CONTINUE, NORID},
191 {"__alignof__", ALIGNOF, NORID},
192 {"__imag", IMAGPART, NORID},
193 {"__attribute__", ATTRIBUTE, NORID},
195 {"__attribute", ATTRIBUTE, NORID},
198 {"@encode", ENCODE, NORID},
199 {"id", OBJECTNAME, RID_ID},
200 {"static", SCSPEC, RID_STATIC},
201 {"@interface", INTERFACE, NORID},
203 {"__signed", TYPESPEC, RID_SIGNED},
205 {"__label__", LABEL, NORID},
207 {"__asm", ASM_KEYWORD, NORID},
208 {"char", TYPESPEC, RID_CHAR},
210 {"inline", SCSPEC, RID_INLINE},
211 {"out", TYPE_QUAL, RID_OUT},
212 {"register", SCSPEC, RID_REGISTER},
213 {"__real", REALPART, NORID},
214 {"short", TYPESPEC, RID_SHORT},
216 {"enum", ENUM, NORID},
217 {"inout", TYPE_QUAL, RID_INOUT},
219 {"oneway", TYPE_QUAL, RID_ONEWAY},
220 {"union", UNION, NORID},
222 {"__alignof", ALIGNOF, NORID},
224 {"@implementation", IMPLEMENTATION, NORID},
226 {"@class", CLASS, NORID},
228 {"@public", PUBLIC, NORID},
229 {"asm", ASM_KEYWORD, NORID},
230 {"",}, {"",}, {"",}, {"",}, {"",},
231 {"default", DEFAULT, NORID},
233 {"void", TYPESPEC, RID_VOID},
235 {"@protected", PROTECTED, NORID},
236 {"@protocol", PROTOCOL, NORID},
238 {"volatile", TYPE_QUAL, RID_VOLATILE},
240 {"signed", TYPESPEC, RID_SIGNED},
241 {"float", TYPESPEC, RID_FLOAT},
242 {"@end", END, NORID},
244 {"unsigned", TYPESPEC, RID_UNSIGNED},
245 {"@compatibility_alias", ALIAS, NORID},
246 {"double", TYPESPEC, RID_DOUBLE},
248 {"auto", SCSPEC, RID_AUTO},
250 {"goto", GOTO, NORID},
251 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
253 {"",}, {"",}, {"",}, {"",},
254 {"long", TYPESPEC, RID_LONG},
261 is_reserved_word (str, len)
263 register unsigned int len;
265 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
267 register int key = hash (str, len);
269 if (key <= MAX_HASH_VALUE && key >= 0)
271 register char *s = wordlist[key].name;
273 if (*s == *str && !strcmp (str + 1, s + 1))
274 return &wordlist[key];
280 /* Return something to represent absolute declarators containing a *.
281 TARGET is the absolute declarator that the * contains.
282 TYPE_QUALS is a list of modifiers such as const or volatile
283 to apply to the pointer type, represented as identifiers.
285 We return an INDIRECT_REF whose "contents" are TARGET
286 and whose type is the modifier list. */
289 make_pointer_declarator (type_quals, target)
290 tree type_quals, target;
292 return build1 (INDIRECT_REF, type_quals, target);
296 forget_protocol_qualifiers ()
298 int i, n = sizeof wordlist / sizeof (struct resword);
300 for (i = 0; i < n; i++)
301 if (wordlist[i].rid >= RID_IN && wordlist[i].rid <= RID_ONEWAY)
302 wordlist[i].name = "";
306 remember_protocol_qualifiers ()
308 int i, n = sizeof wordlist / sizeof (struct resword);
310 for (i = 0; i < n; i++)
311 if (wordlist[i].rid == RID_IN)
312 wordlist[i].name = "in";
313 else if (wordlist[i].rid == RID_OUT)
314 wordlist[i].name = "out";
315 else if (wordlist[i].rid == RID_INOUT)
316 wordlist[i].name = "inout";
317 else if (wordlist[i].rid == RID_BYCOPY)
318 wordlist[i].name = "bycopy";
319 else if (wordlist[i].rid == RID_ONEWAY)
320 wordlist[i].name = "oneway";
326 /* Make identifier nodes long enough for the language-specific slots. */
327 set_identifier_size (sizeof (struct lang_identifier));
329 /* Start it at 0, because check_newline is called at the very beginning
330 and will increment it to 1. */
333 #ifdef MULTIBYTE_CHARS
334 /* Change to the native locale for multibyte conversions. */
335 setlocale (LC_CTYPE, "");
339 token_buffer = (char *) xmalloc (maxtoken + 2);
341 ridpointers[(int) RID_INT] = get_identifier ("int");
342 ridpointers[(int) RID_CHAR] = get_identifier ("char");
343 ridpointers[(int) RID_VOID] = get_identifier ("void");
344 ridpointers[(int) RID_FLOAT] = get_identifier ("float");
345 ridpointers[(int) RID_DOUBLE] = get_identifier ("double");
346 ridpointers[(int) RID_SHORT] = get_identifier ("short");
347 ridpointers[(int) RID_LONG] = get_identifier ("long");
348 ridpointers[(int) RID_UNSIGNED] = get_identifier ("unsigned");
349 ridpointers[(int) RID_SIGNED] = get_identifier ("signed");
350 ridpointers[(int) RID_INLINE] = get_identifier ("inline");
351 ridpointers[(int) RID_CONST] = get_identifier ("const");
352 ridpointers[(int) RID_VOLATILE] = get_identifier ("volatile");
353 ridpointers[(int) RID_AUTO] = get_identifier ("auto");
354 ridpointers[(int) RID_STATIC] = get_identifier ("static");
355 ridpointers[(int) RID_EXTERN] = get_identifier ("extern");
356 ridpointers[(int) RID_TYPEDEF] = get_identifier ("typedef");
357 ridpointers[(int) RID_REGISTER] = get_identifier ("register");
358 ridpointers[(int) RID_ITERATOR] = get_identifier ("iterator");
359 ridpointers[(int) RID_COMPLEX] = get_identifier ("complex");
360 ridpointers[(int) RID_ID] = get_identifier ("id");
361 ridpointers[(int) RID_IN] = get_identifier ("in");
362 ridpointers[(int) RID_OUT] = get_identifier ("out");
363 ridpointers[(int) RID_INOUT] = get_identifier ("inout");
364 ridpointers[(int) RID_BYCOPY] = get_identifier ("bycopy");
365 ridpointers[(int) RID_ONEWAY] = get_identifier ("oneway");
366 forget_protocol_qualifiers();
368 /* Some options inhibit certain reserved words.
369 Clear those words out of the hash table so they won't be recognized. */
370 #define UNSET_RESERVED_WORD(STRING) \
371 do { struct resword *s = is_reserved_word (STRING, sizeof (STRING) - 1); \
372 if (s) s->name = ""; } while (0)
374 if (! doing_objc_thang)
375 UNSET_RESERVED_WORD ("id");
377 if (flag_traditional)
379 UNSET_RESERVED_WORD ("const");
380 UNSET_RESERVED_WORD ("volatile");
381 UNSET_RESERVED_WORD ("typeof");
382 UNSET_RESERVED_WORD ("signed");
383 UNSET_RESERVED_WORD ("inline");
384 UNSET_RESERVED_WORD ("iterator");
385 UNSET_RESERVED_WORD ("complex");
389 UNSET_RESERVED_WORD ("asm");
390 UNSET_RESERVED_WORD ("typeof");
391 UNSET_RESERVED_WORD ("inline");
392 UNSET_RESERVED_WORD ("iterator");
393 UNSET_RESERVED_WORD ("complex");
398 reinit_parse_for_function ()
402 /* Function used when yydebug is set, to print a token in more detail. */
405 yyprint (file, yychar, yylval)
417 if (IDENTIFIER_POINTER (t))
418 fprintf (file, " `%s'", IDENTIFIER_POINTER (t));
423 if (TREE_CODE (t) == INTEGER_CST)
425 #if HOST_BITS_PER_WIDE_INT == 64
426 #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
432 #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
438 TREE_INT_CST_HIGH (t), TREE_INT_CST_LOW (t));
444 /* If C is not whitespace, return C.
445 Otherwise skip whitespace and return first nonwhite char read. */
451 static int newline_warning = 0;
457 /* We don't recognize comments here, because
458 cpp output can include / and * consecutively as operators.
459 Also, there's no need, since cpp removes all comments. */
462 c = check_newline ();
474 /* ANSI C says the effects of a carriage return in a source file
476 if (pedantic && !newline_warning)
478 warning ("carriage return in source file");
479 warning ("(we only warn about the first carriage return)");
490 error ("stray '\\' in program");
500 /* Skips all of the white space at the current location in the input file.
501 Must use and reset nextchar if it has the next character. */
504 position_after_white_space ()
509 c = nextchar, nextchar = -1;
513 ungetc (skip_white_space (c), finput);
516 /* Make the token buffer longer, preserving the data in it.
517 P should point to just beyond the last valid character in the old buffer.
518 The value we return is a pointer to the new buffer
519 at a place corresponding to P. */
522 extend_token_buffer (p)
525 int offset = p - token_buffer;
527 maxtoken = maxtoken * 2 + 10;
528 token_buffer = (char *) xrealloc (token_buffer, maxtoken + 2);
530 return token_buffer + offset;
533 /* At the beginning of a line, increment the line number
534 and process any #-directive on this line.
535 If the line is a #-directive, read the entire line and return a newline.
536 Otherwise, return the line's first non-whitespace character. */
546 /* Read first nonwhite char on the line. */
549 while (c == ' ' || c == '\t')
554 /* If not #, return it so caller will use it. */
558 /* Read first nonwhite char after the `#'. */
561 while (c == ' ' || c == '\t')
564 /* If a letter follows, then if the word here is `line', skip
565 it and ignore it; otherwise, ignore the line, with an error
566 if the word isn't `pragma', `ident', `define', or `undef'. */
568 if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
572 if (getc (finput) == 'r'
573 && getc (finput) == 'a'
574 && getc (finput) == 'g'
575 && getc (finput) == 'm'
576 && getc (finput) == 'a'
577 && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n'))
579 #ifdef HANDLE_SYSV_PRAGMA
580 return handle_sysv_pragma (finput, c);
581 #endif /* HANDLE_SYSV_PRAGMA */
583 HANDLE_PRAGMA (finput);
584 #endif /* HANDLE_PRAGMA */
591 if (getc (finput) == 'e'
592 && getc (finput) == 'f'
593 && getc (finput) == 'i'
594 && getc (finput) == 'n'
595 && getc (finput) == 'e'
596 && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n'))
598 #ifdef DWARF_DEBUGGING_INFO
599 if ((debug_info_level == DINFO_LEVEL_VERBOSE)
600 && (write_symbols == DWARF_DEBUG))
601 dwarfout_define (lineno, get_directive_line (finput));
602 #endif /* DWARF_DEBUGGING_INFO */
608 if (getc (finput) == 'n'
609 && getc (finput) == 'd'
610 && getc (finput) == 'e'
611 && getc (finput) == 'f'
612 && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n'))
614 #ifdef DWARF_DEBUGGING_INFO
615 if ((debug_info_level == DINFO_LEVEL_VERBOSE)
616 && (write_symbols == DWARF_DEBUG))
617 dwarfout_undef (lineno, get_directive_line (finput));
618 #endif /* DWARF_DEBUGGING_INFO */
624 if (getc (finput) == 'i'
625 && getc (finput) == 'n'
626 && getc (finput) == 'e'
627 && ((c = getc (finput)) == ' ' || c == '\t'))
632 if (getc (finput) == 'd'
633 && getc (finput) == 'e'
634 && getc (finput) == 'n'
635 && getc (finput) == 't'
636 && ((c = getc (finput)) == ' ' || c == '\t'))
638 /* #ident. The pedantic warning is now in cccp.c. */
640 /* Here we have just seen `#ident '.
641 A string constant should follow. */
643 while (c == ' ' || c == '\t')
646 /* If no argument, ignore the line. */
653 || TREE_CODE (yylval.ttype) != STRING_CST)
655 error ("invalid #ident");
661 #ifdef ASM_OUTPUT_IDENT
662 ASM_OUTPUT_IDENT (asm_out_file, TREE_STRING_POINTER (yylval.ttype));
666 /* Skip the rest of this line. */
671 error ("undefined or invalid # directive");
676 /* Here we have either `#line' or `# <nonletter>'.
677 In either case, it should be a line number; a digit should follow. */
679 while (c == ' ' || c == '\t')
682 /* If the # is the only nonwhite char on the line,
683 just ignore it. Check the new newline. */
687 /* Something follows the #; read a token. */
692 if (token == CONSTANT
693 && TREE_CODE (yylval.ttype) == INTEGER_CST)
695 int old_lineno = lineno;
697 /* subtract one, because it is the following line that
698 gets the specified number */
700 int l = TREE_INT_CST_LOW (yylval.ttype) - 1;
702 /* Is this the last nonwhite stuff on the line? */
704 while (c == ' ' || c == '\t')
708 /* No more: store the line number and check following line. */
714 /* More follows: it must be a string constant (filename). */
716 /* Read the string constant, but don't treat \ as special. */
717 ignore_escape_flag = 1;
719 ignore_escape_flag = 0;
721 if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
723 error ("invalid #line");
728 = (char *) permalloc (TREE_STRING_LENGTH (yylval.ttype) + 1);
729 strcpy (input_filename, TREE_STRING_POINTER (yylval.ttype));
732 /* Each change of file name
733 reinitializes whether we are now in a system header. */
734 in_system_header = 0;
736 if (main_input_filename == 0)
737 main_input_filename = input_filename;
739 /* Is this the last nonwhite stuff on the line? */
741 while (c == ' ' || c == '\t')
745 /* Update the name in the top element of input_file_stack. */
746 if (input_file_stack)
747 input_file_stack->name = input_filename;
756 /* `1' after file name means entering new file.
757 `2' after file name means just left a file. */
759 if (token == CONSTANT
760 && TREE_CODE (yylval.ttype) == INTEGER_CST)
762 if (TREE_INT_CST_LOW (yylval.ttype) == 1)
764 /* Pushing to a new file. */
766 = (struct file_stack *) xmalloc (sizeof (struct file_stack));
767 input_file_stack->line = old_lineno;
768 p->next = input_file_stack;
769 p->name = input_filename;
770 input_file_stack = p;
771 input_file_stack_tick++;
772 #ifdef DWARF_DEBUGGING_INFO
773 if (debug_info_level == DINFO_LEVEL_VERBOSE
774 && write_symbols == DWARF_DEBUG)
775 dwarfout_start_new_source_file (input_filename);
776 #endif /* DWARF_DEBUGGING_INFO */
780 else if (TREE_INT_CST_LOW (yylval.ttype) == 2)
782 /* Popping out of a file. */
783 if (input_file_stack->next)
785 struct file_stack *p = input_file_stack;
786 input_file_stack = p->next;
788 input_file_stack_tick++;
789 #ifdef DWARF_DEBUGGING_INFO
790 if (debug_info_level == DINFO_LEVEL_VERBOSE
791 && write_symbols == DWARF_DEBUG)
792 dwarfout_resume_previous_source_file (input_file_stack->line);
793 #endif /* DWARF_DEBUGGING_INFO */
796 error ("#-lines for entering and leaving files don't match");
802 /* Now that we've pushed or popped the input stack,
803 update the name in the top element. */
804 if (input_file_stack)
805 input_file_stack->name = input_filename;
807 /* If we have handled a `1' or a `2',
808 see if there is another number to read. */
811 /* Is this the last nonwhite stuff on the line? */
813 while (c == ' ' || c == '\t')
823 /* `3' after file name means this is a system header file. */
825 if (token == CONSTANT
826 && TREE_CODE (yylval.ttype) == INTEGER_CST
827 && TREE_INT_CST_LOW (yylval.ttype) == 3)
828 in_system_header = 1;
831 error ("invalid #-line");
833 /* skip the rest of this line. */
837 while ((c = getc (finput)) != EOF && c != '\n');
841 #ifdef HANDLE_SYSV_PRAGMA
843 /* Handle a #pragma directive. INPUT is the current input stream,
844 and C is a character to reread. Processes the entire input line
845 and returns a character for the caller to reread: either \n or EOF. */
847 /* This function has to be in this file, in order to get at
851 handle_sysv_pragma (input, c)
857 while (c == ' ' || c == '\t')
859 if (c == '\n' || c == EOF)
861 handle_pragma_token (0, 0);
871 handle_pragma_token (token_buffer, yylval.ttype);
874 handle_pragma_token (token_buffer, 0);
877 c = nextchar, nextchar = -1;
883 #endif /* HANDLE_SYSV_PRAGMA */
885 #define isalnum(char) ((char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z') || (char >= '0' && char <= '9'))
886 #define isdigit(char) (char >= '0' && char <= '9')
887 #define ENDFILE -1 /* token that represents end-of-file */
889 /* Read an escape sequence, returning its equivalent as a character,
890 or store 1 in *ignore_ptr if it is backslash-newline. */
893 readescape (ignore_ptr)
896 register int c = getc (finput);
898 register unsigned count;
905 if (warn_traditional)
906 warning ("the meaning of `\\x' varies with -traditional");
908 if (flag_traditional)
917 if (!(c >= 'a' && c <= 'f')
918 && !(c >= 'A' && c <= 'F')
919 && !(c >= '0' && c <= '9'))
925 if (c >= 'a' && c <= 'f')
926 code += c - 'a' + 10;
927 if (c >= 'A' && c <= 'F')
928 code += c - 'A' + 10;
929 if (c >= '0' && c <= '9')
931 if (code != 0 || count != 0)
940 error ("\\x used with no following hex digits");
942 /* Digits are all 0's. Ok. */
944 else if ((count - 1) * 4 >= TYPE_PRECISION (integer_type_node)
946 && ((1 << (TYPE_PRECISION (integer_type_node) - (count - 1) * 4))
948 pedwarn ("hex escape out of range");
951 case '0': case '1': case '2': case '3': case '4':
952 case '5': case '6': case '7':
955 while ((c <= '7') && (c >= '0') && (count++ < 3))
957 code = (code * 8) + (c - '0');
963 case '\\': case '\'': case '"':
972 return TARGET_NEWLINE;
987 if (warn_traditional)
988 warning ("the meaning of `\\a' varies with -traditional");
990 if (flag_traditional)
995 #if 0 /* Vertical tab is present in common usage compilers. */
996 if (flag_traditional)
1004 pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c);
1010 /* `\(', etc, are used at beginning of line to avoid confusing Emacs. */
1015 pedwarn ("non-ANSI escape sequence `\\%c'", c);
1018 if (c >= 040 && c < 0177)
1019 pedwarn ("unknown escape sequence `\\%c'", c);
1021 pedwarn ("unknown escape sequence: `\\' followed by char code 0x%x", c);
1031 strcpy (buf, string);
1033 /* We can't print string and character constants well
1034 because the token_buffer contains the result of processing escapes. */
1036 strcat (buf, " at end of input");
1037 else if (token_buffer[0] == 0)
1038 strcat (buf, " at null character");
1039 else if (token_buffer[0] == '"')
1040 strcat (buf, " before string constant");
1041 else if (token_buffer[0] == '\'')
1042 strcat (buf, " before character constant");
1043 else if (token_buffer[0] < 040 || (unsigned char) token_buffer[0] >= 0177)
1044 sprintf (buf + strlen (buf), " before character 0%o",
1045 (unsigned char) token_buffer[0]);
1047 strcat (buf, " before `%s'");
1049 error (buf, token_buffer);
1059 char long_long_flag;
1062 struct try_type type_sequence[] =
1064 { &integer_type_node, 0, 0, 0},
1065 { &unsigned_type_node, 1, 0, 0},
1066 { &long_integer_type_node, 0, 1, 0},
1067 { &long_unsigned_type_node, 1, 1, 0},
1068 { &long_long_integer_type_node, 0, 1, 1},
1069 { &long_long_unsigned_type_node, 1, 1, 1}
1083 c = nextchar, nextchar = -1;
1087 /* Effectively do c = skip_white_space (c)
1088 but do it faster in the usual cases. */
1101 /* Call skip_white_space so we can warn if appropriate. */
1106 c = skip_white_space (c);
1108 goto found_nonwhite;
1112 token_buffer[0] = c;
1113 token_buffer[1] = 0;
1115 /* yylloc.first_line = lineno; */
1121 token_buffer[0] = 0;
1126 if (dollars_in_ident)
1131 /* Capital L may start a wide-string or wide-character constant. */
1133 register int c = getc (finput);
1142 goto string_constant;
1149 if (!doing_objc_thang)
1156 /* '@' may start a constant string object. */
1157 register int c = getc(finput);
1161 goto string_constant;
1164 /* Fall through to treat '@' as the start of an indentifier. */
1167 case 'A': case 'B': case 'C': case 'D': case 'E':
1168 case 'F': case 'G': case 'H': case 'I': case 'J':
1169 case 'K': case 'M': case 'N': case 'O':
1170 case 'P': case 'Q': case 'R': case 'S': case 'T':
1171 case 'U': case 'V': case 'W': case 'X': case 'Y':
1173 case 'a': case 'b': case 'c': case 'd': case 'e':
1174 case 'f': case 'g': case 'h': case 'i': case 'j':
1175 case 'k': case 'l': case 'm': case 'n': case 'o':
1176 case 'p': case 'q': case 'r': case 's': case 't':
1177 case 'u': case 'v': case 'w': case 'x': case 'y':
1182 while (isalnum (c) || c == '_' || c == '$' || c == '@')
1184 /* Make sure this char really belongs in an identifier. */
1185 if (c == '@' && ! doing_objc_thang)
1187 if (c == '$' && ! dollars_in_ident)
1190 if (p >= token_buffer + maxtoken)
1191 p = extend_token_buffer (p);
1203 /* Try to recognize a keyword. Uses minimum-perfect hash function */
1206 register struct resword *ptr;
1208 if (ptr = is_reserved_word (token_buffer, p - token_buffer))
1211 yylval.ttype = ridpointers[(int) ptr->rid];
1212 value = (int) ptr->token;
1214 /* Only return OBJECTNAME if it is a typedef. */
1215 if (doing_objc_thang && value == OBJECTNAME)
1217 lastiddecl = lookup_name(yylval.ttype);
1219 if (lastiddecl == NULL_TREE
1220 || TREE_CODE (lastiddecl) != TYPE_DECL)
1224 /* Even if we decided to recognize asm, still perhaps warn. */
1226 && (value == ASM_KEYWORD || value == TYPEOF
1227 || ptr->rid == RID_INLINE)
1228 && token_buffer[0] != '_')
1229 pedwarn ("ANSI does not permit the keyword `%s'",
1234 /* If we did not find a keyword, look for an identifier
1237 if (value == IDENTIFIER)
1239 if (token_buffer[0] == '@')
1240 error("invalid identifier `%s'", token_buffer);
1242 yylval.ttype = get_identifier (token_buffer);
1243 lastiddecl = lookup_name (yylval.ttype);
1245 if (lastiddecl != 0 && TREE_CODE (lastiddecl) == TYPE_DECL)
1247 /* A user-invisible read-only initialized variable
1248 should be replaced by its value.
1249 We handle only strings since that's the only case used in C. */
1250 else if (lastiddecl != 0 && TREE_CODE (lastiddecl) == VAR_DECL
1251 && DECL_IGNORED_P (lastiddecl)
1252 && TREE_READONLY (lastiddecl)
1253 && DECL_INITIAL (lastiddecl) != 0
1254 && TREE_CODE (DECL_INITIAL (lastiddecl)) == STRING_CST)
1256 tree stringval = DECL_INITIAL (lastiddecl);
1258 /* Copy the string value so that we won't clobber anything
1259 if we put something in the TREE_CHAIN of this one. */
1260 yylval.ttype = build_string (TREE_STRING_LENGTH (stringval),
1261 TREE_STRING_POINTER (stringval));
1264 else if (doing_objc_thang)
1266 tree objc_interface_decl = is_class_name (yylval.ttype);
1268 if (objc_interface_decl)
1271 yylval.ttype = objc_interface_decl;
1278 case '0': case '1': case '2': case '3': case '4':
1279 case '5': case '6': case '7': case '8': case '9':
1284 int largest_digit = 0;
1286 /* for multi-precision arithmetic,
1287 we actually store only HOST_BITS_PER_CHAR bits in each part.
1288 The number of parts is chosen so as to be sufficient to hold
1289 the enough bits to fit into the two HOST_WIDE_INTs that contain
1290 the integer value (this is always at least as many bits as are
1291 in a target `long long' value, but may be wider). */
1292 #define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2)
1293 int parts[TOTAL_PARTS];
1296 enum anon1 { NOT_FLOAT, AFTER_POINT, TOO_MANY_POINTS} floatflag
1299 for (count = 0; count < TOTAL_PARTS; count++)
1307 *p++ = (c = getc (finput));
1308 if ((c == 'x') || (c == 'X'))
1311 *p++ = (c = getc (finput));
1313 /* Leading 0 forces octal unless the 0 is the only digit. */
1314 else if (c >= '0' && c <= '9')
1323 /* Read all the digits-and-decimal-points. */
1326 || (isalnum (c) && c != 'l' && c != 'L'
1327 && c != 'u' && c != 'U'
1328 && c != 'i' && c != 'I' && c != 'j' && c != 'J'
1329 && (floatflag == NOT_FLOAT || ((c != 'f') && (c != 'F')))))
1334 error ("floating constant may not be in radix 16");
1335 if (floatflag == AFTER_POINT)
1337 error ("malformed floating constant");
1338 floatflag = TOO_MANY_POINTS;
1341 floatflag = AFTER_POINT;
1344 *p++ = c = getc (finput);
1345 /* Accept '.' as the start of a floating-point number
1346 only when it is followed by a digit.
1347 Otherwise, unread the following non-digit
1348 and use the '.' as a structural token. */
1349 if (p == token_buffer + 2 && !isdigit (c))
1360 error ("parse error at `..'");
1363 token_buffer[1] = 0;
1370 /* It is not a decimal point.
1371 It should be a digit (perhaps a hex digit). */
1377 else if (base <= 10)
1379 if (c == 'e' || c == 'E')
1382 floatflag = AFTER_POINT;
1383 break; /* start of exponent */
1385 error ("nondigits in number and not hexadecimal");
1396 if (c >= largest_digit)
1400 for (count = 0; count < TOTAL_PARTS; count++)
1402 parts[count] *= base;
1406 += (parts[count-1] >> HOST_BITS_PER_CHAR);
1408 &= (1 << HOST_BITS_PER_CHAR) - 1;
1414 /* If the extra highest-order part ever gets anything in it,
1415 the number is certainly too big. */
1416 if (parts[TOTAL_PARTS - 1] != 0)
1419 if (p >= token_buffer + maxtoken - 3)
1420 p = extend_token_buffer (p);
1421 *p++ = (c = getc (finput));
1426 error ("numeric constant with no digits");
1428 if (largest_digit >= base)
1429 error ("numeric constant contains digits beyond the radix");
1431 /* Remove terminating char from the token buffer and delimit the string */
1434 if (floatflag != NOT_FLOAT)
1436 tree type = double_type_node;
1437 int garbage_chars = 0, exceeds_double = 0;
1439 REAL_VALUE_TYPE value;
1442 /* Read explicit exponent if any, and put it in tokenbuf. */
1444 if ((c == 'e') || (c == 'E'))
1446 if (p >= token_buffer + maxtoken - 3)
1447 p = extend_token_buffer (p);
1450 if ((c == '+') || (c == '-'))
1456 error ("floating constant exponent has no digits");
1459 if (p >= token_buffer + maxtoken - 3)
1460 p = extend_token_buffer (p);
1469 /* Convert string to a double, checking for overflow. */
1470 if (setjmp (handler))
1472 error ("floating constant out of range");
1477 set_float_handler (handler);
1479 /* The second argument, machine_mode, of REAL_VALUE_ATOF tells the
1480 desired precision of the binary result of decimal-to-binary conversion. */
1482 /* Read the suffixes to choose a data type. */
1486 type = float_type_node;
1487 value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
1488 if (REAL_VALUE_ISINF (value) && pedantic)
1489 pedwarn ("floating point number exceeds range of `float'");
1494 type = long_double_type_node;
1495 value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
1496 if (REAL_VALUE_ISINF (value) && pedantic)
1498 "floating point number exceeds range of `long double'");
1504 error ("more than one `i' or `j' in numeric constant");
1510 value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
1511 if (REAL_VALUE_ISINF (value) && pedantic)
1512 pedwarn ("floating point number exceeds range of `double'");
1514 set_float_handler (NULL_PTR);
1517 if (errno == ERANGE && !flag_traditional && pedantic)
1519 /* ERANGE is also reported for underflow,
1520 so test the value to distinguish overflow from that. */
1521 if (REAL_VALUES_LESS (dconst1, value)
1522 || REAL_VALUES_LESS (value, dconstm1))
1524 pedwarn ("floating point number exceeds range of `double'");
1529 /* Note: garbage_chars is -1 if first char is *not* garbage. */
1530 while (isalnum (c) || c == '.' || c == '_'
1531 || (!flag_traditional && (c == '+' || c == '-')
1532 && (p[-1] == 'e' || p[-1] == 'E')))
1534 if (p >= token_buffer + maxtoken - 3)
1535 p = extend_token_buffer (p);
1540 if (garbage_chars > 0)
1541 error ("garbage at end of number");
1543 /* Create a node with determined type and value. */
1545 yylval.ttype = build_complex (convert (type, integer_zero_node),
1546 build_real (type, value));
1548 yylval.ttype = build_real (type, value);
1555 tree traditional_type, ansi_type, type;
1556 HOST_WIDE_INT high, low;
1557 int spec_unsigned = 0;
1559 int spec_long_long = 0;
1565 if (c == 'u' || c == 'U')
1568 error ("two `u's in integer constant");
1571 else if (c == 'l' || c == 'L')
1576 error ("three `l's in integer constant");
1578 pedwarn ("ANSI C forbids long long integer constants");
1583 else if (c == 'i' || c == 'j' || c == 'I' || c == 'J')
1586 error ("more than one `i' or `j' in numeric constant");
1591 if (isalnum (c) || c == '.' || c == '_'
1592 || (!flag_traditional && (c == '+' || c == '-')
1593 && (p[-1] == 'e' || p[-1] == 'E')))
1595 error ("garbage at end of number");
1596 while (isalnum (c) || c == '.' || c == '_'
1597 || (!flag_traditional && (c == '+' || c == '-')
1598 && (p[-1] == 'e' || p[-1] == 'E')))
1600 if (p >= token_buffer + maxtoken - 3)
1601 p = extend_token_buffer (p);
1608 if (p >= token_buffer + maxtoken - 3)
1609 p = extend_token_buffer (p);
1616 /* If the constant is not long long and it won't fit in an
1617 unsigned long, or if the constant is long long and won't fit
1618 in an unsigned long long, then warn that the constant is out
1621 /* ??? This assumes that long long and long integer types are
1622 a multiple of 8 bits. This better than the original code
1623 though which assumed that long was exactly 32 bits and long
1624 long was exactly 64 bits. */
1627 bytes = TYPE_PRECISION (long_long_integer_type_node) / 8;
1629 bytes = TYPE_PRECISION (long_integer_type_node) / 8;
1632 for (i = bytes; i < TOTAL_PARTS; i++)
1636 pedwarn ("integer constant out of range");
1638 /* This is simplified by the fact that our constant
1639 is always positive. */
1643 for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR; i++)
1645 high |= ((HOST_WIDE_INT) parts[i + (HOST_BITS_PER_WIDE_INT
1646 / HOST_BITS_PER_CHAR)]
1647 << (i * HOST_BITS_PER_CHAR));
1648 low |= (HOST_WIDE_INT) parts[i] << (i * HOST_BITS_PER_CHAR);
1651 yylval.ttype = build_int_2 (low, high);
1652 TREE_TYPE (yylval.ttype) = long_long_unsigned_type_node;
1654 /* If warn_traditional, calculate both the ANSI type and the
1655 traditional type, then see if they disagree.
1656 Otherwise, calculate only the type for the dialect in use. */
1657 if (warn_traditional || flag_traditional)
1659 /* Calculate the traditional type. */
1660 /* Traditionally, any constant is signed;
1661 but if unsigned is specified explicitly, obey that.
1662 Use the smallest size with the right number of bits,
1663 except for one special case with decimal constants. */
1664 if (! spec_long && base != 10
1665 && int_fits_type_p (yylval.ttype, unsigned_type_node))
1666 traditional_type = (spec_unsigned ? unsigned_type_node
1667 : integer_type_node);
1668 /* A decimal constant must be long
1669 if it does not fit in type int.
1670 I think this is independent of whether
1671 the constant is signed. */
1672 else if (! spec_long && base == 10
1673 && int_fits_type_p (yylval.ttype, integer_type_node))
1674 traditional_type = (spec_unsigned ? unsigned_type_node
1675 : integer_type_node);
1676 else if (! spec_long_long)
1677 traditional_type = (spec_unsigned ? long_unsigned_type_node
1678 : long_integer_type_node);
1680 traditional_type = (spec_unsigned
1681 ? long_long_unsigned_type_node
1682 : long_long_integer_type_node);
1684 if (warn_traditional || ! flag_traditional)
1686 /* Calculate the ANSI type. */
1687 if (! spec_long && ! spec_unsigned
1688 && int_fits_type_p (yylval.ttype, integer_type_node))
1689 ansi_type = integer_type_node;
1690 else if (! spec_long && (base != 10 || spec_unsigned)
1691 && int_fits_type_p (yylval.ttype, unsigned_type_node))
1692 ansi_type = unsigned_type_node;
1693 else if (! spec_unsigned && !spec_long_long
1694 && int_fits_type_p (yylval.ttype, long_integer_type_node))
1695 ansi_type = long_integer_type_node;
1696 else if (! spec_long_long)
1697 ansi_type = long_unsigned_type_node;
1698 else if (! spec_unsigned
1699 /* Verify value does not overflow into sign bit. */
1700 && TREE_INT_CST_HIGH (yylval.ttype) >= 0
1701 && int_fits_type_p (yylval.ttype,
1702 long_long_integer_type_node))
1703 ansi_type = long_long_integer_type_node;
1705 ansi_type = long_long_unsigned_type_node;
1708 type = flag_traditional ? traditional_type : ansi_type;
1710 if (warn_traditional && traditional_type != ansi_type)
1712 if (TYPE_PRECISION (traditional_type)
1713 != TYPE_PRECISION (ansi_type))
1714 warning ("width of integer constant changes with -traditional");
1715 else if (TREE_UNSIGNED (traditional_type)
1716 != TREE_UNSIGNED (ansi_type))
1717 warning ("integer constant is unsigned in ANSI C, signed with -traditional");
1719 warning ("width of integer constant may change on other systems with -traditional");
1722 if (!flag_traditional && !int_fits_type_p (yylval.ttype, type)
1724 pedwarn ("integer constant out of range");
1726 if (base == 10 && ! spec_unsigned && TREE_UNSIGNED (type))
1727 warning ("decimal constant is so large that it is unsigned");
1731 if (TYPE_PRECISION (type)
1732 <= TYPE_PRECISION (integer_type_node))
1734 = build_complex (integer_zero_node,
1735 convert (integer_type_node, yylval.ttype));
1737 error ("complex integer constant is too wide for `complex int'");
1739 else if (flag_traditional && !int_fits_type_p (yylval.ttype, type))
1740 /* The traditional constant 0x80000000 is signed
1741 but doesn't fit in the range of int.
1742 This will change it to -0x80000000, which does fit. */
1744 TREE_TYPE (yylval.ttype) = unsigned_type (type);
1745 yylval.ttype = convert (type, yylval.ttype);
1748 TREE_TYPE (yylval.ttype) = type;
1753 value = CONSTANT; break;
1759 register int result = 0;
1760 register int num_chars = 0;
1761 unsigned width = TYPE_PRECISION (char_type_node);
1766 width = WCHAR_TYPE_SIZE;
1767 #ifdef MULTIBYTE_CHARS
1768 max_chars = MB_CUR_MAX;
1774 max_chars = TYPE_PRECISION (integer_type_node) / width;
1782 if (c == '\'' || c == EOF)
1788 c = readescape (&ignore);
1791 if (width < HOST_BITS_PER_INT
1792 && (unsigned) c >= (1 << width))
1793 pedwarn ("escape sequence out of range for character");
1794 #ifdef MAP_CHARACTER
1796 c = MAP_CHARACTER (c);
1802 pedwarn ("ANSI C forbids newline in character constant");
1805 #ifdef MAP_CHARACTER
1807 c = MAP_CHARACTER (c);
1811 if (num_chars > maxtoken - 4)
1812 extend_token_buffer (token_buffer);
1814 token_buffer[num_chars] = c;
1816 /* Merge character into result; ignore excess chars. */
1817 if (num_chars < max_chars + 1)
1819 if (width < HOST_BITS_PER_INT)
1820 result = (result << width) | (c & ((1 << width) - 1));
1826 token_buffer[num_chars + 1] = '\'';
1827 token_buffer[num_chars + 2] = 0;
1830 error ("malformatted character constant");
1831 else if (num_chars == 0)
1832 error ("empty character constant");
1833 else if (num_chars > max_chars)
1835 num_chars = max_chars;
1836 error ("character constant too long");
1838 else if (num_chars != 1 && ! flag_traditional)
1839 warning ("multi-character character constant");
1841 /* If char type is signed, sign-extend the constant. */
1844 int num_bits = num_chars * width;
1845 if (TREE_UNSIGNED (char_type_node)
1846 || ((result >> (num_bits - 1)) & 1) == 0)
1848 = build_int_2 (result & ((unsigned HOST_WIDE_INT) ~0
1849 >> (HOST_BITS_PER_WIDE_INT - num_bits)),
1853 = build_int_2 (result | ~((unsigned HOST_WIDE_INT) ~0
1854 >> (HOST_BITS_PER_WIDE_INT - num_bits)),
1856 TREE_TYPE (yylval.ttype) = integer_type_node;
1860 #ifdef MULTIBYTE_CHARS
1861 /* Set the initial shift state and convert the next sequence. */
1863 /* In all locales L'\0' is zero and mbtowc will return zero,
1866 || (num_chars == 1 && token_buffer[1] != '\0'))
1869 (void) mbtowc (NULL_PTR, NULL_PTR, 0);
1870 if (mbtowc (& wc, token_buffer + 1, num_chars) == num_chars)
1873 warning ("Ignoring invalid multibyte character");
1876 yylval.ttype = build_int_2 (result, 0);
1877 TREE_TYPE (yylval.ttype) = wchar_type_node;
1888 p = token_buffer + 1;
1890 while (c != '"' && c >= 0)
1892 /* ignore_escape_flag is set for reading the filename in #line. */
1893 if (!ignore_escape_flag && c == '\\')
1896 c = readescape (&ignore);
1900 && TYPE_PRECISION (char_type_node) < HOST_BITS_PER_INT
1901 && c >= (1 << TYPE_PRECISION (char_type_node)))
1902 pedwarn ("escape sequence out of range for character");
1907 pedwarn ("ANSI C forbids newline in string constant");
1911 if (p == token_buffer + maxtoken)
1912 p = extend_token_buffer (p);
1920 /* We have read the entire constant.
1921 Construct a STRING_CST for the result. */
1925 /* If this is a L"..." wide-string, convert the multibyte string
1926 to a wide character string. */
1927 char *widep = (char *) alloca ((p - token_buffer) * WCHAR_BYTES);
1930 #ifdef MULTIBYTE_CHARS
1931 len = mbstowcs ((wchar_t *) widep, token_buffer + 1, p - token_buffer);
1932 if ((unsigned) len >= (p - token_buffer))
1934 warning ("Ignoring invalid multibyte string");
1937 bzero (widep + (len * WCHAR_BYTES), WCHAR_BYTES);
1940 union { long l; char c[sizeof (long)]; } u;
1944 /* Determine whether host is little or big endian. */
1946 big_endian = u.c[sizeof (long) - 1];
1947 wp = widep + (big_endian ? WCHAR_BYTES - 1 : 0);
1949 bzero (widep, (p - token_buffer) * WCHAR_BYTES);
1950 for (cp = token_buffer + 1; cp < p; cp++)
1951 *wp = *cp, wp += WCHAR_BYTES;
1952 len = p - token_buffer - 1;
1955 yylval.ttype = build_string ((len + 1) * WCHAR_BYTES, widep);
1956 TREE_TYPE (yylval.ttype) = wchar_array_type_node;
1961 extern tree build_objc_string();
1962 /* Return an Objective-C @"..." constant string object. */
1963 yylval.ttype = build_objc_string (p - token_buffer,
1965 TREE_TYPE (yylval.ttype) = char_array_type_node;
1966 value = OBJC_STRING;
1970 yylval.ttype = build_string (p - token_buffer, token_buffer + 1);
1971 TREE_TYPE (yylval.ttype) = char_array_type_node;
2001 yylval.code = PLUS_EXPR; break;
2003 yylval.code = MINUS_EXPR; break;
2005 yylval.code = BIT_AND_EXPR; break;
2007 yylval.code = BIT_IOR_EXPR; break;
2009 yylval.code = MULT_EXPR; break;
2011 yylval.code = TRUNC_DIV_EXPR; break;
2013 yylval.code = TRUNC_MOD_EXPR; break;
2015 yylval.code = BIT_XOR_EXPR; break;
2017 yylval.code = LSHIFT_EXPR; break;
2019 yylval.code = RSHIFT_EXPR; break;
2021 yylval.code = LT_EXPR; break;
2023 yylval.code = GT_EXPR; break;
2026 token_buffer[1] = c1 = getc (finput);
2027 token_buffer[2] = 0;
2034 value = ARITHCOMPARE; yylval.code = LE_EXPR; goto done;
2036 value = ARITHCOMPARE; yylval.code = GE_EXPR; goto done;
2038 value = EQCOMPARE; yylval.code = NE_EXPR; goto done;
2040 value = EQCOMPARE; yylval.code = EQ_EXPR; goto done;
2042 value = ASSIGN; goto done;
2048 value = PLUSPLUS; goto done;
2050 value = MINUSMINUS; goto done;
2052 value = ANDAND; goto done;
2054 value = OROR; goto done;
2062 else if ((c == '-') && (c1 == '>'))
2063 { value = POINTSAT; goto done; }
2064 ungetc (c1, finput);
2065 token_buffer[1] = 0;
2067 if ((c == '<') || (c == '>'))
2068 value = ARITHCOMPARE;
2074 /* Don't make yyparse think this is eof. */
2083 /* yylloc.last_line = lineno; */
2088 /* Sets the value of the 'yydebug' variable to VALUE.
2089 This is a function so we don't have to have YYDEBUG defined
2090 in order to build the compiler. */
2099 warning ("YYDEBUG not defined.");