Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

imcc variable names

13 views
Skip to first unread message

Will Coleda

unread,
May 19, 2003, 1:25:38 AM5/19/03
to perl6-i...@perl.org
languages/imcc/docs/syntax.pod says:

<identifier>
Start with a letter or underscore, then may contain
additionally digits.

but doesn't mention that you can't use a variable name that happens to
be the same as an op. (I tripped over buflen):

(error) line 600: parse error, unexpected PARROT_OP, expecting
IDENTIFIER

In case this is desired behavior (but I doubt it, since changes in
included ops would render the imcc invalid), here's a micro patch:

[coke@oolong:~/research/parrot]% cvs diff -u
languages/imcc/docs/syntax.pod
Index: languages/imcc/docs/syntax.pod
===================================================================
RCS file: /cvs/public/parrot/languages/imcc/docs/syntax.pod,v
retrieving revision 1.2
diff -u -r1.2 syntax.pod
--- languages/imcc/docs/syntax.pod 12 Dec 2002 09:05:25 -0000
1.2
+++ languages/imcc/docs/syntax.pod 19 May 2003 05:27:08 -0000
@@ -44,7 +44,7 @@
=item <identifier>

Start with a letter or underscore, then may contain additionally
-digits.
+digits. To simplify parsing, op names may not be used as identifiers.

=item <type>

Leopold Toetsch

unread,
May 19, 2003, 7:08:40 AM5/19/03
to Will Coleda, perl6-i...@perl.org
In perl.perl6.internals, you wrote:

> (error) line 600: parse error, unexpected PARROT_OP, expecting
> IDENTIFIER

Thanks for reporting. I did fix the problem, not the docs. Forbiding
parrot opnames as identifiers could always damage existing programs by
just adding one new opcode.

leo

0 new messages