I was attempting to implement the new qv// operator and I think I have the basic
structure, but I don't know how to signal to the lexer that I have already
tokenized the next word (i.e. no sublexing involved). Here's the code so far
(inserted into toke.c:4814 or so):
case KEY_qv:
s = scan_str(s,FALSE,FALSE);
if (!s)
missingterm((char*)0);
if (SvCUR(PL_lex_stuff)) {
SV *ver = newSV(0);
d = SvPV_force(PL_lex_stuff, len);
d = scan_version(d,ver);
PL_nextval[PL_nexttoke].opval = newSVOP(OP_CONST, 0, ver);
}
>>> TERM(THING);
What is that last line supposed to be (obviously /that/ doesn't work)? Most of
the other 'q' operators end like this:
TERM(sublex_start());
but I have already processed PL_lex_stuff at this point, so I just need to tell
yylex to move along.
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
Thread Next