[perl #40156] [TODO] - Can't use an Iterator with a DynLexPad PMC

2008-09-07 Thread Christoph Otto via RT
On Tue Feb 05 06:50:24 2008, coke wrote: > On Wed Aug 16 23:09:16 2006, mdiep wrote: > > I don't know how to write a test for this off the top of my head, but > > Iterator and DynLexPad don't play well together atm. When I tried, I > > got this error: > >

[perl #40156] [TODO] - Can't use an Iterator with a DynLexPad PMC

2008-02-05 Thread Will Coleda via RT
On Wed Aug 16 23:09:16 2006, mdiep wrote: > I don't know how to write a test for this off the top of my head, but > Iterator and DynLexPad don't play well together atm. When I tried, I > got this error: > > elements() not implemented in class 'DynLexPad'

[perl #40171] [TODO] - Can't use an Iterator with a DynLexPad PMC

2006-08-16 Thread via RT
ator and DynLexPad don't play well together atm. When I tried, I got this error: elements() not implemented in class 'DynLexPad' Is there an easy way to make an arbitrary hash-like PMC (DynLexPad, NameSpace, etc.) play well with iterator? Tcl needs to be able to iterate ov

[perl #40158] [TODO] - Can't use an Iterator with a DynLexPad PMC

2006-08-16 Thread via RT
ator and DynLexPad don't play well together atm. When I tried, I got this error: elements() not implemented in class 'DynLexPad' Is there an easy way to make an arbitrary hash-like PMC (DynLexPad, NameSpace, etc.) play well with iterator? Tcl needs to be able to iterate ov

[perl #40156] [TODO] - Can't use an Iterator with a DynLexPad PMC

2006-08-16 Thread via RT
ator and DynLexPad don't play well together atm. When I tried, I got this error: elements() not implemented in class 'DynLexPad' Is there an easy way to make an arbitrary hash-like PMC (DynLexPad, NameSpace, etc.) play well with iterator? Tcl needs to be able to iterate ov

Re: DynLexPad

2005-11-23 Thread Chip Salzenberg
On Wed, Nov 23, 2005 at 09:09:00AM -0500, Will Coleda wrote: > >Why bother with an artifical subclass? > > Mainly to avoid having the C code in my .pmc I'm very much in favor of adding explicit metadata, which is parseable, rather than just limiting ourselves to writing the executable consequence

Re: DynLexPad

2005-11-23 Thread Leopold Toetsch
Roger Browne wrote: A bigger problem will occur for any HLL that has no PMCs of its own, yet wishes to use DynLexPad. How to specify that? As coke writes this is in the intial posting of this thread, but he has cited only half ot the show. Here is all again: SYNOPSIS .sub _load

Re: DynLexPad

2005-11-23 Thread Will Coleda
I thought that was one of the issues leo was addressing with the .HLL_map directive... From leo's initial email: .HLL "foo", "" # or "foo_group" - load dynamic PMCs too .HLL_map .LexPad -> .DynLexPad # (2) Regards. On Nov 23, 2005, at

Re: DynLexPad

2005-11-23 Thread Roger Browne
On Wed, 2005-11-23 at 09:09 -0500, Will Coleda wrote: > I can, of course, add the C now, and have it be functional. I was > just pondering what might be a simpler way for future PMC authors. A bigger problem will occur for any HLL that has no PMCs of its own, yet wishes to use DynLexPad.

Re: DynLexPad

2005-11-23 Thread Will Coleda
On Nov 23, 2005, at 4:39 AM, Roger Browne wrote: On Tue, 2005-11-22 at 22:42 -0500, Will Coleda wrote: .HLL "foo", "" # or "foo_group" - load dynamic PMCs too .HLL_map .LexPad -> .DynLexPad # (2) I'd like to provide an easy wa

Re: DynLexPad

2005-11-23 Thread Roger Browne
On Tue, 2005-11-22 at 22:42 -0500, Will Coleda wrote: > > .HLL "foo", "" # or "foo_group" - load dynamic PMCs too > > .HLL_map .LexPad -> .DynLexPad # (2) > > > > I'd like to provide an easy way to provide this ma

Re: DynLexPad

2005-11-23 Thread Leopold Toetsch
On Nov 23, 2005, at 4:42, Will Coleda wrote: I'd like to provide an easy way to provide this mapping for language developers so the users of the language don't have to remember to add the second line whenever they use, e.g. Tcl. Whenever some code is using e.g. Tcl, a library is loaded that

Re: DynLexPad

2005-11-22 Thread Will Coleda
more on it, I'd like to know from HLL authors, what they need. Currently it looks like this SYNOPSIS .sub _load :immediate# (1) $P0 = loadlib 'dynlexpad' .end .HLL "foo", "" # or "foo_group" - load dynamic P

Re: DynLexPad

2005-11-22 Thread Leopold Toetsch
On Nov 22, 2005, at 19:52, Chip Salzenberg wrote: On Tue, Nov 22, 2005 at 05:50:39PM +, Roger Browne wrote: Why not use "," instead of "->"? Indeed. We shouldn't introduce "->" at this point, when we already use the perfectly serviceable comma for analogous cases. Done, r10140. leo

Re: DynLexPad

2005-11-22 Thread Roger Browne
I wrote: > > I'd prefer to ask for mappings explicitly, e.g. something like this: > > > >.HLL "Tcl", "tcl_group" > >... > >$P0 = new Integer # really Integer > >$P1 = new_mapped Integer # really TclInteger Chip wrote: > Hm. Why? Because you don't always want a mapped ty

mapped PMC type (was: DynLexPad)

2005-11-22 Thread Leopold Toetsch
On Nov 22, 2005, at 18:50, Roger Browne wrote: Leopold Toetsch wrote: .HLL_map .LexPad -> .DynLexPad # (2) Why not use "," instead of "->"? It would be one less special-case for the PIR programmer to remember. No problem. If folks prefer a comma I&#

Re: DynLexPad

2005-11-22 Thread Chip Salzenberg
On Tue, Nov 22, 2005 at 05:50:39PM +, Roger Browne wrote: > Leopold Toetsch wrote: > > .HLL_map .LexPad -> .DynLexPad # (2) > > Why not use "," instead of "->"? Indeed. We shouldn't introduce "->" at this point, when w

Re: DynLexPad

2005-11-22 Thread Roger Browne
Leopold Toetsch wrote: > Before working more on it, I'd like to know from HLL authors, what they > need. I don't think I need anything more than :outer and .lex for the Amber compiler. I certainly don't need to specify or manipulate pad_depth. > .HLL_map .LexPad ->

DynLexPad

2005-11-22 Thread Leopold Toetsch
what they need. Currently it looks like this SYNOPSIS .sub _load :immediate# (1) $P0 = loadlib 'dynlexpad' .end .HLL "foo", "" # or "foo_group" - load dynamic PMCs too .HLL_map .LexPad -> .DynLexPad # (2) .sub