This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / overload.h
1 /* -*- buffer-read-only: t -*-
2  *
3  *    overload.h
4  *
5  *    Copyright (C) 1997, 1998, 2000, 2001, 2005 and 2006 by Larry Wall and
6  *    others
7  *
8  *    You may distribute under the terms of either the GNU General Public
9  *    License or the Artistic License, as specified in the README file.
10  *
11  *  !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
12  *  This file is built by overload.pl
13  */
14
15 enum {
16     fallback_amg,
17     to_sv_amg,
18     to_av_amg,
19     to_hv_amg,
20     to_gv_amg,
21     to_cv_amg,
22     inc_amg,
23     dec_amg,
24     bool__amg,
25     numer_amg,
26     string_amg,
27     not_amg,
28     copy_amg,
29     abs_amg,
30     neg_amg,
31     iter_amg,
32     int_amg,
33     lt_amg,
34     le_amg,
35     gt_amg,
36     ge_amg,
37     eq_amg,
38     ne_amg,
39     slt_amg,
40     sle_amg,
41     sgt_amg,
42     sge_amg,
43     seq_amg,
44     sne_amg,
45     nomethod_amg,
46     add_amg,
47     add_ass_amg,
48     subtr_amg,
49     subtr_ass_amg,
50     mult_amg,
51     mult_ass_amg,
52     div_amg,
53     div_ass_amg,
54     modulo_amg,
55     modulo_ass_amg,
56     pow_amg,
57     pow_ass_amg,
58     lshift_amg,
59     lshift_ass_amg,
60     rshift_amg,
61     rshift_ass_amg,
62     band_amg,
63     band_ass_amg,
64     bor_amg,
65     bor_ass_amg,
66     bxor_amg,
67     bxor_ass_amg,
68     ncmp_amg,
69     scmp_amg,
70     compl_amg,
71     atan2_amg,
72     cos_amg,
73     sin_amg,
74     exp_amg,
75     log_amg,
76     sqrt_amg,
77     repeat_amg,
78     repeat_ass_amg,
79     concat_amg,
80     concat_ass_amg,
81     DESTROY_amg,
82     max_amg_code
83     /* Do not leave a trailing comma here.  C9X allows it, C89 doesn't. */
84 };
85
86
87 #define NofAMmeth max_amg_code
88 #define AMG_id2name(id) (PL_AMG_names[id]+1)
89
90 #ifdef DOINIT
91 EXTCONST char * const PL_AMG_names[NofAMmeth] = {
92   /* Names kept in the symbol table.  fallback => "()", the rest has
93      "(" prepended.  The only other place in perl which knows about
94      this convention is AMG_id2name (used for debugging output and
95      'nomethod' only), the only other place which has it hardwired is
96      overload.pm.  */
97     "()",
98     "(${}",
99     "(@{}",
100     "(%{}",
101     "(*{}",
102     "(&{}",
103     "(++",
104     "(--",
105     "(bool",
106     "(0+",
107     "(\"\"",
108     "(!",
109     "(=",
110     "(abs",
111     "(neg",
112     "(<>",
113     "(int",
114     "(<",
115     "(<=",
116     "(>",
117     "(>=",
118     "(==",
119     "(!=",
120     "(lt",
121     "(le",
122     "(gt",
123     "(ge",
124     "(eq",
125     "(ne",
126     "(nomethod",
127     "(+",
128     "(+=",
129     "(-",
130     "(-=",
131     "(*",
132     "(*=",
133     "(/",
134     "(/=",
135     "(%",
136     "(%=",
137     "(**",
138     "(**=",
139     "(<<",
140     "(<<=",
141     "(>>",
142     "(>>=",
143     "(&",
144     "(&=",
145     "(|",
146     "(|=",
147     "(^",
148     "(^=",
149     "(<=>",
150     "(cmp",
151     "(~",
152     "(atan2",
153     "(cos",
154     "(sin",
155     "(exp",
156     "(log",
157     "(sqrt",
158     "(x",
159     "(x=",
160     "(.",
161     "(.=",
162     "DESTROY"
163 };
164 #else
165 EXTCONST char * PL_AMG_names[NofAMmeth];
166 #endif /* def INITAMAGIC */