1. Introduction
Weave is a language for describing text with markup tags. Versions previous 1.60 were limited to the creation of HTML. The current version works in two modes - a general mark up mode, and a mode specialized for HTML that works in a manner backwards compatible with previous versions. The !Weave application sets up the Weave filetype (&18d)
intended for files which contain Weave scripts, i.e. descriptions of tagged text. The run-action of a file of type Weave is to create the tagged text it describes. The Weave language is built on top of part of Lua 5.1. In fact it is quite possible to write Weave scripts without knowing any Lua, using what might be called minimal Weave in HTML style. This Stronghelp manual describes the minimal Weave language.
Weave is case sensitive and has builtin keywords, which in minimal Weave consist of upper case letters. Variable names are made up of letters of the alphabet, digits and the underscore symbol (_). They may not begin with a digit. You are advised to use lower case letters in variable names, so it becomes clear which words are defined by you and which are not. We use this colour for names that you can choose yourself. You cannot assign values to a builtin keyword. If you try to do so in a script you will get a Cannot update ... error when you attempt to run it. Most keywords correspond to HTML tags. There are also a few lower case keywords that come from Lua itself which should be avoided.
Outside literal strings a sequence of blank spaces or tabs can be replaced by a single blank space and newlines can be inserted or omitted after semicolons (;), open braces ({), open double square-brackets ([[), open parenthesis (() in function-calls and after certain Lua keywords. In a word, format is pretty free. Single line comments are opened by -- and last till the end of a line. Multiline comments are opened by --[[ and last till the first matching ]]. In other words, multiline comments are nestable.
|
|
|