On Wed, 12 May 2004, Larry Wall wrote:
In fact, I'd go so far as to say that it's almost impossible to do
recursive descent when you allow for defining new operator precedence
levels on the fly as Perl 6 does.
: Operator precedence can be done in
: a recdescent grammar straightforwardly
On Thu, 13 May 2004, Dan Sugalski wrote:
The big problem is that I don't know *how* to implement a mixed-type
parser generator. I'm not big on parsers in general, so I'm mostly
stuck with the literature if I need to write one from scratch.
I have been thinking the following about what larry
On Mon, 10 May 2004, Steve Fink wrote:
use File::Basename qw(dirname);
use lib dirname($INC{P6C/Parser.pm})./../../../../lib;
I had already tried that, and it doesn't seem to work. I guess it is some
timing issue: $INC{P6C/Parser.pm} gets defined after P6C::Parser.pm is
loaded (I think).
On Sat, 8 May 2004, Abhijit A. Mahabal wrote:
I was writing a few tests for the P6 parser and ran into a weird problem.
If I have the following in a file in languages/perl6, it works as
expected:
[...]
Now, if I put exactly the same contents in a file in
languages/perl6/t/parser, then I
as the -sigil() case worked okay. I
have not yet been able to hunt the problem down, and was hoping that
somebody knows whats happening off the top of their heads. I do not want
to put all the tests in the top directory :)
--Abhiit
Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/
? As A12 has just come out P6C may be
heavily under construction, and I don't want to be in the way...
--Abhijit
Abhijit A. Mahabal http://www.cs.indiana.edu/~amahabal/Index: languages/perl6/P6C/Builtins.pm
===
RCS file: /cvs/public
to be an answer as I seem to think of them as
defining syntax for new commands that you are writing. (In this case, I do
not know where I would put the is parsed trait). I may be wrong and
macros in some form are the answer. Either way, I'd appreciate any
thoughts/answers/pointers on this.
--Abhijit
Abhijit
On Tue, 4 May 2004, Luke Palmer wrote:
Abhijit A. Mahabal writes:
Needing to know the entire P6 grammar isn't mouth watering.
grammar Grammar::ReqNamed {
is Grammar::Perl;
Ah, I see. That does answer my question. I had forgotten that grammers can
be inherited from and you can
On Fri, 30 Apr 2004, Aldo Calpini wrote:
let's suppose I want to build a class that keeps track of the objects it
creates.
let's suppose that I want this class to be the base for a variety of
classes.
let's suppose that I decide, rather than fiddling with the default
constructor, to wrap
On Fri, 30 Apr 2004, Aldo Calpini wrote:
so I wanted to explore the possible interoperability of wrappers and
classes. another example I can think of:
role Logging {
POST {
foreach ( ::_.meta.getmethods() ) - $method {
$method.wrap( {
role Logging {
POST {
foreach ( ::_.meta.getmethods() ) - $method {
$method.wrap( {
log($somewhere, calling $method);
call;
log($somewhere, called $method);
} );
On Sat, 24 Apr 2004, John Siracusa wrote:
Based on the default accessors and encapsulation thread, it seems like a
Perl 6 equivalent of Class::MethodMaker will be still be useful in our (or
at least my) Brave New World. I've been pondering the best way to create
such a beast in Perl 6.
On Sun, 25 Apr 2004, Dave Whipp wrote:
Abhijit A. Mahabal [EMAIL PROTECTED] wrote:
Symbol tables and typeglobs and such belong to A10... and the * has been
stolen... so I'll just speculate in pseudocode.
Blocks-are-subroutines makes life easier, and in pseudocode that can be
just
is extended{ # is this: die if any collision in any class
method difference ($other where Set) {...}
}
$collector.stamps.difference(...); # okay
$collector.coins.difference(...); # Is that legal?
# In other words, is the singleton class like a closure or like a
first-class class?
Abhijit
On Wed, 21 Apr 2004, Brent 'Dax' Royal-Gordon wrote:
Which actually brings up an interesting question:
class Silly {
has $.thing=1;
has @.thing=(2, 3);
has %.thing=(4 = 5, 6 = 7);
}
I had assumed that'd be illegal: each of $.thing, @.thing and %.thing
On Mon, 19 Apr 2004, Larry Wall wrote:
On Sat, Apr 17, 2004 at 01:07:44PM -0500, Abhijit A. Mahabal wrote:
: $obj.method ($x + $y) + $z
:
: From the earlier examples (like $obj.method +1), I got the impression that
: you look ahead until you find a term or an operator. In the example above
: ...
#obviously $obj can be a ref to an array, not itself an array
}
--Abhijit
Abhijit A. Mahabal http://www.cs.indiana.edu/~amahabal/
No, obviously arguments. Okay, I see the problem. What you're missing
is that in an earlier Apocalypse, we said that postfix subscripts
and argument lists may not have an intervening space.
Oh, I see. Yes, I had missed that. Thanks for clearing that up.
--Abhijit
Abhijit A. Mahabal skribis 2004-04-19 11:00 (-0500):
when Dog: ...
when Array: ...
Shouldn't that be:
when Dog { ... }
when Array { ... }
Or is there some .when that I have not yet heard of?
Guilty as charged. My Perl6 is getting rusty...
--Abhijit
, all by itself, and in that case would not
this mean ($obj.method($x + $y)) + $z, the same as the other call it is
contrasted with:
$obj.method($x + $y) + $z
What am I missing?
--Abhijit
Abhijit A. Mahabal http://www.cs.indiana.edu/~amahabal/
On Fri, 16 Apr 2004, Aaron Sherman wrote:
@matrix... = 1 0 0 1;
In the case of:
@matrix = 1 2 3 4 5;
You need only add the type:
int @matrix = 1 2 3 4 5;
There is no string phase, or at least should never be.
The compiler can
pre-compute the list:
int
.
We probably do need the array version of the same problem frequently,
though:
@matrix... = 1 0 0 1;
At least we'd need it more frequently if we had it. A2 says that something
like this will be supported, come A9.
--Abhijit
Abhijit A. Mahabal http://www.cs.indiana.edu/~amahabal/
for user anonymous
cvs checkout: used empty password; try cvs login with a real password
cvs checkout complete
About to run build command: perl Configure.pl --defaults
Parrot Version 0.0.9 Configure 2.0
Copyright (C) 2001-2002 Yet Another Society
==
--Abhijit
Abhijit
A very basic newbeish question..
[EMAIL PROTECTED]:~/parrot$ tools/dev/parrotbench.pl -regex oo -conf
../parrotbench.conf
parrot perlpython ruby
oo1 100%39% 23% -
oo2 100%40% 22% -
Are bigger numbers more desirable (as they would be if they
On Fri, 19 Dec 2003, Larry Wall wrote:
On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote:
: Of course, when I do:
:
: my $x = 0 but (true|false);
:
: then what happens?
That's the problem with making them methods. Any such operational
definition is going to get you in
(for efficiency
reasons, perhaps, as many common uses will parse arguments in standard
ways [though act in mind warping ways] ) ?
abhi.
Abhijit A. Mahabalhttp://cs.indiana.edu/~amahabal/
This is a rather silly question:
The code:
macro foo() { return {my $x = 7} }
foo;
print $x;
is equivalent to which of the following?
{my $x = 7}
print $x;
or
my $x = 7;
print $x;
Thanx,
abhi.
, then, that calls to user defined subs will need to end
with a semi-colon.
Abhi
Abhijit A. Mahabal Home: 520 N. Grant St, Apt #2
Graduate Student, Bloomington IN 47408
Dept of Cog Sci and Computer Science, 812 331 2286
Indiana University
On Fri, 1 Aug 2003, Derek Ross wrote:
Do junctions have a direct representation as predicate logic statements?
In particular, do the following logic statements correspond directly
to the following perl6 junctions:
LOGIC PERL6 JUNCTION (DESCRIP)
=
29 matches
Mail list logo