Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/vis15/src/compiler/parse-tree/operators.sml
ViewVC logotype

Annotation of /branches/vis15/src/compiler/parse-tree/operators.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5569 - (view) (download)

1 : jhr 3714 (* operators.sml
2 : jhr 3352 *
3 :     * Names used for the various operators.
4 :     *
5 :     * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
6 :     *
7 :     * COPYRIGHT (c) 2015 The University of Chicago
8 :     * All rights reserved.
9 :     *)
10 :    
11 :     structure Operators =
12 :     struct
13 :    
14 :     (* binary operators (in precedence order) *)
15 :     val op_lt = Atom.atom "<"
16 :     val op_lte = Atom.atom "<="
17 :     val op_equ = Atom.atom "=="
18 :     val op_neq = Atom.atom "!="
19 :     val op_gte = Atom.atom ">="
20 :     val op_gt = Atom.atom ">"
21 :     val op_add = Atom.atom "+"
22 :     val op_sub = Atom.atom "-"
23 :     val op_mul = Atom.atom "*"
24 : jhr 4317 val op_dot = Atom.atom "•" (* u2022 *)
25 :     val op_cross = Atom.atom "×" (* u00d7 *)
26 :     val op_convolve = Atom.atom "⊛" (* u229b *)
27 :     val op_outer = Atom.atom "⊗" (* u2297 *)
28 : jhr 3352 val op_colon = Atom.atom ":"
29 :     val op_div = Atom.atom "/"
30 :     val op_mod = Atom.atom "%"
31 : jhr 3482 val op_pow = Atom.atom "^"
32 : jhr 3352 val op_at = Atom.atom "@"
33 : jhr 5569 val op_compose = Atom.atom "∘" (* u2218 *)
34 : jhr 3352
35 :     (* assignment operators *)
36 :     val asgn_add = Atom.atom "+="
37 :     val asgn_sub = Atom.atom "-="
38 :     val asgn_mul = Atom.atom "*="
39 :     val asgn_div = Atom.atom "/="
40 :     val asgn_mod = Atom.atom "%="
41 :     (* QUESTION: do we want ^= ? *)
42 :    
43 :     (* unary operators *)
44 :     val op_neg = Atom.atom "unary -"
45 :     val op_not = Atom.atom "!"
46 : jhr 4317 val op_D = Atom.atom "∇" (* u2207 *)
47 :     val op_Ddot = Atom.atom "∇•" (* u2207, u2022 *)
48 :     val op_Dotimes = Atom.atom "∇⊗" (* u2207, u2297 *)
49 :     val op_curl = Atom.atom "∇×" (* u2207, u00d7 *)
50 : jhr 3352 val op_norm = Atom.atom "|()|"
51 :    
52 :     end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0