summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/types.mli
blob: 567c0c5d902e4e708e40bb2f9e35f9cdf0fd0feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
exception TooMuchRParen

type raw_pos = int * int

type pos = string * int * int

type spaces =
  | Space_0
  | Space_1
  | Space_n
  | Space_cr
  | Space_none

type context = I_scalar | I_hash | I_array | I_func | I_raw | I_star | I_arraylen

type fromparser = 
   | Ident of string option * string * pos
   | Num of string * pos
   | String of string * pos

   | Ref of context * fromparser
   | Deref of context * fromparser
   | Deref_with of context * fromparser * fromparser

   | Diamond of fromparser option
   | Binop of string * fromparser * fromparser
   | If_then_else of string * (fromparser * fromparser) list * fromparser option

   | List of fromparser list
   | Block of fromparser list

   | Call_op of string * fromparser list
   | Call of fromparser * fromparser list
   | CallP of fromparser * fromparser list
   | Method_call of fromparser * fromparser * fromparser list
   | Method_callP of fromparser * fromparser * fromparser list

   | Anonymous_sub of fromparser list
   | My of fromparser
   | Local of fromparser
   | Use of fromparser * fromparser list
   | Sub_declaration of fromparser * string * fromparser list (* name, prototype, body *)
   | Package of fromparser
   | Label of string

   | Too_complex
   | Semi_colon

type priority = 
| P_tok
| P_tight
| P_mul
| P_add
| P_cmp
| P_eq
| P_expr
| P_tight_and
| P_tight_or
| P_ternary
| P_assign
| P_call_no_paren
| P_comma
| P_and
| P_or
| P_loose

| P_paren_wanted of priority
| P_paren of priority