Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion P6C: Parser Weirdness
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Abhijit A. Mahabal  
View profile  
 More options May 8 2004, 11:55 pm
Newsgroups: perl.perl6.internals
From: amaha...@cs.indiana.edu (Abhijit A. Mahabal)
Date: Sat, 8 May 2004 22:55:30 -0500 (EST)
Local: Sat, May 8 2004 11:55 pm
Subject: P6C: Parser Weirdness
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:

The file contains:
===========
use P6C::Parser;
use Perl6grammar;

my $grammar = new Perl6grammar;
print $grammar->sigil('$'),"\n";
print $grammar->signature('(+$x)'), "\n";
===========

It prints out:
=============================
P6C::sigil=ARRAY(0x8a1000c)
P6C::signature=ARRAY(0x8a10738)
=============================

And that is what I expected.

Now, if I put exactly the same contents in a file in
languages/perl6/t/parser, then I get the following output:

==========================
P6C::sigil=ARRAY(0x89ffbc8)
 at /u/amahabal/site_perl/lib/perl5/site_perl/5.8.0/Parse/RecDescent.pm
line 2822

Parse::RecDescent::_parserepeat('Parse::RecDescent=HASH(0x8a8abfc)','+$x)', 'CODE(0x87b9598)',0,1,'','undef')
called at Perl6grammar.pm line 6938

Parse::RecDescent::namespace000001::sigparam('Parse::RecDescent=HASH(0x8a8a bfc)','+$x)','','','undef')
called at Perl6grammar.pm line 24049

Parse::RecDescent::namespace000001::signature('Parse::RecDescent=HASH(0x8a8 abfc)','(+$x)','undef','undef','CODE(0x89ff214)')
called at
/u/amahabal/site_perl/lib/perl5/site_perl/5.8.0/Parse/RecDescent.pm line
2797

Parse::RecDescent::AUTOLOAD('Parse::RecDescent=HASH(0x8a8abfc)','(+$x)')
called at t/parser/foo3.t line 6
==============================

(I added a confess to Parse::Recdescent where it was failing).

Clearly, something happened right 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/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.