> I do not completely understand the first part of chapter 3 of the 
> Haskell-report.
> Concretely I am stumbling about the notation of nonterminals 
> indexed by 
> their precedence
> level. This should be a number ranging from 0 to 9. But what 
> about this exp^{10} production rule?

The grammar is written using a kind of macro syntax, such that you can
obtain the full grammar by expanding each of the rules for nonterminals
with a superscript 'i' for each 'i' in the range 0 to 9.  These rules
then cover the grammar for expressions containing infix operators with
precedences between 0 and 9.

The '10' in the 'exp10' nonterminal doesn't refer to the precedence of
an operator, it is there purely as a clue to to the reader that these
expressions bind tighter than all the infix operators.  Hope this helps.

Cheers,
        Simon

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to