(***********************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* [$p:"nat_printer"] | O [ O ] -> ["(0)"]. (* Outside the module to be able to parse the grammar for 0,1,2... !! *) Delimits Scope nat_scope with N. (* For parsing/printing based on scopes *) Module nat_scope. Infix LEFTA 4 "+" plus : nat_scope. Infix LEFTA 3 "*" mult : nat_scope. Infix 5 "<=" le : nat_scope. Infix 5 "<" lt : nat_scope. Infix 5 ">=" ge : nat_scope. (* Infix 5 ">" gt : nat_scope. (* Conflicts with "<..>Cases ... " *) *) (* Warning: this hides sum and prod and breaks sumor symbolic notation *) Open Scope nat_scope. Syntax constr level 0: S' [ (S $p) ] -> [$p:"nat_printer_S":9] | O' [ O ] -> [ _:"nat_printer_O" ] . End nat_scope.