Module Tac2syn.Syntax

type 'a t

Type of notation syntax parsing 'a. Unlike Procq.Symbol.t it fully supports comparison and is marshallable.

type 'a seq

Sequence of t.

type 'a entry

Marshal-stable proxy for Procq.Entry.t.

val register_entry : ?name:string -> 'a Procq.Entry.t -> 'a entry

Must be called at toplevel, with non backtrackable entry. name defaults to the entry name but can be given another value if there is a conflict. Registering the same entry twice produces different entry values.

Pre-registered entries.

val ltac2_expr : Tac2expr.raw_tacexpr entry

Constructors for t, copying Procq.Symbol constructors.

val nterm : 'a entry -> 'a t
val nterml : 'a entry -> string -> 'a t
val list0 : ?sep:string -> 'a t -> 'a list t
val list1 : ?sep:string -> 'a t -> 'a list t
val opt : 'a t -> 'a option t
val token : 'a Tok.p -> 'a t
val tokens : Procq.ty_pattern list -> unit t
val seq : 'a seq -> 'a t

Instead of rules we have the less general seq.

val nil : unit seq
val snoc : 'a seq -> 'b t -> ('a * 'b) seq