develooper Front page | perl.perl5.porters | Postings from August 2001

toke.c troubles

Thread Next
From:
John Peacock
Date:
August 14, 2001 09:19
Subject:
toke.c troubles
Message ID:
3B794DC2.10D3FBCB@rowman.com
I extracted the vstring creation code from toke.c:scan_num and placed it
into util.c (pretty much verbatim).  Both files compile without errors 
and miniperl gets built just fine.  It appears that the vstring appears
well-formed.  However, I am getting the following debug trace when run 
with the following script:

---------- minitest.t --------------
$^V eq v5.7.2
  or die "Perl lib version (v5.7.2) doesn't match executable version ("
.
    (sprintf "v%vd",$^V) . ")";
---------- minitest.t --------------

$
PATH=/home/JPeacock/perl.development:.:/usr/local/bin:/usr/bin:/bin:/usr/loca
l:/etc:/usr/lib:/lib:/sbin:/usr/sbin:/usr/libexec ./miniperl -DT
minitest.t &>
debug.log

------ debug.log -------
### Tokener expecting STATE at
### token:line 1:0:$^V
### Tokener saw identifier '$^V'
### Tokener expecting OPERATOR at eq v5.7.2

### eq:line 1:88:eq
### Tokener expecting TERM at  v5.7.2

SV = PV(0xa011558) at 0xa01f6e4
  REFCNT = 1
  FLAGS = (POK,READONLY,pPOK)
  PV = 0xa023568 "\5\7\2"\0
  CUR = 3
  LEN = 6
### term:line 1:167915144:
### Tokener expecting OPERATOR at v5.7.2

Bareword found where operator expected at minitest.t line 1, near "v5"
...

and on and on.  Why does the tokener expect to see an OPERATOR next or 
is it failing to see the vstring as a TERM?  The call to sv_dump is 
after make_vstring has returned, so I know that the code has worked 
properly.  Is there something else I must to do make changes to toke.c 
correctly?  Do I need to do something in perly.y?

HELP

John Peacock

ps. patch attached for your perusal.  I swear that nothing in 
make_vstring has anything to do with the tokenizer!


--
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About