Module Parse
Parse
include Parse__.Syntax
type arg=|Atom of string * arg listatom. e.g. a(X, Y)
|ProcCtx of stringunary process context. e.g. $p
|Link of stringlink. e.g. X
|IntData of intint. e.g. 1
argument of an atom
type proc=|Zeronull.
|Graph of argatom. e.g. a(Y, b(X))
|Mol of proc * procmolecule. e.g. (P, Q)
|Rule of string option * proc * proc * procrule. e.g. P :- G1, ..., Gn | Q.
process
type atom_name_precedence= intprecedence of operators
- >= 1 for an operator atom name
- 0 for a normal symbol atom name
- -1 for a quoted atom name
type atom_name_type=|ANOp of atom_name_associativity * intoperator
|ANSymbolsymbol atom
|ANQuotedfailed to parse
Types of atom names
include Parse__.Pretty
val analyze_atom_name : string -> Parse__.Syntax.atom_name_typeanalyze atom name and obtain associativity and precedence
val string_of_arg : int -> Parse__.Syntax.arg -> stringアトムの引数部分の pretty printer
val string_of_list : Parse__.Syntax.arg -> Parse__.Syntax.arg -> stringリストの略記法の pretty printer
val string_of_atom : Parse__.Syntax.arg -> stringアトムの pretty printer
val string_of_guard : Parse__.Syntax.arg list -> stringガードの pretty printer. ただし,これはアトムのリストになっているガードのための pretty printer で, 構文解析直後に得られるガード(プロセスとして構文解析される)のためのものではない.
val string_of_proc : int -> Parse__.Syntax.proc -> stringプロセスの pretty printer
val string_of_proc : Parse__.Syntax.proc -> string
val parse : string -> Parse__.Syntax.proc- returns
AST of defshape
val pretty : Parse__.Syntax.proc -> stringpretty printer for a process