Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Pratter
SourceThis modules defines a functor whose image is a parser for terms with applications, binary and unary operators. These terms are specified in the argument of the functor.
The algorithm implemented is an extension of the Pratt parser. The Sunting Yard algorithm could also be used.
Associativity of an operator.
type operator =
| Unary
Unary prefix operators.
*)| Binary of associativity
Binary infix operators with its associativity.
*)Reprensentation of operators.
Priority of operators. If *
has a higher priority than +
, than x + y * z
is parsed x + (y * z)
.