On 1/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
+Matching against a CGrammar object will call the Ctop method
+defined in the grammar. The Ctop method may either be a rule
+itself, or may call the actual top rule automatically. How the
+CGrammar determines the top rule is up to the grammar, but normal
+Perl 6 grammars will default to setting top to the first rule in the
+original base grammar. Derived grammars then inherit this idea of
+the top rule. This may be overridden in either the base grammar or a
+derived grammer by explicitly naming a rule top, or defining your
+own top method to call some other rule.
Matching against a CSignature does not actually bind any variables,
but only tests to see if the signature Icould bind. To really bind
top--an all lowercase reserved word? it just doesn't stand out. all
grammars i've seen and written so far have used all lower-case rule
names.
if you're going to explicitly set a top rule, like a main sub, make it
all uppercase.
grammar DerivedGrammar is BaseGrammar;
rule TOP { ... }
that makes it more clear that something is special about that rule..
~jerry