1 /* François Thomasset -- INRIA Rocquencourt -- Octobre 2001 *)
3 (* Translation from Maple to MuPad : syntaxic specification of maple *)
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
);
32 System
.err
.println("Missing template "+n
);
33 throw new IllegalArgumentException(n
);