%{
+
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @(#)mkmake.y 4.1 (Berkeley) %G%
+ */
+
typedef struct string {
int
hashval,
for_statement: maybe_at_minus FOR white_space token
in tokens semi_colon
{
- $$ = for_statement($1, $4, expand_variables($6, 0));
+ $$ = for_statement($1, $4, ws_merge(expand_variables($6, 0)));
}
;
char *string = token->string->string;
same_t *tmp = same_unlink(token);
- if ((string[0] == '$') && (string[1] == '{')) {/* '}' Expand time */
+ if ((string[0] == '$') && (string[1] == '{')) { /* Expand time */
int len = strlen(string);
string[len-1] = 0;
head = same_cat(head, expand_variables(
value_of(same_item(string_lookup(string+2))), 1));
string[len-1] = '}';
- } else if (!isspace(string[0])) {
+ } else {
head = same_cat(head, token);
}
token = tmp;
Return(c,c);
case '\'':
case '"':
- {
+ if (bufptr != buffer) {
+ if (bufptr[-1] == '\\') {
+ bufptr[-1] = c;
+ }
+ break;
+ } else {
int newc;
ret_token(c);
Return(EOF, 0);
}
+#ifndef lint
+static char sccsid[] = "@(#)mkmake.y 4.1 (Berkeley) %G%";
+#endif /* not lint */
+
main()
{
#define YYDEBUG