package touist

  1. Overview
  2. Docs
type var = string * t list option
and t =
  1. | Touist_code of t list
  2. | Int of int
  3. | Float of float
  4. | Bool of bool
  5. | Var of var
  6. | Set of AstSet.t
  7. | Set_decl of t list
  8. | Neg of t
  9. | Add of t * t
  10. | Sub of t * t
  11. | Mul of t * t
  12. | Div of t * t
  13. | Mod of t * t
  14. | Sqrt of t
  15. | To_int of t
  16. | To_float of t
  17. | Abs of t
  18. | Top
  19. | Bottom
  20. | Not of t
  21. | And of t * t
  22. | Or of t * t
  23. | Xor of t * t
  24. | Implies of t * t
  25. | Equiv of t * t
  26. | Equal of t * t
  27. | Not_equal of t * t
  28. | Lesser_than of t * t
  29. | Lesser_or_equal of t * t
  30. | Greater_than of t * t
  31. | Greater_or_equal of t * t
  32. | Union of t * t
  33. | Inter of t * t
  34. | Diff of t * t
  35. | Range of t * t
  36. | Empty of t
  37. | Card of t
  38. | Subset of t * t
  39. | Powerset of t
  40. | In of t * t
  41. | If of t * t * t
  42. | Exact of t * t
  43. | Atleast of t * t
  44. | Atmost of t * t
  45. | Bigand of t list * t list * t option * t
  46. | Bigor of t list * t list * t option * t
  47. | Let of t * t * t
  48. | Affect of t * t
  49. | UnexpProp of string * t list option
    (*

    UnexpProp is a proposition that contains unexpanded variables; we cannot tranform UnexpProp into Prop before knowing what is the content of the variables. Examples:

                abcd(1,$d,$i,a)       <- not a full-string yet                  
    *)
  50. | Prop of string
    (*

    Prop contains the actual proposition after the evaluation has been run. Example: if $d=foo and $i=123, then the Prop is:

                abcd(1,foo,123,a)     <- an actual string that represents an actual
                                        logical proposition                     
    *)
  51. | Loc of t * Err.loc
    (*

    Loc is a clever (or ugly, you pick) way of keeping the locations in the text of the Ast.t elements. In parser.mly, each production rule gives its location in the original text; for example, instead of simply returning Inter (x,y) the parser will return Loc (Inter (x,y), ($startpos,$endpos)).

    Loc is used in eval.ml when checking the types; it allows to give precise locations.

    *)
  52. | Paren of t
    (*

    Paren keeps track of the parenthesis in the AST in order to print latex

    *)
  53. | Exists of t * t
  54. | Forall of t * t
  55. | For of t * t * t
  56. | NewlineAfter of t
  57. | NewlineBefore of t
OCaml

Innovation. Community. Security.