General Information
Tutorials
Reference Manuals
Libraries
Translation Tasks
Tools
Administration
|
FunnelWebIntroductionThis chapter contains an example for a first funnelweb specification. The commands used in this example are explained and Eli is used to generate a documentation and to process the specification contained in this example.
@=~ ~p maximum_input_line_length = infinity ~p maximum_output_line_length = infinity ~p typesetter = texinfo ~t title titlefont left "A First Funnelweb Specification" The file ~{helloworld.lido~} contains a minimal Eli-Specification, which accepts only the empty input file and prints ~{Hello, World~} to the standard output. ~O~<helloworld.lido~>~{ RULE: root ::= COMPUTE printf("Hello, World\n"); END; ~} Copy this specification file into the file `first.fw'. Now, you can use the following Eli-derivations:
In the following, the different components of the above specification are explained.
@=~
A FunnelWeb-Specification-file is built up from normal characters and
FunnelWeb Commands. Every FunnelWeb-command starts with the
macro-character which is
~p `maximum_input_line_length' = infinity ~p `maximum_output_line_length' = infinity Normally, a funnelweb-specification file consists of lines with a maximal length of 80 and produces output-files consisting of lines, which are also 80 characters long. The above lines switch off these limitations.
~p `typesetter' = `texinfo'
FunnelWeb can produce documentation in one of a number of different formats.
The above line selects
~t title titlefont left "A First Funnelweb Specification" This is a special insertion that can be used to typeset a document-title for the generated document. Other possible insertins are a table of contents and a page break. See Formatting, for more information.
The file ~{helloworld.lido~} contains ... standard output. Any text between Macro-definitions and output-file-definitions contains documentation that is processed when a formatted documentation is requested. You can structure your document (see Structure), change the font for text-parts (see Marking Text) and insert special text parts such as a title or a table of contents (see Formatting).
~O~<helloworld.lido~>~{ ... ~} The specification-parts that should be processed by Eli are marked as Output-files with this command. Any text between the opening and the closing brace goes into the specified file, `helloworld.lido' in this case. Another method of composing output text are macros which can have parameters and are substituted in the output file command.
|