Hi,
I there a way to prevent some type of mistake I now have made several
times merely because the error messages are not helping me to point to
the problem.
Example;
grammar Turtle::Grammar {
rule TOP { <statement>* }
...
rule directive { <prefix-id> | <base> }
...
rule base {
'@base'<white-space>* <uri-ref>
}
...
For this piece of grammar I get the message something like;
Too many positionals passed; expected 1 argument but got 2
in regex base at
/home/marcel/Languages/Perl6/Projects/Rdf/lib/Rdf/Turtle/Grammar.pm6:41
So what would that mean???? Only after some while I remembered that
there is a base() method which gets called here and I needed to change
the targets from base to e.g. base-id. After that all went fine.
I had this once before where I had declared a whitespace target <ws>
which is already defined. Also with strange results.
Somehow there must be a way to test when there is a redefinition of
sorts going on.
Greetings,
Marcel