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. */
48 /* MULTIBYTE_CHARS support only works for native compilers.
49 ??? Ideally what we want is to model widechar support after
50 the current floating point support. */
52 #undef MULTIBYTE_CHARS
55 #ifdef MULTIBYTE_CHARS
67 cpp_options parse_options
;
68 static enum cpp_token cpp_token
;
71 /* The elements of `ridpointers' are identifier nodes
72 for the reserved type names and storage classes.
73 It is indexed by a RID_... value. */
74 tree ridpointers
[(int) RID_MAX
];
76 /* Cause the `yydebug' variable to be defined. */
80 static unsigned char *yy_cur
, *yy_lim
;
87 parse_in
.limit
= parse_in
.token_buffer
;
88 cpp_token
= cpp_get_token (&parse_in
);
89 if (cpp_token
== CPP_EOF
)
91 yy_lim
= CPP_PWRITTEN (&parse_in
);
92 yy_cur
= parse_in
.token_buffer
;
98 #define GETC() (yy_cur < yy_lim ? *yy_cur++ : yy_get_token ())
99 #define UNGETC(c) ((c), yy_cur--)
101 #define GETC() getc (finput)
102 #define UNGETC(c) ungetc (c, finput)
105 /* the declaration found for the last IDENTIFIER token read in.
106 yylex must look this up to detect typedefs, which get token type TYPENAME,
107 so it is left around in case the identifier is not a typedef but is
108 used in a context which makes it a reference to a variable. */
111 /* Nonzero enables objc features. */
113 int doing_objc_thang
;
115 extern tree
is_class_name ();
119 /* File used for outputting assembler code. */
120 extern FILE *asm_out_file
;
122 #ifndef WCHAR_TYPE_SIZE
124 #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
126 #define WCHAR_TYPE_SIZE BITS_PER_WORD
130 /* Number of bytes in a wide character. */
131 #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT)
133 static int maxtoken
; /* Current nominal length of token buffer. */
134 char *token_buffer
; /* Pointer to token buffer.
135 Actual allocated length is maxtoken + 2.
136 This is not static because objc-parse.y uses it. */
138 static int indent_level
= 0; /* Number of { minus number of }. */
140 /* Nonzero if end-of-file has been seen on input. */
141 static int end_of_file
;
144 /* Buffered-back input character; faster than using ungetc. */
145 static int nextchar
= -1;
148 #ifdef HANDLE_SYSV_PRAGMA
149 static int handle_sysv_pragma
PROTO((int));
150 #endif /* HANDLE_SYSV_PRAGMA */
151 static int skip_white_space
PROTO((int));
152 static char *extend_token_buffer
PROTO((char *));
153 static int readescape
PROTO((int *));
154 int check_newline ();
156 /* Do not insert generated code into the source, instead, include it.
157 This allows us to build gcc automatically even for targets that
158 need to add or modify the reserved keyword lists. */
161 /* Return something to represent absolute declarators containing a *.
162 TARGET is the absolute declarator that the * contains.
163 TYPE_QUALS is a list of modifiers such as const or volatile
164 to apply to the pointer type, represented as identifiers.
166 We return an INDIRECT_REF whose "contents" are TARGET
167 and whose type is the modifier list. */
170 make_pointer_declarator (type_quals
, target
)
171 tree type_quals
, target
;
173 return build1 (INDIRECT_REF
, type_quals
, target
);
177 forget_protocol_qualifiers ()
179 int i
, n
= sizeof wordlist
/ sizeof (struct resword
);
181 for (i
= 0; i
< n
; i
++)
182 if ((int) wordlist
[i
].rid
>= (int) RID_IN
183 && (int) wordlist
[i
].rid
<= (int) RID_ONEWAY
)
184 wordlist
[i
].name
= "";
188 remember_protocol_qualifiers ()
190 int i
, n
= sizeof wordlist
/ sizeof (struct resword
);
192 for (i
= 0; i
< n
; i
++)
193 if (wordlist
[i
].rid
== RID_IN
)
194 wordlist
[i
].name
= "in";
195 else if (wordlist
[i
].rid
== RID_OUT
)
196 wordlist
[i
].name
= "out";
197 else if (wordlist
[i
].rid
== RID_INOUT
)
198 wordlist
[i
].name
= "inout";
199 else if (wordlist
[i
].rid
== RID_BYCOPY
)
200 wordlist
[i
].name
= "bycopy";
201 else if (wordlist
[i
].rid
== RID_ONEWAY
)
202 wordlist
[i
].name
= "oneway";
207 init_parse (filename
)
214 cpp_reader_init (&parse_in
);
215 parse_in
.data
= &parse_options
;
216 cpp_options_init (&parse_options
);
217 cpp_handle_options (&parse_in
, 0, NULL
); /* FIXME */
218 parse_in
.show_column
= 1;
219 if (! cpp_start_read (&parse_in
, filename
))
226 cpp_finish (&parse_in
);
233 /* Make identifier nodes long enough for the language-specific slots. */
234 set_identifier_size (sizeof (struct lang_identifier
));
236 /* Start it at 0, because check_newline is called at the very beginning
237 and will increment it to 1. */
240 #ifdef MULTIBYTE_CHARS
241 /* Change to the native locale for multibyte conversions. */
242 setlocale (LC_CTYPE
, "");
246 token_buffer
= (char *) xmalloc (maxtoken
+ 2);
248 ridpointers
[(int) RID_INT
] = get_identifier ("int");
249 ridpointers
[(int) RID_CHAR
] = get_identifier ("char");
250 ridpointers
[(int) RID_VOID
] = get_identifier ("void");
251 ridpointers
[(int) RID_FLOAT
] = get_identifier ("float");
252 ridpointers
[(int) RID_DOUBLE
] = get_identifier ("double");
253 ridpointers
[(int) RID_SHORT
] = get_identifier ("short");
254 ridpointers
[(int) RID_LONG
] = get_identifier ("long");
255 ridpointers
[(int) RID_UNSIGNED
] = get_identifier ("unsigned");
256 ridpointers
[(int) RID_SIGNED
] = get_identifier ("signed");
257 ridpointers
[(int) RID_INLINE
] = get_identifier ("inline");
258 ridpointers
[(int) RID_CONST
] = get_identifier ("const");
259 ridpointers
[(int) RID_VOLATILE
] = get_identifier ("volatile");
260 ridpointers
[(int) RID_AUTO
] = get_identifier ("auto");
261 ridpointers
[(int) RID_STATIC
] = get_identifier ("static");
262 ridpointers
[(int) RID_EXTERN
] = get_identifier ("extern");
263 ridpointers
[(int) RID_TYPEDEF
] = get_identifier ("typedef");
264 ridpointers
[(int) RID_REGISTER
] = get_identifier ("register");
265 ridpointers
[(int) RID_ITERATOR
] = get_identifier ("iterator");
266 ridpointers
[(int) RID_COMPLEX
] = get_identifier ("complex");
267 ridpointers
[(int) RID_ID
] = get_identifier ("id");
268 ridpointers
[(int) RID_IN
] = get_identifier ("in");
269 ridpointers
[(int) RID_OUT
] = get_identifier ("out");
270 ridpointers
[(int) RID_INOUT
] = get_identifier ("inout");
271 ridpointers
[(int) RID_BYCOPY
] = get_identifier ("bycopy");
272 ridpointers
[(int) RID_ONEWAY
] = get_identifier ("oneway");
273 forget_protocol_qualifiers();
275 /* Some options inhibit certain reserved words.
276 Clear those words out of the hash table so they won't be recognized. */
277 #define UNSET_RESERVED_WORD(STRING) \
278 do { struct resword *s = is_reserved_word (STRING, sizeof (STRING) - 1); \
279 if (s) s->name = ""; } while (0)
281 if (! doing_objc_thang
)
282 UNSET_RESERVED_WORD ("id");
284 if (flag_traditional
)
286 UNSET_RESERVED_WORD ("const");
287 UNSET_RESERVED_WORD ("volatile");
288 UNSET_RESERVED_WORD ("typeof");
289 UNSET_RESERVED_WORD ("signed");
290 UNSET_RESERVED_WORD ("inline");
291 UNSET_RESERVED_WORD ("iterator");
292 UNSET_RESERVED_WORD ("complex");
296 UNSET_RESERVED_WORD ("asm");
297 UNSET_RESERVED_WORD ("typeof");
298 UNSET_RESERVED_WORD ("inline");
299 UNSET_RESERVED_WORD ("iterator");
300 UNSET_RESERVED_WORD ("complex");
305 reinit_parse_for_function ()
309 /* Function used when yydebug is set, to print a token in more detail. */
312 yyprint (file
, yychar
, yylval
)
324 if (IDENTIFIER_POINTER (t
))
325 fprintf (file
, " `%s'", IDENTIFIER_POINTER (t
));
330 if (TREE_CODE (t
) == INTEGER_CST
)
332 #if HOST_BITS_PER_WIDE_INT == 64
333 #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
336 #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
343 #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
349 TREE_INT_CST_HIGH (t
), TREE_INT_CST_LOW (t
));
354 /* Iff C is a carriage return, warn about it - if appropriate -
355 and return nonzero. */
360 static int newline_warning
= 0;
364 /* ANSI C says the effects of a carriage return in a source file
366 if (pedantic
&& !newline_warning
)
368 warning ("carriage return in source file");
369 warning ("(we only warn about the first carriage return)");
377 /* If C is not whitespace, return C.
378 Otherwise skip whitespace and return first nonwhite char read. */
388 /* We don't recognize comments here, because
389 cpp output can include / and * consecutively as operators.
390 Also, there's no need, since cpp removes all comments. */
393 c
= check_newline ();
414 error ("stray '\\' in program");
424 /* Skips all of the white space at the current location in the input file.
425 Must use and reset nextchar if it has the next character. */
428 position_after_white_space ()
434 c
= nextchar
, nextchar
= -1;
439 UNGETC (skip_white_space (c
));
442 /* Like skip_white_space, but don't advance beyond the end of line.
443 Moreover, we don't get passed a character to start with. */
445 skip_white_space_on_line ()
474 /* Make the token buffer longer, preserving the data in it.
475 P should point to just beyond the last valid character in the old buffer.
476 The value we return is a pointer to the new buffer
477 at a place corresponding to P. */
480 extend_token_buffer (p
)
483 int offset
= p
- token_buffer
;
485 maxtoken
= maxtoken
* 2 + 10;
486 token_buffer
= (char *) xrealloc (token_buffer
, maxtoken
+ 2);
488 return token_buffer
+ offset
;
492 #define GET_DIRECTIVE_LINE() get_directive_line (finput)
493 #else /* USE_CPPLIB */
494 /* Read the rest of a #-directive from input stream FINPUT.
495 In normal use, the directive name and the white space after it
496 have already been read, so they won't be included in the result.
497 We allow for the fact that the directive line may contain
498 a newline embedded within a character or string literal which forms
499 a part of the directive.
501 The value is a string in a reusable buffer. It remains valid
502 only until the next time this function is called. */
505 GET_DIRECTIVE_LINE ()
507 static char *directive_buffer
= NULL
;
508 static unsigned buffer_length
= 0;
510 register char *buffer_limit
;
511 register int looking_for
= 0;
512 register int char_escaped
= 0;
514 if (buffer_length
== 0)
516 directive_buffer
= (char *)xmalloc (128);
520 buffer_limit
= &directive_buffer
[buffer_length
];
522 for (p
= directive_buffer
; ; )
526 /* Make buffer bigger if it is full. */
527 if (p
>= buffer_limit
)
529 register unsigned bytes_used
= (p
- directive_buffer
);
533 = (char *)xrealloc (directive_buffer
, buffer_length
);
534 p
= &directive_buffer
[bytes_used
];
535 buffer_limit
= &directive_buffer
[buffer_length
];
540 /* Discard initial whitespace. */
541 if ((c
== ' ' || c
== '\t') && p
== directive_buffer
)
544 /* Detect the end of the directive. */
545 if (c
== '\n' && looking_for
== 0)
554 return directive_buffer
;
556 /* Handle string and character constant syntax. */
559 if (looking_for
== c
&& !char_escaped
)
560 looking_for
= 0; /* Found terminator... stop looking. */
563 if (c
== '\'' || c
== '"')
564 looking_for
= c
; /* Don't stop buffering until we see another
565 another one of these (or an EOF). */
567 /* Handle backslash. */
568 char_escaped
= (c
== '\\' && ! char_escaped
);
571 #endif /* USE_CPPLIB */
573 /* At the beginning of a line, increment the line number
574 and process any #-directive on this line.
575 If the line is a #-directive, read the entire line and return a newline.
576 Otherwise, return the line's first non-whitespace character. */
586 /* Read first nonwhite char on the line. */
589 while (c
== ' ' || c
== '\t')
594 /* If not #, return it so caller will use it. */
598 /* Read first nonwhite char after the `#'. */
601 while (c
== ' ' || c
== '\t')
604 /* If a letter follows, then if the word here is `line', skip
605 it and ignore it; otherwise, ignore the line, with an error
606 if the word isn't `pragma', `ident', `define', or `undef'. */
608 if ((c
>= 'a' && c
<= 'z') || (c
>= 'A' && c
<= 'Z'))
617 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'
618 || whitespace_cr (c
) ))
620 while (c
== ' ' || c
== '\t' || whitespace_cr (c
))
624 #ifdef HANDLE_SYSV_PRAGMA
627 if (token
!= IDENTIFIER
)
629 return handle_sysv_pragma (token
);
630 #else /* !HANDLE_SYSV_PRAGMA */
635 if (token
!= IDENTIFIER
)
637 if (HANDLE_PRAGMA (finput
, yylval
.ttype
))
643 ??? do not know what to
do ???;
644 #endif /* !USE_CPPLIB */
645 #endif /* HANDLE_PRAGMA */
646 #endif /* !HANDLE_SYSV_PRAGMA */
658 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'))
661 debug_define (lineno
, GET_DIRECTIVE_LINE ());
671 && ((c
= GETC()) == ' ' || c
== '\t' || c
== '\n'))
674 debug_undef (lineno
, GET_DIRECTIVE_LINE ());
683 && ((c
= GETC()) == ' ' || c
== '\t'))
692 && ((c
= GETC()) == ' ' || c
== '\t'))
694 /* #ident. The pedantic warning is now in cccp.c. */
696 /* Here we have just seen `#ident '.
697 A string constant should follow. */
699 c
= skip_white_space_on_line ();
701 /* If no argument, ignore the line. */
708 || TREE_CODE (yylval
.ttype
) != STRING_CST
)
710 error ("invalid #ident");
716 #ifdef ASM_OUTPUT_IDENT
717 ASM_OUTPUT_IDENT (asm_out_file
, TREE_STRING_POINTER (yylval
.ttype
));
721 /* Skip the rest of this line. */
726 error ("undefined or invalid # directive");
731 /* Here we have either `#line' or `# <nonletter>'.
732 In either case, it should be a line number; a digit should follow. */
734 /* Can't use skip_white_space here, but must handle all whitespace
735 that is not '\n', lest we get a recursion for '\r' '\n' when
738 c
= skip_white_space_on_line ();
740 /* If the # is the only nonwhite char on the line,
741 just ignore it. Check the new newline. */
745 /* Something follows the #; read a token. */
750 if (token
== CONSTANT
751 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
)
753 int old_lineno
= lineno
;
755 /* subtract one, because it is the following line that
756 gets the specified number */
758 int l
= TREE_INT_CST_LOW (yylval
.ttype
) - 1;
760 /* Is this the last nonwhite stuff on the line? */
761 c
= skip_white_space_on_line ();
764 /* No more: store the line number and check following line. */
770 /* More follows: it must be a string constant (filename). */
772 /* Read the string constant. */
775 if (token
!= STRING
|| TREE_CODE (yylval
.ttype
) != STRING_CST
)
777 error ("invalid #line");
782 = (char *) permalloc (TREE_STRING_LENGTH (yylval
.ttype
) + 1);
783 strcpy (input_filename
, TREE_STRING_POINTER (yylval
.ttype
));
786 /* Each change of file name
787 reinitializes whether we are now in a system header. */
788 in_system_header
= 0;
790 if (main_input_filename
== 0)
791 main_input_filename
= input_filename
;
793 /* Is this the last nonwhite stuff on the line? */
794 c
= skip_white_space_on_line ();
797 /* Update the name in the top element of input_file_stack. */
798 if (input_file_stack
)
799 input_file_stack
->name
= input_filename
;
808 /* `1' after file name means entering new file.
809 `2' after file name means just left a file. */
811 if (token
== CONSTANT
812 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
)
814 if (TREE_INT_CST_LOW (yylval
.ttype
) == 1)
816 /* Pushing to a new file. */
818 = (struct file_stack
*) xmalloc (sizeof (struct file_stack
));
819 input_file_stack
->line
= old_lineno
;
820 p
->next
= input_file_stack
;
821 p
->name
= input_filename
;
822 p
->indent_level
= indent_level
;
823 input_file_stack
= p
;
824 input_file_stack_tick
++;
825 debug_start_source_file (input_filename
);
828 else if (TREE_INT_CST_LOW (yylval
.ttype
) == 2)
830 /* Popping out of a file. */
831 if (input_file_stack
->next
)
833 struct file_stack
*p
= input_file_stack
;
834 if (indent_level
!= p
->indent_level
)
836 warning_with_file_and_line
837 (p
->name
, old_lineno
,
838 "This file contains more `%c's than `%c's.",
839 indent_level
> p
->indent_level
? '{' : '}',
840 indent_level
> p
->indent_level
? '}' : '{');
842 input_file_stack
= p
->next
;
844 input_file_stack_tick
++;
845 debug_end_source_file (input_file_stack
->line
);
848 error ("#-lines for entering and leaving files don't match");
854 /* Now that we've pushed or popped the input stack,
855 update the name in the top element. */
856 if (input_file_stack
)
857 input_file_stack
->name
= input_filename
;
859 /* If we have handled a `1' or a `2',
860 see if there is another number to read. */
863 /* Is this the last nonwhite stuff on the line? */
864 c
= skip_white_space_on_line ();
873 /* `3' after file name means this is a system header file. */
875 if (token
== CONSTANT
876 && TREE_CODE (yylval
.ttype
) == INTEGER_CST
877 && TREE_INT_CST_LOW (yylval
.ttype
) == 3)
878 in_system_header
= 1, used_up
= 1;
882 /* Is this the last nonwhite stuff on the line? */
883 c
= skip_white_space_on_line ();
889 warning ("unrecognized text at end of #line");
892 error ("invalid #-line");
894 /* skip the rest of this line. */
897 if (c
!= '\n' && c
!= EOF
&& nextchar
>= 0)
898 c
= nextchar
, nextchar
= -1;
900 while (c
!= '\n' && c
!= EOF
)
905 #ifdef HANDLE_SYSV_PRAGMA
907 /* Handle a #pragma directive.
908 TOKEN is the token we read after `#pragma'. Processes the entire input
909 line and returns a character for the caller to reread: either \n or EOF. */
911 /* This function has to be in this file, in order to get at
915 handle_sysv_pragma (token
)
928 handle_pragma_token (token_buffer
, yylval
.ttype
);
931 handle_pragma_token (token_buffer
, 0);
935 c
= nextchar
, nextchar
= -1;
940 while (c
== ' ' || c
== '\t')
942 if (c
== '\n' || c
== EOF
)
944 handle_pragma_token (0, 0);
952 #endif /* HANDLE_SYSV_PRAGMA */
954 #define ENDFILE -1 /* token that represents end-of-file */
956 /* Read an escape sequence, returning its equivalent as a character,
957 or store 1 in *ignore_ptr if it is backslash-newline. */
960 readescape (ignore_ptr
)
963 register int c
= GETC();
965 register unsigned count
;
966 unsigned firstdig
= 0;
972 if (warn_traditional
)
973 warning ("the meaning of `\\x' varies with -traditional");
975 if (flag_traditional
)
984 if (!(c
>= 'a' && c
<= 'f')
985 && !(c
>= 'A' && c
<= 'F')
986 && !(c
>= '0' && c
<= '9'))
992 if (c
>= 'a' && c
<= 'f')
993 code
+= c
- 'a' + 10;
994 if (c
>= 'A' && c
<= 'F')
995 code
+= c
- 'A' + 10;
996 if (c
>= '0' && c
<= '9')
998 if (code
!= 0 || count
!= 0)
1007 error ("\\x used with no following hex digits");
1008 else if (count
== 0)
1009 /* Digits are all 0's. Ok. */
1011 else if ((count
- 1) * 4 >= TYPE_PRECISION (integer_type_node
)
1013 && ((1 << (TYPE_PRECISION (integer_type_node
) - (count
- 1) * 4))
1015 pedwarn ("hex escape out of range");
1018 case '0': case '1': case '2': case '3': case '4':
1019 case '5': case '6': case '7':
1022 while ((c
<= '7') && (c
>= '0') && (count
++ < 3))
1024 code
= (code
* 8) + (c
- '0');
1030 case '\\': case '\'': case '"':
1039 return TARGET_NEWLINE
;
1054 if (warn_traditional
)
1055 warning ("the meaning of `\\a' varies with -traditional");
1057 if (flag_traditional
)
1062 #if 0 /* Vertical tab is present in common usage compilers. */
1063 if (flag_traditional
)
1071 pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c
);
1077 /* `\(', etc, are used at beginning of line to avoid confusing Emacs. */
1081 /* `\%' is used to prevent SCCS from getting confused. */
1084 pedwarn ("non-ANSI escape sequence `\\%c'", c
);
1087 if (c
>= 040 && c
< 0177)
1088 pedwarn ("unknown escape sequence `\\%c'", c
);
1090 pedwarn ("unknown escape sequence: `\\' followed by char code 0x%x", c
);
1100 strcpy (buf
, string
);
1102 /* We can't print string and character constants well
1103 because the token_buffer contains the result of processing escapes. */
1105 strcat (buf
, " at end of input");
1106 else if (token_buffer
[0] == 0)
1107 strcat (buf
, " at null character");
1108 else if (token_buffer
[0] == '"')
1109 strcat (buf
, " before string constant");
1110 else if (token_buffer
[0] == '\'')
1111 strcat (buf
, " before character constant");
1112 else if (token_buffer
[0] < 040 || (unsigned char) token_buffer
[0] >= 0177)
1113 sprintf (buf
+ strlen (buf
), " before character 0%o",
1114 (unsigned char) token_buffer
[0]);
1116 strcat (buf
, " before `%s'");
1118 error (buf
, token_buffer
);
1128 char long_long_flag
;
1131 struct try_type type_sequence
[] =
1133 { &integer_type_node
, 0, 0, 0},
1134 { &unsigned_type_node
, 1, 0, 0},
1135 { &long_integer_type_node
, 0, 1, 0},
1136 { &long_unsigned_type_node
, 1, 1, 0},
1137 { &long_long_integer_type_node
, 0, 1, 1},
1138 { &long_long_unsigned_type_node
, 1, 1, 1}
1153 c
= nextchar
, nextchar
= -1;
1158 /* Effectively do c = skip_white_space (c)
1159 but do it faster in the usual cases. */
1172 /* Call skip_white_space so we can warn if appropriate. */
1177 c
= skip_white_space (c
);
1179 goto found_nonwhite
;
1183 token_buffer
[0] = c
;
1184 token_buffer
[1] = 0;
1186 /* yylloc.first_line = lineno; */
1192 token_buffer
[0] = 0;
1197 /* Capital L may start a wide-string or wide-character constant. */
1199 register int c
= GETC();
1208 goto string_constant
;
1215 if (!doing_objc_thang
)
1222 /* '@' may start a constant string object. */
1223 register int c
= GETC ();
1227 goto string_constant
;
1230 /* Fall through to treat '@' as the start of an identifier. */
1233 case 'A': case 'B': case 'C': case 'D': case 'E':
1234 case 'F': case 'G': case 'H': case 'I': case 'J':
1235 case 'K': case 'M': case 'N': case 'O':
1236 case 'P': case 'Q': case 'R': case 'S': case 'T':
1237 case 'U': case 'V': case 'W': case 'X': case 'Y':
1239 case 'a': case 'b': case 'c': case 'd': case 'e':
1240 case 'f': case 'g': case 'h': case 'i': case 'j':
1241 case 'k': case 'l': case 'm': case 'n': case 'o':
1242 case 'p': case 'q': case 'r': case 's': case 't':
1243 case 'u': case 'v': case 'w': case 'x': case 'y':
1249 while (isalnum (c
) || c
== '_' || c
== '$' || c
== '@')
1251 /* Make sure this char really belongs in an identifier. */
1252 if (c
== '@' && ! doing_objc_thang
)
1256 if (! dollars_in_ident
)
1257 error ("`$' in identifier");
1259 pedwarn ("`$' in identifier");
1262 if (p
>= token_buffer
+ maxtoken
)
1263 p
= extend_token_buffer (p
);
1279 /* Try to recognize a keyword. Uses minimum-perfect hash function */
1282 register struct resword
*ptr
;
1284 if ((ptr
= is_reserved_word (token_buffer
, p
- token_buffer
)))
1287 yylval
.ttype
= ridpointers
[(int) ptr
->rid
];
1288 value
= (int) ptr
->token
;
1290 /* Only return OBJECTNAME if it is a typedef. */
1291 if (doing_objc_thang
&& value
== OBJECTNAME
)
1293 lastiddecl
= lookup_name(yylval
.ttype
);
1295 if (lastiddecl
== NULL_TREE
1296 || TREE_CODE (lastiddecl
) != TYPE_DECL
)
1300 /* Even if we decided to recognize asm, still perhaps warn. */
1302 && (value
== ASM_KEYWORD
|| value
== TYPEOF
1303 || ptr
->rid
== RID_INLINE
)
1304 && token_buffer
[0] != '_')
1305 pedwarn ("ANSI does not permit the keyword `%s'",
1310 /* If we did not find a keyword, look for an identifier
1313 if (value
== IDENTIFIER
)
1315 if (token_buffer
[0] == '@')
1316 error("invalid identifier `%s'", token_buffer
);
1318 yylval
.ttype
= get_identifier (token_buffer
);
1319 lastiddecl
= lookup_name (yylval
.ttype
);
1321 if (lastiddecl
!= 0 && TREE_CODE (lastiddecl
) == TYPE_DECL
)
1323 /* A user-invisible read-only initialized variable
1324 should be replaced by its value.
1325 We handle only strings since that's the only case used in C. */
1326 else if (lastiddecl
!= 0 && TREE_CODE (lastiddecl
) == VAR_DECL
1327 && DECL_IGNORED_P (lastiddecl
)
1328 && TREE_READONLY (lastiddecl
)
1329 && DECL_INITIAL (lastiddecl
) != 0
1330 && TREE_CODE (DECL_INITIAL (lastiddecl
)) == STRING_CST
)
1332 tree stringval
= DECL_INITIAL (lastiddecl
);
1334 /* Copy the string value so that we won't clobber anything
1335 if we put something in the TREE_CHAIN of this one. */
1336 yylval
.ttype
= build_string (TREE_STRING_LENGTH (stringval
),
1337 TREE_STRING_POINTER (stringval
));
1340 else if (doing_objc_thang
)
1342 tree objc_interface_decl
= is_class_name (yylval
.ttype
);
1344 if (objc_interface_decl
)
1347 yylval
.ttype
= objc_interface_decl
;
1357 /* Check first for common special case: single-digit 0 or 1. */
1360 UNGETC (next_c
); /* Always undo this lookahead. */
1361 if (!isalnum (next_c
) && next_c
!= '.')
1363 token_buffer
[0] = (char)c
, token_buffer
[1] = '\0';
1364 yylval
.ttype
= (c
== '0') ? integer_zero_node
: integer_one_node
;
1370 case '2': case '3': case '4':
1371 case '5': case '6': case '7': case '8': case '9':
1376 int largest_digit
= 0;
1378 /* for multi-precision arithmetic,
1379 we actually store only HOST_BITS_PER_CHAR bits in each part.
1380 The number of parts is chosen so as to be sufficient to hold
1381 the enough bits to fit into the two HOST_WIDE_INTs that contain
1382 the integer value (this is always at least as many bits as are
1383 in a target `long long' value, but may be wider). */
1384 #define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2)
1385 int parts
[TOTAL_PARTS
];
1388 enum anon1
{ NOT_FLOAT
, AFTER_POINT
, TOO_MANY_POINTS
} floatflag
1391 for (count
= 0; count
< TOTAL_PARTS
; count
++)
1399 *p
++ = (c
= GETC());
1400 if ((c
== 'x') || (c
== 'X'))
1403 *p
++ = (c
= GETC());
1405 /* Leading 0 forces octal unless the 0 is the only digit. */
1406 else if (c
>= '0' && c
<= '9')
1415 /* Read all the digits-and-decimal-points. */
1418 || (isalnum (c
) && c
!= 'l' && c
!= 'L'
1419 && c
!= 'u' && c
!= 'U'
1420 && c
!= 'i' && c
!= 'I' && c
!= 'j' && c
!= 'J'
1421 && (floatflag
== NOT_FLOAT
|| ((c
!= 'f') && (c
!= 'F')))))
1426 error ("floating constant may not be in radix 16");
1427 if (floatflag
== TOO_MANY_POINTS
)
1428 /* We have already emitted an error. Don't need another. */
1430 else if (floatflag
== AFTER_POINT
)
1432 error ("malformed floating constant");
1433 floatflag
= TOO_MANY_POINTS
;
1434 /* Avoid another error from atof by forcing all characters
1435 from here on to be ignored. */
1439 floatflag
= AFTER_POINT
;
1443 /* Accept '.' as the start of a floating-point number
1444 only when it is followed by a digit.
1445 Otherwise, unread the following non-digit
1446 and use the '.' as a structural token. */
1447 if (p
== token_buffer
+ 2 && !isdigit (c
))
1458 error ("parse error at `..'");
1461 token_buffer
[1] = 0;
1468 /* It is not a decimal point.
1469 It should be a digit (perhaps a hex digit). */
1475 else if (base
<= 10)
1477 if (c
== 'e' || c
== 'E')
1480 floatflag
= AFTER_POINT
;
1481 break; /* start of exponent */
1483 error ("nondigits in number and not hexadecimal");
1494 if (c
>= largest_digit
)
1498 for (count
= 0; count
< TOTAL_PARTS
; count
++)
1500 parts
[count
] *= base
;
1504 += (parts
[count
-1] >> HOST_BITS_PER_CHAR
);
1506 &= (1 << HOST_BITS_PER_CHAR
) - 1;
1512 /* If the extra highest-order part ever gets anything in it,
1513 the number is certainly too big. */
1514 if (parts
[TOTAL_PARTS
- 1] != 0)
1517 if (p
>= token_buffer
+ maxtoken
- 3)
1518 p
= extend_token_buffer (p
);
1519 *p
++ = (c
= GETC());
1524 error ("numeric constant with no digits");
1526 if (largest_digit
>= base
)
1527 error ("numeric constant contains digits beyond the radix");
1529 /* Remove terminating char from the token buffer and delimit the string */
1532 if (floatflag
!= NOT_FLOAT
)
1534 tree type
= double_type_node
;
1535 int exceeds_double
= 0;
1537 REAL_VALUE_TYPE value
;
1540 /* Read explicit exponent if any, and put it in tokenbuf. */
1542 if ((c
== 'e') || (c
== 'E'))
1544 if (p
>= token_buffer
+ maxtoken
- 3)
1545 p
= extend_token_buffer (p
);
1548 if ((c
== '+') || (c
== '-'))
1554 error ("floating constant exponent has no digits");
1557 if (p
>= token_buffer
+ maxtoken
- 3)
1558 p
= extend_token_buffer (p
);
1567 /* Convert string to a double, checking for overflow. */
1568 if (setjmp (handler
))
1570 error ("floating constant out of range");
1575 int fflag
= 0, lflag
= 0;
1576 /* Copy token_buffer now, while it has just the number
1577 and not the suffixes; once we add `f' or `i',
1578 REAL_VALUE_ATOF may not work any more. */
1579 char *copy
= (char *) alloca (p
- token_buffer
+ 1);
1580 bcopy (token_buffer
, copy
, p
- token_buffer
+ 1);
1582 set_float_handler (handler
);
1588 /* Read the suffixes to choose a data type. */
1593 error ("more than one `f' in numeric constant");
1599 error ("more than one `l' in numeric constant");
1605 error ("more than one `i' or `j' in numeric constant");
1607 pedwarn ("ANSI C forbids imaginary numeric constants");
1618 if (p
>= token_buffer
+ maxtoken
- 3)
1619 p
= extend_token_buffer (p
);
1625 /* The second argument, machine_mode, of REAL_VALUE_ATOF
1626 tells the desired precision of the binary result
1627 of decimal-to-binary conversion. */
1632 error ("both `f' and `l' in floating constant");
1634 type
= float_type_node
;
1635 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
1636 /* A diagnostic is required here by some ANSI C testsuites.
1637 This is not pedwarn, become some people don't want
1638 an error for this. */
1639 if (REAL_VALUE_ISINF (value
) && pedantic
)
1640 warning ("floating point number exceeds range of `float'");
1644 type
= long_double_type_node
;
1645 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
1646 if (REAL_VALUE_ISINF (value
) && pedantic
)
1647 warning ("floating point number exceeds range of `long double'");
1651 value
= REAL_VALUE_ATOF (copy
, TYPE_MODE (type
));
1652 if (REAL_VALUE_ISINF (value
) && pedantic
)
1653 warning ("floating point number exceeds range of `double'");
1656 set_float_handler (NULL_PTR
);
1659 if (errno
== ERANGE
&& !flag_traditional
&& pedantic
)
1661 /* ERANGE is also reported for underflow,
1662 so test the value to distinguish overflow from that. */
1663 if (REAL_VALUES_LESS (dconst1
, value
)
1664 || REAL_VALUES_LESS (value
, dconstm1
))
1666 warning ("floating point number exceeds range of `double'");
1672 /* If the result is not a number, assume it must have been
1673 due to some error message above, so silently convert
1675 if (REAL_VALUE_ISNAN (value
))
1678 /* Create a node with determined type and value. */
1680 yylval
.ttype
= build_complex (NULL_TREE
,
1681 convert (type
, integer_zero_node
),
1682 build_real (type
, value
));
1684 yylval
.ttype
= build_real (type
, value
);
1688 tree traditional_type
, ansi_type
, type
;
1689 HOST_WIDE_INT high
, low
;
1690 int spec_unsigned
= 0;
1692 int spec_long_long
= 0;
1698 if (c
== 'u' || c
== 'U')
1701 error ("two `u's in integer constant");
1704 else if (c
== 'l' || c
== 'L')
1709 error ("three `l's in integer constant");
1711 pedwarn ("ANSI C forbids long long integer constants");
1716 else if (c
== 'i' || c
== 'j' || c
== 'I' || c
== 'J')
1719 error ("more than one `i' or `j' in numeric constant");
1721 pedwarn ("ANSI C forbids imaginary numeric constants");
1726 if (p
>= token_buffer
+ maxtoken
- 3)
1727 p
= extend_token_buffer (p
);
1732 /* If the constant won't fit in an unsigned long long,
1733 then warn that the constant is out of range. */
1735 /* ??? This assumes that long long and long integer types are
1736 a multiple of 8 bits. This better than the original code
1737 though which assumed that long was exactly 32 bits and long
1738 long was exactly 64 bits. */
1740 bytes
= TYPE_PRECISION (long_long_integer_type_node
) / 8;
1743 for (i
= bytes
; i
< TOTAL_PARTS
; i
++)
1747 pedwarn ("integer constant out of range");
1749 /* This is simplified by the fact that our constant
1750 is always positive. */
1754 for (i
= 0; i
< HOST_BITS_PER_WIDE_INT
/ HOST_BITS_PER_CHAR
; i
++)
1756 high
|= ((HOST_WIDE_INT
) parts
[i
+ (HOST_BITS_PER_WIDE_INT
1757 / HOST_BITS_PER_CHAR
)]
1758 << (i
* HOST_BITS_PER_CHAR
));
1759 low
|= (HOST_WIDE_INT
) parts
[i
] << (i
* HOST_BITS_PER_CHAR
);
1762 yylval
.ttype
= build_int_2 (low
, high
);
1763 TREE_TYPE (yylval
.ttype
) = long_long_unsigned_type_node
;
1765 /* If warn_traditional, calculate both the ANSI type and the
1766 traditional type, then see if they disagree.
1767 Otherwise, calculate only the type for the dialect in use. */
1768 if (warn_traditional
|| flag_traditional
)
1770 /* Calculate the traditional type. */
1771 /* Traditionally, any constant is signed;
1772 but if unsigned is specified explicitly, obey that.
1773 Use the smallest size with the right number of bits,
1774 except for one special case with decimal constants. */
1775 if (! spec_long
&& base
!= 10
1776 && int_fits_type_p (yylval
.ttype
, unsigned_type_node
))
1777 traditional_type
= (spec_unsigned
? unsigned_type_node
1778 : integer_type_node
);
1779 /* A decimal constant must be long
1780 if it does not fit in type int.
1781 I think this is independent of whether
1782 the constant is signed. */
1783 else if (! spec_long
&& base
== 10
1784 && int_fits_type_p (yylval
.ttype
, integer_type_node
))
1785 traditional_type
= (spec_unsigned
? unsigned_type_node
1786 : integer_type_node
);
1787 else if (! spec_long_long
)
1788 traditional_type
= (spec_unsigned
? long_unsigned_type_node
1789 : long_integer_type_node
);
1791 traditional_type
= (spec_unsigned
1792 ? long_long_unsigned_type_node
1793 : long_long_integer_type_node
);
1795 if (warn_traditional
|| ! flag_traditional
)
1797 /* Calculate the ANSI type. */
1798 if (! spec_long
&& ! spec_unsigned
1799 && int_fits_type_p (yylval
.ttype
, integer_type_node
))
1800 ansi_type
= integer_type_node
;
1801 else if (! spec_long
&& (base
!= 10 || spec_unsigned
)
1802 && int_fits_type_p (yylval
.ttype
, unsigned_type_node
))
1803 ansi_type
= unsigned_type_node
;
1804 else if (! spec_unsigned
&& !spec_long_long
1805 && int_fits_type_p (yylval
.ttype
, long_integer_type_node
))
1806 ansi_type
= long_integer_type_node
;
1807 else if (! spec_long_long
1808 && int_fits_type_p (yylval
.ttype
,
1809 long_unsigned_type_node
))
1810 ansi_type
= long_unsigned_type_node
;
1811 else if (! spec_unsigned
1812 && int_fits_type_p (yylval
.ttype
,
1813 long_long_integer_type_node
))
1814 ansi_type
= long_long_integer_type_node
;
1816 ansi_type
= long_long_unsigned_type_node
;
1819 type
= flag_traditional
? traditional_type
: ansi_type
;
1821 if (warn_traditional
&& traditional_type
!= ansi_type
)
1823 if (TYPE_PRECISION (traditional_type
)
1824 != TYPE_PRECISION (ansi_type
))
1825 warning ("width of integer constant changes with -traditional");
1826 else if (TREE_UNSIGNED (traditional_type
)
1827 != TREE_UNSIGNED (ansi_type
))
1828 warning ("integer constant is unsigned in ANSI C, signed with -traditional");
1830 warning ("width of integer constant may change on other systems with -traditional");
1833 if (pedantic
&& !flag_traditional
&& !spec_long_long
&& !warn
1834 && (TYPE_PRECISION (long_integer_type_node
)
1835 < TYPE_PRECISION (type
)))
1836 pedwarn ("integer constant out of range");
1838 if (base
== 10 && ! spec_unsigned
&& TREE_UNSIGNED (type
))
1839 warning ("decimal constant is so large that it is unsigned");
1843 if (TYPE_PRECISION (type
)
1844 <= TYPE_PRECISION (integer_type_node
))
1846 = build_complex (NULL_TREE
, integer_zero_node
,
1847 convert (integer_type_node
,
1850 error ("complex integer constant is too wide for `complex int'");
1852 else if (flag_traditional
&& !int_fits_type_p (yylval
.ttype
, type
))
1853 /* The traditional constant 0x80000000 is signed
1854 but doesn't fit in the range of int.
1855 This will change it to -0x80000000, which does fit. */
1857 TREE_TYPE (yylval
.ttype
) = unsigned_type (type
);
1858 yylval
.ttype
= convert (type
, yylval
.ttype
);
1859 TREE_OVERFLOW (yylval
.ttype
)
1860 = TREE_CONSTANT_OVERFLOW (yylval
.ttype
) = 0;
1863 TREE_TYPE (yylval
.ttype
) = type
;
1869 if (isalnum (c
) || c
== '.' || c
== '_' || c
== '$'
1870 || (!flag_traditional
&& (c
== '-' || c
== '+')
1871 && (p
[-1] == 'e' || p
[-1] == 'E')))
1872 error ("missing white space after number `%s'", token_buffer
);
1874 value
= CONSTANT
; break;
1880 register int result
= 0;
1881 register int num_chars
= 0;
1882 unsigned width
= TYPE_PRECISION (char_type_node
);
1887 width
= WCHAR_TYPE_SIZE
;
1888 #ifdef MULTIBYTE_CHARS
1889 max_chars
= MB_CUR_MAX
;
1895 max_chars
= TYPE_PRECISION (integer_type_node
) / width
;
1903 if (c
== '\'' || c
== EOF
)
1909 c
= readescape (&ignore
);
1912 if (width
< HOST_BITS_PER_INT
1913 && (unsigned) c
>= (1 << width
))
1914 pedwarn ("escape sequence out of range for character");
1915 #ifdef MAP_CHARACTER
1917 c
= MAP_CHARACTER (c
);
1923 pedwarn ("ANSI C forbids newline in character constant");
1926 #ifdef MAP_CHARACTER
1928 c
= MAP_CHARACTER (c
);
1932 if (num_chars
> maxtoken
- 4)
1933 extend_token_buffer (token_buffer
);
1935 token_buffer
[num_chars
] = c
;
1937 /* Merge character into result; ignore excess chars. */
1938 if (num_chars
< max_chars
+ 1)
1940 if (width
< HOST_BITS_PER_INT
)
1941 result
= (result
<< width
) | (c
& ((1 << width
) - 1));
1947 token_buffer
[num_chars
+ 1] = '\'';
1948 token_buffer
[num_chars
+ 2] = 0;
1951 error ("malformatted character constant");
1952 else if (num_chars
== 0)
1953 error ("empty character constant");
1954 else if (num_chars
> max_chars
)
1956 num_chars
= max_chars
;
1957 error ("character constant too long");
1959 else if (num_chars
!= 1 && ! flag_traditional
)
1960 warning ("multi-character character constant");
1962 /* If char type is signed, sign-extend the constant. */
1965 int num_bits
= num_chars
* width
;
1967 /* We already got an error; avoid invalid shift. */
1968 yylval
.ttype
= build_int_2 (0, 0);
1969 else if (TREE_UNSIGNED (char_type_node
)
1970 || ((result
>> (num_bits
- 1)) & 1) == 0)
1972 = build_int_2 (result
& (~(unsigned HOST_WIDE_INT
) 0
1973 >> (HOST_BITS_PER_WIDE_INT
- num_bits
)),
1977 = build_int_2 (result
| ~(~(unsigned HOST_WIDE_INT
) 0
1978 >> (HOST_BITS_PER_WIDE_INT
- num_bits
)),
1980 TREE_TYPE (yylval
.ttype
) = integer_type_node
;
1984 #ifdef MULTIBYTE_CHARS
1985 /* Set the initial shift state and convert the next sequence. */
1987 /* In all locales L'\0' is zero and mbtowc will return zero,
1990 || (num_chars
== 1 && token_buffer
[1] != '\0'))
1993 (void) mbtowc (NULL_PTR
, NULL_PTR
, 0);
1994 if (mbtowc (& wc
, token_buffer
+ 1, num_chars
) == num_chars
)
1997 warning ("Ignoring invalid multibyte character");
2000 yylval
.ttype
= build_int_2 (result
, 0);
2001 TREE_TYPE (yylval
.ttype
) = wchar_type_node
;
2012 p
= token_buffer
+ 1;
2014 while (c
!= '"' && c
>= 0)
2019 c
= readescape (&ignore
);
2023 && TYPE_PRECISION (char_type_node
) < HOST_BITS_PER_INT
2024 && c
>= (1 << TYPE_PRECISION (char_type_node
)))
2025 pedwarn ("escape sequence out of range for character");
2030 pedwarn ("ANSI C forbids newline in string constant");
2034 if (p
== token_buffer
+ maxtoken
)
2035 p
= extend_token_buffer (p
);
2044 error ("Unterminated string constant");
2046 /* We have read the entire constant.
2047 Construct a STRING_CST for the result. */
2051 /* If this is a L"..." wide-string, convert the multibyte string
2052 to a wide character string. */
2053 char *widep
= (char *) alloca ((p
- token_buffer
) * WCHAR_BYTES
);
2056 #ifdef MULTIBYTE_CHARS
2057 len
= mbstowcs ((wchar_t *) widep
, token_buffer
+ 1, p
- token_buffer
);
2058 if (len
< 0 || len
>= (p
- token_buffer
))
2060 warning ("Ignoring invalid multibyte string");
2063 bzero (widep
+ (len
* WCHAR_BYTES
), WCHAR_BYTES
);
2068 wp
= widep
+ (BYTES_BIG_ENDIAN
? WCHAR_BYTES
- 1 : 0);
2069 bzero (widep
, (p
- token_buffer
) * WCHAR_BYTES
);
2070 for (cp
= token_buffer
+ 1; cp
< p
; cp
++)
2071 *wp
= *cp
, wp
+= WCHAR_BYTES
;
2072 len
= p
- token_buffer
- 1;
2075 yylval
.ttype
= build_string ((len
+ 1) * WCHAR_BYTES
, widep
);
2076 TREE_TYPE (yylval
.ttype
) = wchar_array_type_node
;
2081 extern tree
build_objc_string();
2082 /* Return an Objective-C @"..." constant string object. */
2083 yylval
.ttype
= build_objc_string (p
- token_buffer
,
2085 TREE_TYPE (yylval
.ttype
) = char_array_type_node
;
2086 value
= OBJC_STRING
;
2090 yylval
.ttype
= build_string (p
- token_buffer
, token_buffer
+ 1);
2091 TREE_TYPE (yylval
.ttype
) = char_array_type_node
;
2122 yylval
.code
= PLUS_EXPR
; break;
2124 yylval
.code
= MINUS_EXPR
; break;
2126 yylval
.code
= BIT_AND_EXPR
; break;
2128 yylval
.code
= BIT_IOR_EXPR
; break;
2130 yylval
.code
= MULT_EXPR
; break;
2132 yylval
.code
= TRUNC_DIV_EXPR
; break;
2134 yylval
.code
= TRUNC_MOD_EXPR
; break;
2136 yylval
.code
= BIT_XOR_EXPR
; break;
2138 yylval
.code
= LSHIFT_EXPR
; break;
2140 yylval
.code
= RSHIFT_EXPR
; break;
2142 yylval
.code
= LT_EXPR
; break;
2144 yylval
.code
= GT_EXPR
; break;
2147 token_buffer
[1] = c1
= GETC();
2148 token_buffer
[2] = 0;
2155 value
= ARITHCOMPARE
; yylval
.code
= LE_EXPR
; goto done
;
2157 value
= ARITHCOMPARE
; yylval
.code
= GE_EXPR
; goto done
;
2159 value
= EQCOMPARE
; yylval
.code
= NE_EXPR
; goto done
;
2161 value
= EQCOMPARE
; yylval
.code
= EQ_EXPR
; goto done
;
2163 value
= ASSIGN
; goto done
;
2169 value
= PLUSPLUS
; goto done
;
2171 value
= MINUSMINUS
; goto done
;
2173 value
= ANDAND
; goto done
;
2175 value
= OROR
; goto done
;
2188 { value
= POINTSAT
; goto done
; }
2192 { value
= ']'; goto done
; }
2196 { value
= '{'; indent_level
++; goto done
; }
2198 { value
= '['; goto done
; }
2202 { value
= '}'; indent_level
--; goto done
; }
2206 token_buffer
[1] = 0;
2208 if ((c
== '<') || (c
== '>'))
2209 value
= ARITHCOMPARE
;
2215 /* Don't make yyparse think this is eof. */
2234 /* yylloc.last_line = lineno; */
2239 /* Sets the value of the 'yydebug' variable to VALUE.
2240 This is a function so we don't have to have YYDEBUG defined
2241 in order to build the compiler. */
2250 warning ("YYDEBUG not defined.");