summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-21 06:34:30 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-21 06:34:30 +0000
commit8373f59a324eb054b6ca8de8fe1d2a1634391ae4 (patch)
tree9a1d16b6f1454c25fe838714b29206216f192d7b
parentbbc6ab73bea2cf21ce36726b653ee09d6fe46fdf (diff)
syntax changed: open paren after identifier
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@36 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--parse.y19
2 files changed, 20 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 29e5267259..24d3e28aaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
+Wed Jan 21 01:43:42 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * parse.y (yylex): open parentheses after identifiers are argument
+ list, even if whitespaces have seen.
+
Tue Jan 20 15:19:59 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (terms): quoted word list by %w(a b c).
+
* ext/tcltklib/extconf.rb: more accurate check for tcl/tk libs.
* file.c (rb_stat): most of the FileTest methods (and function
diff --git a/parse.y b/parse.y
index a65638e485..ffdb936674 100644
--- a/parse.y
+++ b/parse.y
@@ -1984,6 +1984,15 @@ parse_qstring(term)
return STRING;
}
+static int
+parse_quotedword(term)
+ int term;
+{
+ if (parse_qstring(term) == 0) return 0;
+ yylval.node = NEW_CALL(NEW_STR(yylval.val), rb_intern("split"), 0);
+ return DSTRING;
+}
+
char *strdup();
static int
@@ -2596,11 +2605,6 @@ retry:
c = LPAREN;
lex_state = EXPR_BEG;
}
- else if (lex_state == EXPR_ARG && space_seen) {
- arg_ambiguous();
- c = LPAREN;
- lex_state = EXPR_BEG;
- }
else {
lex_state = EXPR_BEG;
}
@@ -2682,6 +2686,9 @@ retry:
case 'q':
return parse_qstring(term);
+ case 'w':
+ return parse_quotedword(term);
+
case 'x':
return parse_string('`', term);
@@ -2689,7 +2696,7 @@ retry:
return parse_regx(term);
default:
- yyerror("unknown type of string `%c'", c);
+ yyerror("unknown type of %string");
return 0;
}
}