lot2html Manual
©Daniel Amyot, September 1996
NAME
lot2html - translates a LOTOS specification into a HTML document
SYNOPSIS
lot2html [-d DefFile] [InFile] [>OutFile]
lot2html -h
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.
The filter has a number of features:
- Keywords, comments, process names and type names are enhanced
with user-defined tags.
- Abstract Data Types from the International Standard are emphasized
as well.
- Default settings are implemented, but HTML tags used for
enhancement are fully configurable via a simple definition
file (lot2html.def)
- Sorted lists of processes and types, with hyperlinks pointing towards
their definitions, are automaticaly generated.
- The structure of the specification and upper/lowercase characters
remain unchanged. No syntactical or grammatical checking is done.
lot2html can be used as an independent application, or as a filter
(it can use standard input and output).
OPTIONS
lot2html [-d DefFile] [InFile] [>OutFile]
lot2html -h
Where:
DefFile = Definition file (HTML tags). Internal default
values.
InFile = Input file (in LOTOS). Default is stdin
OutFile = Output file (in HTML). Default is stdout
-d
Overrides the default tag definitions with the ones defined
in DefFile. Default definitions are:
- LOTOS keywords: Bold
- Comments: Italic, green
(#208000)
- Process names: Red (#C00000)
- User-defined Type names: Blue
(#0000FF)
- IS 8807 Type names: Light Blue
(#4040C0)
-h
Displays a short help message.
DEFINITION FILE
Included here are the default definitions in the input format
for 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 very simple.
Each definition must include a tag
variable on the first line (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).
Comments can be included; they start with a semi-colon and fill the
line.
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??).
; 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
<B>
;End KewWord
EKW
</B>
;*** COMMENTS ***
;Begin Comment
BCOM
<I><FONT color="#208000">
;End Comment
ECOM
</FONT></I>
;*** PROCESS IDENTIFIERS ***
;Begin Process Name
BPN
<FONT color="#C00000">
;End Process Name
EPN
</FONT>
;*** TYPES ***
;Begin Type Name
BTN
<FONT color="#0000FF">
;End Type Name
ETN
</FONT>
;*** TYPES FROM IS8807 ***
;Begin Type from International Standard
BTIS
<FONT color="#4040C0">
;End Type from International Standard
ETIS
;
COMPILING
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:
DOS
flex -i lot2html.lex
gcc -O2 lexyy.c -o lot2html.exe
UNIX
flex -i lot2html.lex
gcc -O2 lex.yy.c -o lot2html
VERSION
Version 0.2, September 14, 1996
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.
SEE ALSO
Other filter: lot2mml(7)
Configuration file: lot2html.def
Source file: lot2html.lex
AUTHOR
Daniel Amyot,
damyot@csi.uottawa.ca
Created: 14 September, 1996
Last Updated: 14 September, 1996.