.\" manual page for lot2html(1)
.\"
.\" Copyright (c) 1996 Daniel Amyot
.\"
.\" Permission is granted to anyone to use this software for any
.\" purpose on any computer system, and to alter it and redistribute
.\" it freely, subject to the following restrictions:
.\"
.\" 1. The author is not responsible for any consequences of use of
.\" this software, even if they arise from flaws in it.
.\"
.\" 2. The origin of this software must not be misrepresented, either
.\" by explicit claim or by omission. Credits must appear in the
.\" documentation.
.\"
.\" 3. Altered versions must be plainly marked as such, and must not
.\" be misrepresented as being the original software. Credits must
.\" appear in the documentation.
.\"
.\" 4. This notice may not be removed or altered.
.nr ES 5n
.de ES
.PP
.in +\\n(ESu
.nf
..
.de EE
.in -\\n(ESu
.fi
.PP
..
.de PT
.ie \\n(.$>1 .TP "\\$2"
.el .TP
.ie !'\\$1'' \\$1
.el \(bu
..
.ds Nr \fInroff\fR
.TH LOT2HTML 1 "14 September, 1996"
.BY "Daniel Amyot"
.SH NAME
lot2html \-
translates a LOTOS specification into a HTML document
.SH SYNOPSIS
lot2html
[
.BI \-d " DefFile"
] [
.I InFile
] [ >
.I OutFile
]
.PP
lot2html \-h
.SH DESCRIPTION
lot2html is a filter for documentation of LOTOS specifications.
It outputs a simple HTML document enhencing the readability
of the specification when using Web browsers.
.PP
The filter has a number of features:
.IP \(bu 2
Keywords, comments, process names and type names are enhanced
with user-defined tags.
.PT
Abstract Data Types from the International Standard are
emphasized as well.
.PT
Default settings are implemented, but HTML tags used for
enhancement are fully configurable via a simple definition file
.I (lot2html.def)
.PT
Sorted lists of processes and types, with hyperlinks
pointing towards their definitions, are automaticaly generated.
.PT
The structure of the specification and upper/lowercase characters
remain unchanged. No syntactical or grammatical checking is done.
.PP
lot2html can be used as an independent application, or as a filter
(it can use standard input and output).
.SH OPTIONS
lot2html
[
.BI \-d " DefFile"
] [
.I InFile
] [ >
.I OutFile
]
.PP
lot2html \-h
.PP
Where:
.TP
.I DefFile
Definition file (HTML tags). Internal default values.
.TP
.I InFile
Input file (in LOTOS). Default is stdin
.TP
.I OutFile
Output file (in HTML). Default is stdout
.TP
.BI \-d " DefFile"
Overrides the default tag definitions with the ones defined in
.I DefFile.
Default definitions are:
.LP
LOTOS keywords: Bold
Comments: Italic, green (#208000)
Process names: Red (#C00000)
User-defined Type names: Blue (#0000FF)
IS 8807 Type names: Light Blue (#4040C0)
.LP
.TP
.BI \-h
Displays a short help message.
.SH DEFINITION FILE
Included here are the default definitions in the input format for
.I DefFile
: 5 pairs of tags can (but do not have to) be defined.
The definition file follows a rigid format because the internal
parser is
.I very
simple
.PP
Each definition must include a tag variable on the first line
.I (BKW, EKW, BCOM, ECOM, BPN, EPN, BTN, ETN, BTIS, ETIS)
and the corresponding HTML tag (the latter can be empty, so
no enhancement would result for that category).
.PP
Comments can be included; they start with a semi-colon and
fill the line.
.I NOTE
You should make sure that the End tag variable (E??)
contains a HTML tag that matches the one in the Begin
tag variable (B??).
.ES
;********************************************
;* lot2html.def - Sample definition file. *
;* Daniel Amyot, August 11, 1996 *
;********************************************
; FORMAT: first line, one of the 10 tag variables:
; (BKW, EKW, BCOM, ECOM, BPN, EPN, BTN, ETN, BTIS, ETIS)
; second line, the corresponding HTML tag. Can be empty.
;
; Comment lines start with a semi-colon.
; Absent tags will be assigned default values.
;
; Make sure that related Begin and End tags have matching HTML tags!
;*************************
;* HTML tags definitions *
;*************************
;*** KEYWORDS ***
;Begin KewWord
BKW
;End KewWord
EKW
;*** COMMENTS ***
;Begin Comment
BCOM
;End Comment
ECOM
;*** PROCESS IDENTIFIERS ***
;Begin Process Name
BPN
;End Process Name
EPN
;*** TYPES ***
;Begin Type Name
BTN
;End Type Name
ETN
;*** TYPES FROM IS8807 ***
;Begin Type from International Standard
BTIS
;End Type from International Standard
ETIS
.EE
.SH COMPILING
.B lot2html
is written in GNU flex. It should be easy to port it to any platform. It has been tested under SunOS 4, DOS 6 (with GO32) and Linux. In order to compile, you need flex and gcc or something equivalent:
.TP
.BI DOS
.LP
flex -i lot2html.lex
gcc -O2 lexyy.c -o lot2html.exe
.LP
.TP
.BI UNIX
.LP
flex -i lot2html.lex
gcc -O2 lex.yy.c -o lot2html
.LP
.SH VERSION
Version 0.2, September 14, 1996
.SH BUGS
Because this is a 1-pass parser that does not do any grammatical
checking, several inconsistencies can result. For instance, sorts
that have the same identifier as their type will be emphasized
as well.
.SH SEE ALSO
Other filter: lot2mml(1)
.PP
Configuration file: lot2html.def
.PP
Source file: lot2html.lex
.SH AUTHOR
.I Daniel Amyot, damyot@csi.uottawa.ca
.PP
http://www.csi.uottawa.ca/~damyot