|
The Guava ToolsExample - test2.hss |
The following source code should be compiled with:
$ hss2html test2.hss |
/* test2.hss */
#include "colours.inc"
#define TITLESTRING Test 2.
/* This is an example of a function-like macro. */
#define MACRO(word1,word2) The macro arguments were <APOS>word1<APOS> \
and <APOS>word2<APOS>.
<HTML>
<HEAD>
<TITLE> TITLESTRING </TITLE>
</HEAD>
<BODY BGCOLOR = BG_COLOUR
TEXT = TX_COLOUR
VLINK = VL_COLOUR
LINK = LN_COLOUR >
<HTML>
<P>This is the page text for Test 2.
/* Example of the DATE macro. */
<P>The page was generated on <DATE>.
<P>The page was generated on <DATE="%A, %B %d<TH>, %Y">.
/* Example of the QUOTE macro. */
<P>Here is a word in <QUOTE>quotes<QUOTE>.
/* Example of the NOSP and SP macros. */
<P>There is no space between these <NOSP> two words.
<P>There is a single space between these<NOSP> <SP>two words.
<P>MACRO(Bagpuss,Emily)
</HTML>
|
/* colours.inc */ #define BG_COLOUR "#006600" /* Dark green */ #define TX_COLOUR "#FFFFFF" /* White */ #define VL_COLOUR "#999999" /* Grey */ #define LN_COLOUR "#FFFFFF" /* White */ |
This output will be produced:
test2.html
<!-- HTML generated at Wed Dec 1 23:00:51 1999.
hss2html by Steve Morphet 1999. -->
<HTML>
<HEAD>
<TITLE> Test 2. </TITLE>
</HEAD>
<BODY BGCOLOR = "#006600"
TEXT = "#FFFFFF"
VLINK = "#999999"
LINK = "#FFFFFF" >
<HTML>
<P>This is the page text for Test 2.
<P>The page was generated on Wed Dec 1 23:00:51 1999.
<P>The page was generated on Wednesday, December 01st, 1999.
<P>Here is a word in "quotes".
<P>There is no space between thesetwo words.
<P>There is a single space between these two words.
<P>The macro arguments were 'Bagpuss' and 'Emily'.
</HTML>
|