develooper Front page | perl.perl6.internals | Postings from June 2002

Re: Perl 6 grammar progress?

Thread Previous | Thread Next
Ashley Winters
June 30, 2002 19:38
Re: Perl 6 grammar progress?
Message ID:
On Sunday 30 June 2002 12:46 pm, Dan Sugalski wrote:
> So, it's been a week or so and, while I'm mostly offline until
> wednesday, I'll ask the question...
> How's the work on the perl 6 grammar going? We any further along than
> we were before YAPC?

I don't know how the grammars are going, and I'm not fit to write one myself, 
but I wrote a list of variables I'll try to parse using any grammars which go 
by. Are all of these legal? I suppose that's more of a -language question.

Ashley Winters

# Variable access you will want to parse

# standard variables

# need more tests for ${}, I'm not evil enough for it

# Apocalypse 3 specifies context characters
*@{foo};    # sanity check

# Also, there are globals to consider

# not to mention members

# lets test packages at least once

# Now, the hard part. Element access

# off the subject, but lets make sure $foo.. is parsed correctly
$foo..<$*STDIN>;    # perfectly legal
$;         # $foo .. .bar, since there's no binary ...

@foo{1};      # I ass_u_me {} [] and () can be overloaded?

# I will just assume if the parser made it this far, <[%$&]> also work

foo{1};		# foo is unary here
foo.();		# Is this &{ foo() }() or foo()? I would vote former

# As a final sanity check, lets chain these things


# And, just to make sure your parser doesn't pass this suite...

$foo{"Do you want to try $interpolated{"string"}?"};

# Okay, I've had my fun

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About