#! /bin/sh
#
# GT -- Grammar Tools
# Copyright (C) 2000 Merijn de Jonge <mdejonge@cwi.nl>
#                    Eelco Visser <visser@acm.org>
#                    Joost Visser <jvisser@cwi.nl>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

# $Id: tohtml-sdf.sh.src,v 1.2 2001/06/08 07:49:42 mdejonge Exp $


# The following define Sdf specific paramters for the generic html
# generaction

PREFIX=/usr
GPP=/usr

# default module extension; can be changed using the -e option

MOD_EXTENSION1="sdf"
IMPORTS="${PREFIX}/bin/sdf-imports"
PPTABLES="${PREFIX}/share/StrategoXT/sdf-tools/sdf.cons.pp"
PARSETABLE="${PREFIX}/share/StrategoXT/sdf-tools/sdf.cons.tbl"

# Function to generate dot graph (as AST) for SDF definition
spec2adot () {
   SEARCHPATH=$1
   MODULE=$2
   MOD_EXTENSION=$3
   output=$4
   $IMPORTS $SEARCHPATH --graphxml -i $MODULE -e $MOD_EXTENSION \
   | $GXML2DOT -o $output
}

. ${GPP}/libexec/tohtml
