
This directory contains all the source files,
concerned with sml translator and checker.

There are:

1. shell scripts:
	1.1 sml_check	- to check syntax of the sml document,
		usually used with one argument - source file name,
		if document has rsml markup, then appropriate descriptions
		must be specified implicitly:
		sml_check -synt rsml.desc -old man.desc aaa,
		where aaa - source file name 
		(more information in the man page sml_check.1).
	1.2 sml_tran	- to translate mm document to the sml
		usually used in the form : sml_tran -out aaa bbb,
		to translate from man to rsml: 
		sml_tran -synt rsml.desc -old man.desc -out aaa bbb,
		where aaa - output file name, bbb - source file name
		(more information in the man page sml_tran.1).
	1.3 sml_tr_dir	- to translate the whole directory from mm to 
		sml, for the testing purposes. The translated files are
		not saved, but all the log files are concatenated in cat.log.
		Script accept one argument - source directory name.
	1.4 rsml_tr_dir	- the same as sml_tr_dir, but for man and rsml.

	1.5 sml_test_f	- to test the translation of mm file to sml.
		Script accept one argument - source file name and make in
		current directory: 1. sml_file ( with the name SML_aaa, where
		aaa - source file name) 2. postscript versions of both files
		( with extension .ps ) for previewing with dxpreview or
		express ).
	1.6 rsml_test_f	- the same as sml_test_f, but for man and rsml.

	1.7 sml_tree	- to make a parallel tree for snapshot directory.
		The snapshot directory is supposed to have a structure:
		README, Makefile, Description , mm-directories, man-directories,
		where the names of mm-directories have extension .gd, and
		the names of man-directories have extension .rf.
		Under mm-directories there is .mm files, which must be
		translated in sml, and other files, which must be copied to 
		appropriate directories. Under man-directories supposed to be
		src/man* subdirectories with files, which must be 
		translated in rsml.

		The script accept 2 arguments: names of source and 
		target directories. If there is only one argument, the
		target directory is created as ../SML_aaa, where aaa is the
		name of the source directory.

***************************************************************************
***************************************************************************
General notice !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Several scripts assumes that the necessary description files (sml.desc, 
rsml.desc, mm.desc, man.desc which are appropriate) exists in the current 
working directory. If the program can not find this files, the user  
will be prompted about them.
***************************************************************************
***************************************************************************

2. Man files:

	2.1 sml_check.1
	2.2 sml.tran.1

3. Description files:

	3.1 sml.desc
	3.2 rsml.desc
	3.3 mm.desc
	3.4 man.desc

4. Program sources:

	4.1 sml_def.h sml_glob.h sml_proto.h sml_str.h - headers
	4.2 sml_check.c sml_trans.c sml_util.c	- c programs
	4.3 sml_synt.y	- yacc program

5. Service files:
		
	5.1 Makefile	- Makefile for mips machine
	5.2 README	- this file.


That is all !

In case of any questions, please, inform:

Yakov Burtov	

phone 8882	username -yak

________________________________________
Reported by                  [mailname]: weir
Reported Date                [mm/dd/yy]: 11/21/90
Responsible Code Engr.      [mailname]+: bowe
Status           (open,closed,deferred): open
Priority                      (1,2,3,4): 3
Short Description                (text): future issues to consider
[fred 1/1/70 public]

Hi Fred,

This message has several parts, but essentially it's about things that
you might want to go into future releases of the DTE.

The three sections are about:

    1. The SML README file I mentioned to you.
    2. The SML manpage rewrites.
    3. The SML template material that went out with the DCE snapshot.

The first two items are for you to review; let me know if you want me to
send them to Yaakov or anyone else as well.

1. Here is the README file that I put in the /tools/src/sml directory for
the DCE snapshot 2; it is a rewording of Yaakov's original.


----------------------------------cut here-------------------------------------

...\" Copyright (c) 1990, Open Software Foundation, Inc. ALL RIGHTS RESERVED
doc/osfdte/tools/src/sml 


This directory contains the source files used to build the SML
translator and checker.


1. Shell scripts:

sml_check    Checks the syntax of an SML document;
        usually used with one argument, viz. - source file name.
        If the file has RSML markup (i.e., is manpage source), 
        then the appropriate macro description files must be specified 
        explicitly, e.g.:

            sml_check -synt rsml.descr -old man.descr aaa

        where:

             aaa 

        is the source filename (more information can be found in 
        the manpage sml_check.1).

sml_tran    Translates an mm-coded document into SML. Usually invoked in 
        the form: 

            sml_tran -out aaa bbb

        where:
        
            aaa
        
        is the output filename, and

            bbb

        is the source filename. To translate from man to RSML, the
        program is invoked as follows:

            sml_tran -synt rsml.descr -old man.descr -out aaa bbb

        where:

            aaa 

        is the output filename, and

            bbb 

        is the source filename (more information can be found in the 
        manpage sml_tran.1).

sml_tr_dir    Translates the contents of an entire directory from mm to 
        SML; used for the testing purposes. The translated files are
        not saved, but all the log files are concatenated in cat.log.
        This script accepts one argument, namely the source directory 
        name.

rsml_tr_dir    Same as sml_tr_dir, but for man and RSML (i.e., manpage) file
        directories.

sml_test_f    Tests the translation of an mm file into SML.
        The script accepts one argument, namely the source filename.

        When executed, the program creates the following files in the
        current directory: 

            SML_aaa 

        where aaa is the source filename (this is an SML source
        file); and two PostScript output files (one for the original
        and one for the translated source), each with ".ps" 
        extensions. These files can be previewed with "dxpreview"
        or "express".

rsml_test_f    Same as sml_test_f, but for man and RSML (i.e., manpage)
        source files.

sml_tree    Used to make a parallel tree for an OSF snapshot directory.
        The snapshot directory is assumed to contain the following:

            README
            Makefile
            Description
            mm-directories
            man-directories

        where the names of the "mm-directories" have extensions of
        ".gd", and the names of the "man-directories" have extensions
        of ".rf". The "mm-directories" contain .mm files (which must be
        translated into SML), and other files, which must be copied to 
        the appropriate directories. The "man-directories" are assumed to
        contain files for manpages which have to be translated into RSML.

        The script accepts 2 arguments: the names of the source and 
        the target directories. If there is only one argument, the
        target directory

            ../SML_aaa

        is created, where aaa is the name of the source directory.


NOTE:

Several scripts assume that the necessary macro description files (sml.descr, 
rsml.descr, mm.descr, man.descr,  whichever are appropriate) are present in the 
current working directory. If a script cannot find these files, the user  
will be prompted for their pathname(s).


2. Man files:

    sml_check.1
    sml.tran.1

3. Macro Description files:

    sml.descr
    rsml.descr
    mm.descr
    man.descr

4. Program source files:

    sml_def.h 
    sml_glob.h 
    sml_proto.h 
    sml_str.h 
    sml_check.c 
    sml_trans.c 
    sml_util.c    
    sml_synt.y    

5. Miscellaneous:

    Makefile
    README    

----------------------------------cut here-------------------------------------


2. Here are the manpages for the SML checker and translator. I did not
put these versions into the snapshot; in fact no one has seen these yet
I believe. 


First, the rewrite of sml_tran.1:

----------------------------------cut here-------------------------------------
 ...\"
 ...\" my rewrite of sml_tran.1...
 ...\"
 ...\"
 ...\"
 .TH sml_tran 1 "" "" "" ""
 ...\"
 ...\"
 ...\"
 .SH "NAME"
 \*Lsml_tran\*O - 
 translate text files marked with non-SML macros
 into SML files
 ...\"
 ...\"
 ...\"
 .SH "SYNOPSIS"
 .sS
 \*Lsml_tran\*O [ \*L-v\*O ] [ \*L-f\*O ] 
 [ \*L-out\*O \*Voutput_filename\*O ] [ \*Vinput_filename\*O ]
 .sE
 ...\"
 ...\"
 ...\"
 .SH "OPTIONS"
 .VL .5i
 .LI "\*L-v\*O"
 - verbose option
 .LI "\*L-f\*O"
 - force option ( the output file will overwrite any existing file with the
 same name )
 .LI "\*L-out\*O"
 - output file name
 .LE
 ...\"
 ...\"
 ...\"
 .SH "DESCRIPTION"
 .PP
 \*Lsml_tran\*O
 first reads the description of syntax of SML and nonsemantic 
 macro languages, and saves this
 information in internal tables. Then it opens the input text file. If
 \*Vinput_filename\*O was not specified in the command line, the program will
 prompt for it.
 \*Lsml_tran\*O reads the input file, translates the non-SML macros
 into SML macros (if possible), and writes an output file (with the name
 \*Voutput_filename\*O) which consists of the text of the input file
 with SML markup language instead of the original, non-SML, markup. If
 errors are detected in the input file, \*Lsml_tran\*O will write
 error (and warning) messages both to the screen and to an \*LSML.log\*O
 file in the current directory. If the \*L-v\*O (verbose) option is not
 specified, each type of error message will be printed only once.
 \*Lsml_tran\*O concludes by printing a short summary of what it has done.
 ...\"
 ...\"
 ...\"
 .SH "DIAGNOSTICS"
 .PP
 For each error detected, the error log (\*LSML.log\*O) will contain an
 entry describing:
 .ML
 .LI
 where the error occurred
 .LI
 what the error was
 .LE
 .PP
 If an untranslateable macro is detected, \*Lsml_tran\*O will try to
 find the macro in the mm macro set; if this search is successful, it
 will then offer possible translations for the macro, based on the definition
 found.
 ...\"
 ...\"
 ...\"
 .SH "RELATED INFORMATION"
 \*Lsml_check\*O, \*LDTE\*O, \*LSML\*O
 ...\"
 ...\"
 ...\"
 ----------------------------------cut here-------------------------------------
 
 Second, the rewrite of sml_check.1:
 
 ----------------------------------cut here-------------------------------------
 ...\"
 ...\" my rewrite of sml_check.1...
 ...\"
 ...\"
 ...\"
 .TH sml_check "1" "" "" ""
 ...\"
 ...\"
 ...\"
 .SH "NAME"
 \*Lsml_check\*O  -
 check syntax of SML text files
 ...\"
 ...\"
 ...\"
 .SH "SYNOPSIS"
 .sS
 \*Lsml_check\*O [ \*L-v\*O ] [ \*Vinput_filename\*O ]
 ...\"
 ...\"
 ...\"
 .SH "OPTIONS"
 .VL 1i
 .LI "\*L-v\*O"
 
 .LE
 .SH "ARGUMENTS"
 .VL 1i
 .LI "\*Vinput_filename\*O"
 
 .LE
 ...\"
 ...\"
 ...\"
 .SH "DESCRIPTION"
 .PP
 \*Lsml_check\*O
 first reads the description of syntax of SML and nonsemantic 
 macro languages, and saves this
 information in internal tables. Then it opens the input text file. If
 \*Vinput_filename\*O was not specified in the command line, the program will
 prompt for it. As it reads the input file, if it detects errors,
 \*Lsml_check\*O will write
 error (and warning) messages both to the screen and to an \*LSML.log\*O
 file in the current directory. If the \*L-v\*O (verbose) option is not
 specified, each type of error message will be printed only once.
 \*Lsml_check\*O concludes by printing a short summary of what it has done.
 ...\"
 ...\"
 ...\"
 .SH "DIAGNOSTICS"
 .PP
 For each error detected, the error log (\*LSML.log\*O) will contain an
 entry describing:
 .ML
 .LI
 where the error occurred
 .LI
 what the error was
 .LE
 .PP
 If an unknown macro is detected, \*Lsml_check\*O will try to
 find the macro in the mm macro set; if this search is successful, it
 will then offer possible translations for the macro, based on the definition
 found.
 .PP
 \*Lsml_check\*O concludes by printing a short summary of what it has done.
 ...\"
 ...\"
 ...\"
 .SH "RELATED INFORMATION"
 \*Lsml_trans\*O, \*LDTE\*O, \*LSML\*O
 ...\"
 ----------------------------------cut here-------------------------------------
