Overview
=========

mgtools collects several useful tools and scripts to edit and
visualize Meta Grammars

	  smg2xml	to convert MG from a simple format (smg) to XML format
	  mg.el		an Emacs mode to edit MG (in both XML and SMG formats)
	  mg2smg.xsl	an XSLT stylesheet to convert from XML to SMG
	  editor.pl     a graphical viewer/editor for MG
	  mg*2html.xsl  several XSLT stylesheets to get HTML views on MG
	  mg2*.xsl	several XSLT stylesheets to convert to other formats

Copyright
=========

All files in this distribution are copyrighted 2004 Institut National
de Recherche en Informatique et Automatique (INRIA).

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 of the License, 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

Installation
============

See the file INSTALL for installation instructions.

Requirement
===========

   libxml
   XML::LibXML	to use editor.pl

Documentation
=============

smg2xml
-------
smg2xml takes as input a meta-grammar in simplified format, and produces the
corresponding xml in the standard output.
The name of the input file is assumed to be suffixed by ".smg". You may either
give to smg2xml the fule name (e.g. sample.smg), or just the prefix (sample),
in which case the tool appends the ".smg" suffix.
Options to smg2xml:
	-c, --comments (default):
	Comments starting with ";;" are included as comment nodes in the xml.
	Other comments are ignored: starting with a simple ";", or within /*...*/
	in C style.

	-n, --no_comments:
	All comments are ignored.

	-w, --warning:
	Some checks are performed, and warnings are emitted when appropriate to stderr:
		* a class or macro may be defined only once;
		* a class or macro must be defined that is in use somewhere,
	must have a definition (classes are used in inheritance).
	Default: no check, no warning.

Try 
    smg2xml sample
or
    smg2xml sample.smg

mgviewer
--------
mgviewer takes as input a file containing the Meta Grammar, either in xml, or
in simplified format (smg), and displays it using DaVinci.

Try (in case daVinci is installed on the same location as for us):
   mgviewer sample.smg
Note that you usually have to tell where daVinci is installed on your system, e.g.:
   mgviewer --daVinci=/usr/local/daVinci_V2.1/daVinci sample.smg

mg.el
-----
Emacs mode for smg.

Availability
============

To be filled !


Bug Reports and User Feedback
=============================

Send your bug reports and suggestions by E-mail to:

          Francois.Thomasset@inria.fr
