In documentation for lreduce and rreduce, supply second argument as an explicit list
[maxima.git] / share / translators / m2mj / Templates.java
bloba87f64b482b50e8168168053eb39a1a3c2e22b63
1 /* François Thomasset -- INRIA Rocquencourt -- Octobre 2001 *)
3 (* Translation from Maple to MuPad : syntaxic specification of maple *)
5 (*
6 Copyright © 2001-2002 François Thomasset, all rights reserved.
7 All of Dan Stanger's changes are Copyright © 2021 Dan Stanger, all rights reserved.
8 Copying is covered by the GNU General Public License (GPL).
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details. */
19 import java.lang.IllegalArgumentException;
20 import org.stringtemplate.v4.ST;
21 import org.stringtemplate.v4.STGroup;
22 import org.stringtemplate.v4.STGroupFile;
24 public class Templates {
25 public static STGroup theGroup=null;
26 public Templates(String g) throws Exception {
27 theGroup = new STGroupFile(g);
29 public ST getInstanceOf(String n) throws IllegalArgumentException {
30 ST t = theGroup.getInstanceOf(n);
31 if(t == null){
32 System.err.println("Missing template "+n);
33 throw new IllegalArgumentException(n);
35 return t;