Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Pynie] Grammar mostly done, but help needed

3 views
Skip to first unread message

Klaas-Jan Stol

unread,
Feb 28, 2007, 5:09:52 AM2/28/07
to Perl 6 Internals
hi,

attached my current version of languages/pynie's grammar.

I can't get the binary operators "is not" and "not in" working
correctly. The problem seems to be that "is parsed()" does not work.
When I specify a rule in the is parsed() annotation, and in the rule I
emit some message (just calling a sub that prints something), the rule
is never called.

what works:
x = 1 is 2
x = 1 in 2 # does not make sense, but just for parsing


what does not work (correctly)
x = 1 is not 2 ***** This DOES parse, but not correctly, on inspecting
the parse tree, you can see that the "prefix:not" operator is used,
instead of the "isnot" rule.

x = 1 not in 2 This does not parse at all. This probably also has to do
with "prefix:not"; after that 'not' it expects a primary, not "in".

I'm not sure about how is parsed() should be working. It is ok for
"term:", but I can't understand why the other is parsed() annotation
does not work.
Also, if I specify an "is parsed()" for the "in" or "is" operator, those
operators don't work anymore. This is another hint that "is parsed" does
not work.

Any new insights would be appreciated.
regards,
kjs

Grammar.pg
0 new messages