/third_edition/html/grammars.html
and writes a parser in Perl 6 for that grammar.
Writing a Perl 6 grammar to parse BNF should not be too hard.
Writing a 5.10 regular expression to parse BNF shouldn't be too hard either.
Abigail
pgp0QsSS8lU00.pgp
Description: PGP signature
On Fri, Apr 12, 2002 at 02:14:36PM -0700, Erik Steven Harrison wrote:
--
On Fri, 12 Apr 2002 18:27:11
abigail wrote:
On Fri, Apr 12, 2002 at 04:42:07PM +0100, Piers Cawley wrote:
[EMAIL PROTECTED] writes:
Why isn't
if %foo {key} {print Hello 1}
equivalent
then that will be treated as the 'then' block. If it's the
end of file, or a nonblock, then it'll be a syntax error.
Did the code show anything following it? No? Well, then assume
it isn't there. ;-)
Next time I'll show this to someone, I'll add a semicolon.
Abigail
, or nothing between two tokens. Wonderful! People who tend
to use -e all the time (like me) will love it. (Not!) Pasting code into
IRC will be so much more fun.
I'll treasure my perl5 sources.
Abigail
tape" not very-Perl like.
Perl is there for the programmer; not the other way around.
Abigail
l evaluate as true in a condition.
You mean the beaten-to-death ??, formely known as |||, operator?
It has torn p5p to shreds repeatedly.
Abigail
r a lexical variable?
my just isn't a function. Just like return or while aren't, even when
followed by parenthesis. They are language constructs.
Abigail
problems it creates. However, there may well be true technical
reasons why "my $x, $y, $z" does not do what many think it should.
As I wrote elsewhere, other reasons not to change the behaviour of my:
GetOptions (foo = \my $foo,
bar = \my $bar);
tie my $shoe = $tring;
Abigail
haracters and unlike what's labelled a function,
is often not prefix. But that's only syntactic sugar (and vinegar due
to precedence tables).
Abigail
wn my suggestion is an example where existing behaviour
can't be determined from void/scalar/list context.
Will the above do?
Abigail
ve my()s are in void context.
Also, if I have:
@a = (1 .. 10);
$a, $b, $c = @_;
$c becomes 10. Should $c become 3 when my is placed before $a?
Abigail
.
Abigail
left.
Nor is this wanted behaviour. All the programmer needs to do for
sooner resource disposal it to let his references go out of scope
when no longer needed.
Abigail
nd garbage collection is a feature. ;-)
Abigail
The world is not Linux.
*end of minirant*
Either I am being even more grumpier than usual or you people
are making even less sense than usual :-)
*microrant*
The world is not schwern
*end of microrant*
Abigail
a garbage collector.... ;-)
Abigail
reading this twice, I still get the impression you think
both gcc and xfree86 would fit in the perl core snuggly.
Oh well, as long as you don't fit emacs in it; there's got to be some
limit.
Abigail
that bad memory, or a bad variable naming scheme
justifies this new feature.
If you forget how you name your variables you have much bigger problems
than to have to type 'return'.
Abigail
^^^
note exactly 7 spaces...
And I think Fortran has a better claim to priority ;)
And then there's Parse::RecDescent
Abigail
some sorts, how is the case of the sub
being called in list context going to be handled?
Abigail
.
How does removing time() add something desirable?
Abigail
any sense to pull out, and that only from an architectural
standpoint.
Perhaps some of the more grossly UNIX specific things like getpwnam's
extended family and the SysV IPC stuff?
But why? What is it going to buy you?
Abigail
it out of the core on a language list.
That's just source code housekeeping.
Abigail
r use it!"
"It should be in the core, I often use it!"
Abigail
e the only thing that prevents us to
change time() or move it out of CORE, then I believe we should do it yes!
*blink*
Are you claiming the use of time() is dead? Or that stability is a bad
thing?
Abigail
xpects timestamps in seconds since 1970.
Deprecating time() in favour of some other arbitrary measurement is
absurd. It might makes sense to have some other functions giving units
since some point in the past next to time() though.
Abigail
don't see this problem, unless you plan to write a filesystem in Perl.
Surely Perl asks the OS for l?stat() instead of keeping track of it itself?
Abigail
of parameter Blah. Just knowing the name of the platform
doesn't buy you a whole lot.
You want both of course, if only to present the user an error message
(s)he can understand.
Abigail
ux/; map {s/.$//} %h; $, = " "; print %h'
foo ba baz qu
$
Abigail
returns
aliases the values (new in 5.7).
I don't know why, perhaps so you could modify them easily:
for (values %hash) {s/foo/bar/}
just like you can do for arrays.
Abigail
, ""} @_ ? @_ : $_;
$__;
}
Aliasing is a cute thing.
Abigail
31 matches
Mail list logo