View Javadoc

1   /*
2    * #%L
3    * prolobjectlink-jpi-jtrolog
4    * %%
5    * Copyright (C) 2012 - 2018 WorkLogic Project
6    * %%
7    * This program is free software: you can redistribute it and/or modify
8    * it under the terms of the GNU Lesser General Public License as
9    * published by the Free Software Foundation, either version 2.1 of the
10   * License, or (at your option) any later version.
11   * 
12   * This program is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU General Lesser Public License for more details.
16   * 
17   * You should have received a copy of the GNU General Lesser Public
18   * License along with this program.  If not, see
19   * <http://www.gnu.org/licenses/lgpl-2.1.html>.
20   * #L%
21   */
22  package jTrolog.engine;
23  
24  /**
25   * @author ivar.orstavik@hist.no
26   */
27  @SuppressWarnings({ "serial" })
28  class DefaultProlog extends Prolog {
29  
30  	DefaultProlog() {
31  		super(new String[0]);
32  		opNew(":-", XFX, 1200);
33  		opNew("-->", XFX, 1200);
34  		opNew(":-", FX, 1200);
35  		opNew("?-", FX, 1200);
36  		opNew(";", XFY, 1100);
37  		opNew("->", XFY, 1050);
38  		opNew(",", XFY, 1000);
39  		opNew("\\+", FY, 900);
40  		opNew("not", FY, 900);
41  		opNew("=", XFX, 700);
42  		opNew("\\=", XFX, 700);
43  		opNew("==", XFX, 700);
44  		opNew("\\==", XFX, 700);
45  		// opNew("@==",OperatorTable.XFX,700);
46  		// opNew("@\\==",OperatorTable.XFX,700);
47  		opNew("@>", XFX, 700);
48  		opNew("@<", XFX, 700);
49  		opNew("@=<", XFX, 700);
50  		opNew("@>=", XFX, 700);
51  		opNew("=:=", XFX, 700);
52  		opNew("=\\=", XFX, 700);
53  		opNew(">", XFX, 700);
54  		opNew("<", XFX, 700);
55  		opNew("=<", XFX, 700);
56  		opNew(">=", XFX, 700);
57  		opNew("is", XFX, 700);
58  		opNew("==..", XFX, 700);
59  		// opNew("?",OperatorTable.XFX,600);
60  		// opNew("@",OperatorTable.XFX,550);
61  		opNew("+", YFX, 500);
62  		opNew("-", YFX, 500);
63  		opNew("/\\", YFX, 500);
64  		opNew("\\/", YFX, 500);
65  		opNew("*", YFX, 400);
66  		opNew("/", YFX, 400);
67  		opNew("//", YFX, 400);
68  		opNew(">>", YFX, 400);
69  		opNew("<<", YFX, 400);
70  		opNew("rem", YFX, 400);
71  		opNew("mod", YFX, 400);
72  		opNew("**", XFX, 200);
73  		opNew("^", XFY, 200);
74  		opNew("\\", FX, 200);
75  		opNew("-", FY, 200);
76  	}
77  }