attrs = Nullop;
while (isIDFIRST_lazy(s)) {
d = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, FALSE, &len);
+ if (isLOWER(*s) && (tmp = keyword(PL_tokenbuf, len))) {
+ if (tmp < 0) tmp = -tmp;
+ switch (tmp) {
+ case KEY_or:
+ case KEY_and:
+ case KEY_for:
+ case KEY_unless:
+ case KEY_if:
+ case KEY_while:
+ case KEY_until:
+ goto got_attrs;
+ default:
+ break;
+ }
+ }
if (*d == '(') {
d = scan_str(d,TRUE,TRUE);
if (!d) {
newSVpvn(s, len)));
}
s = skipspace(d);
- while (*s == ',')
+ if (*s == ':' && s[1] != ':')
s = skipspace(s+1);
+ else if (s == d)
+ break; /* require real whitespace or :'s */
}
- tmp = (PL_expect == XOPERATOR ? '=' : '{'); /*'}' for vi */
- if (*s != ';' && *s != tmp) {
+ tmp = (PL_expect == XOPERATOR ? '=' : '{'); /*'}(' for vi */
+ if (*s != ';' && *s != tmp && (tmp != '=' || *s != ')')) {
char q = ((*s == '\'') ? '"' : '\'');
/* If here for an expression, and parsed no attrs, back off. */
if (tmp == '=' && !attrs) {
op_free(attrs);
OPERATOR(':');
}
+ got_attrs:
if (attrs) {
PL_nextval[PL_nexttoke].opval = attrs;
force_next(THING);
case KEY_AUTOLOAD:
case KEY_DESTROY:
case KEY_BEGIN:
- case KEY_END:
- case KEY_STOP:
+ case KEY_CHECK:
case KEY_INIT:
+ case KEY_END:
if (PL_expect == XSTATE) {
s = PL_bufptr;
goto really_sub;
Rop(OP_SGE);
case KEY_grep:
- LOP(OP_GREPSTART, *s == '(' ? XTERM : XREF);
+ LOP(OP_GREPSTART, XREF);
case KEY_goto:
s = force_word(s,WORD,TRUE,FALSE,FALSE);
TERM(sublex_start());
case KEY_map:
- LOP(OP_MAPSTART, *s == '(' ? XTERM : XREF);
+ LOP(OP_MAPSTART, XREF);
case KEY_mkdir:
LOP(OP_MKDIR,XTERM);
break;
case 'C':
if (strEQ(d,"CORE")) return -KEY_CORE;
+ if (strEQ(d,"CHECK")) return KEY_CHECK;
break;
case 'c':
switch (len) {
break;
}
break;
- case 'S':
- if (strEQ(d,"STOP")) return KEY_STOP;
- break;
case 's':
switch (d[1]) {
case 0: return KEY_s;