I have a PCC sub:
.pcc_sub _char_is_white_space prototyped
.param int c # Character to test (as an integer representing its ASCII
code)
if c == ASCII_NULL goto TRUE
if c == ASCII_HORIZONTAL_TABULATION goto TRUE
if c == ASCII_LINE_FEED goto TRUE
if c == ASCII_FORM_FEED goto TRUE
if c == ASCII_CARRIAGE_RETURN goto TRUE
L5:
unless c == ASCII_SPACE goto L6
goto TRUE
L6:
FALSE:
.pcc_begin_return
.return 0
.pcc_end_return
TRUE:
.pcc_begin_return
.return 1
.pcc_end_return
.end
And, I don't want my calls to it to have to include the
entire PCC calling convention. So, I've defined a macro
(BTW, why can't I define a macro at the file level? I
had to put it inside .sub __main):
.macro char_is_white_space(CHAR)
.pcc_begin prototyped
.arg .CHAR
.pcc_call char_is_white_space ### "unexpected identifier"?
.local $ret:
.result test
.pcc_end
.endm
So now, I can call it like this later
...
.local int test
.local int c
...
.char_is_white_space(c)
if test goto ...
Except, the line marked in the macro def above shows that
parrot doesn't like this arrangement. It seems confused about
the .pcc_call line (which I've patterned after syn/pcc.t#1).
I don't know what to make of this. Can anyone see where I'm
going wrong?
Regards,
-- Gregor
--
Gregor Purdy [EMAIL PROTECTED]
Focus Research, Inc. http://www.focusresearch.com/