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 3352 - (view) (download)

1 : jhr 3352 (* basis-names.sml
2 :     *
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 :     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 :     val op_colon = Atom.atom ":"
29 :     val op_div = Atom.atom "/"
30 :     val op_mod = Atom.atom "%"
31 :     val op_exp = Atom.atom "^"
32 :     val op_at = Atom.atom "@"
33 :    
34 :     (* assignment operators *)
35 :     val asgn_add = Atom.atom "+="
36 :     val asgn_sub = Atom.atom "-="
37 :     val asgn_mul = Atom.atom "*="
38 :     val asgn_div = Atom.atom "/="
39 :     val asgn_mod = Atom.atom "%="
40 :     (* QUESTION: do we want ^= ? *)
41 :    
42 :     (* unary operators *)
43 :     val op_neg = Atom.atom "unary -"
44 :     val op_not = Atom.atom "!"
45 :     val op_D = Atom.atom "∇" (* u2207 *)
46 :     val op_Ddot = Atom.atom "∇•" (* u2207, u2022 *)
47 :     val op_Dotimes = Atom.atom "∇⊗" (* u2207, u2297 *)
48 :     val op_curl = Atom.atom "∇×" (* u2207, u00d7 *)
49 :     val op_norm = Atom.atom "|()|"
50 :    
51 :     end

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