nextuppreviouscontents
Next:Expressions Up:Expressions, parsing and pretty Previous:Sorts   Contents

Syntax

The parsing and pretty printing of expressions are incremental. Thus we will now show the syntax the user can use to specify the syntax of new symbols.

ass-ident:=alpha-ident [::sort]
syntax-arg:=string$\vert$ass-ident$\vert$ (\alpha-ident\)
syntax:=alpha-ident {ass-ident}
 $\vert$Prefix [ [float] ] string {syntax-arg}
 $\vert$Infix [ [float] ] ass-identstring {syntax-arg}
 $\vert$rInfix [ [float] ] ass-identstring {syntax-arg}
 $\vert$lInfix [ [float] ] ass-identstring {syntax-arg}
 $\vert$Postfix$\vert$ [ [float] ] ass-ident

Moreover, in the rule for syntax a ass-ident can not be immediately followed by another ass-ident or a (\alpha-ident\) because this would lead to ambiguities. Moreover, in the same rule, the string must contain a valid identifier (alpha-ident or special-ident). These constraints are not for LaTeX syntax.



Christophe Raffalli 2005-03-02