hello,

I'm doing some research on PMCs, and thought it would be a good idea to try to create 
some new PMC type.
(just for trying and get a grip of it)
For that, I thought it would be easy to just copy the code from some existing PMC.
I did the following:

I copied all the text from PerlInt.pmc and pasted that into a new file, called 
"FoobyNumber.pmc" (yeah, I know...the name) Saved the file in the parrot/classes dir. 
(I changed all occurrences of "PerlInt" to "FoobyNumber")
Then I did: 

$ ./pmc2c.pl FoobyNumber.pmc

That went ok.

Then, I added to the file MANIFEST (just as described in the "Parrot Vtables" doc in 
the docs section on the site) the 
entry:

classes/foobynumber.pmc

at just after eval.pmc (so it's alphabetically on it's place)

Then, in the parrot dir, I ran Configure.pl. That went ok, too
Then, I ran make, didn't get any errors.
Then, I created some really simple program like this:

new P0, .FoobyNumber 
set P0, 123
print P0
print"\n"
end

Then, if I try to assemble it like this:
$ assemble.pl -o pmctest.pbc pmctest.pasm

I get these errors:

Couldn't parse argument '.FoobyNumber' at line 1.
Couldn't find operator 'new_p' on line 1.

I also tried this same program with creating a PerlInt, and that went all right (the 
program just ran fine)

Can anybody help me out with this?
I'd be grateful.

Regards,
Klaas-Jan Stol



Reply via email to