Re: [BUG] can not use op names as sub/method name

2004-03-14 Thread Leopold Toetsch
Jens Rieks [EMAIL PROTECTED] wrote:
 Hi,

 On Saturday 13 March 2004 07:28, Leopold Toetsch wrote:
 Jens Rieks [EMAIL PROTECTED] wrote:
  .sub open method

 Or, maybe .sub foo method as an alternative syntax?
 This would allow other characters than now in sub names, too.

I've now allowed PARROT_OPs after a .sub, so

 .sub open method

or such is valid. I don't know, if we need a string there too as
alternative syntax.

 jens

leo


Re: [BUG] can not use op names as sub/method name

2004-03-13 Thread Jens Rieks
Hi,

On Saturday 13 March 2004 07:28, Leopold Toetsch wrote:
 Jens Rieks [EMAIL PROTECTED] wrote:
  Hi,
 
  .namespace [Source]
  .sub open method
  .pcc_begin_return
  .pcc_end_return
  .end
 
  fails with
  error:imcc:parse error, unexpected PARROT_OP, expecting IDENTIFIER

 Parrot opcode names are basically reserved words. There are some
 exceptions, where the lexer gets hints that now an identifier is
 expected, but this hints aren't by far everywhere.
 I know that this is suboptimal but fixing it for every piece in the
 parser is difficult.
 I'll have a look at above case, though.
Or, maybe .sub foo method as an alternative syntax?
This would allow other characters than now in sub names, too.

  jens

 leo
jens


[BUG] can not use op names as sub/method name

2004-03-12 Thread Jens Rieks
Hi,

.namespace [Source]
.sub open method
.pcc_begin_return
.pcc_end_return
.end

fails with
error:imcc:parse error, unexpected PARROT_OP, expecting IDENTIFIER

jens


Re: [BUG] can not use op names as sub/method name

2004-03-12 Thread Leopold Toetsch
Jens Rieks [EMAIL PROTECTED] wrote:
 Hi,

 .namespace [Source]
 .sub open method
 .pcc_begin_return
 .pcc_end_return
 .end

 fails with
 error:imcc:parse error, unexpected PARROT_OP, expecting IDENTIFIER

Parrot opcode names are basically reserved words. There are some
exceptions, where the lexer gets hints that now an identifier is
expected, but this hints aren't by far everywhere.
I know that this is suboptimal but fixing it for every piece in the
parser is difficult.
I'll have a look at above case, though.

 jens

leo