summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-14 09:31:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-14 09:31:34 +0000
commit9b599b2a63d2324ddacddd9710c41b795a95070d (patch)
tree4180f11ca1ddccb984799ab74df847e9f64f1213 /toke.c
parent491527d0220de34ec13035d557e288c9952d1007 (diff)
downloadperl-9b599b2a63d2324ddacddd9710c41b795a95070d.tar.gz
[win32] merge change#887 from maintbranch
p4raw-link: @887 on //depot/maint-5.004/perl: 6cdf74fe31f049dc2164dbb9e6242179d4b8ee1f p4raw-id: //depot/win32/perl@937
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/toke.c b/toke.c
index 5605938274..2282ef7e54 100644
--- a/toke.c
+++ b/toke.c
@@ -768,6 +768,12 @@ sublex_done(void)
processing a pattern (lex_inpat is true), a transliteration
(lex_inwhat & OP_TRANS is true), or a double-quoted string.
+ Returns a pointer to the character scanned up to. Iff this is
+ advanced from the start pointer supplied (ie if anything was
+ successfully parsed), will leave an OP for the substring scanned
+ in yylval. Caller must intuit reason for not parsing further
+ by looking at the next characters herself.
+
In patterns:
backslashes:
double-quoted style: \r and \n
@@ -835,17 +841,11 @@ scan_const(char *start)
bool dorange = FALSE; /* are we in a translit range? */
I32 len; /* ? */
- /*
- leave is the set of acceptably-backslashed characters.
-
- I do *not* understand why there's the double hook here.
- */
+ /* leaveit is the set of acceptably-backslashed characters */
char *leaveit =
lex_inpat
? "\\.^$@AGZdDwWsSbB+*?|()-nrtfeaxc0123456789[{]} \t\n\r\f\v#"
- : (lex_inwhat & OP_TRANS)
- ? ""
- : "";
+ : "";
while (s < send || dorange) {
/* get transliterations out of the way (they're most literal) */
@@ -1032,7 +1032,7 @@ scan_const(char *start)
Renew(SvPVX(sv), SvLEN(sv), char);
}
- /* ??? */
+ /* return the substring (via yylval) only if we parsed anything */
if (s > bufptr)
yylval.opval = (OP*)newSVOP(OP_CONST, 0, sv);
else