2. Scribe User Manual -- Syntax

2. Scribe User Manual -- Syntax

Browsing

Home: Scribe User Manual

Previous chapter: Getting Started
Next chapter: Standard Library


Syntax

Scribe syntax


Chapters

Getting Started
Syntax
Standard Library
Hyperlinks and References
Index
Bibliography
Computer programs
Graphical User Interfaces
Customization
Scribe style files
Editing Scribe Programs
Compiling Scribe programs
Compiling Texi documents
Using Bibtex databases
Functions and Variables


Scribe

Home page:Scribe

Documentation:user
expert


A Scribe document is composed of Scribe expressions. A Scribe expression can be:
  • An atomic expression, such as a string of characters, a number.
  • A list.
  • A text.
Here are several examples of correct Scribe expressions:

  • "foo", a string of characters composed of the characters `f', `o' and `o'.
  • 123 3.14, two numbers.
  • #t #f, the true and false Scribe value.
  • (bold "foo bar"), a list.
  • [A text sample], a simple text containing three words and no escape sequence.
  • [Another text sample (that is still) simple], another simple text.
  • [Another ,(bold "text") sample], a more complex text that contains two words (Another and sample) and an expression (bold "text"). The escape sequence is introduced with the `,(' characters.

Expressions are evaluated, thus (bold "foo") has the effect of typesetting the word foo in bold face to produce foo. Escape sequences enable evaluation of expressions inside the text. Thus the text [Another ,(bold "text") sample] produces `Another text sample'. On the other hand [Another (bold "text") sample] produces `Another (bold "text") sample' because it does not contain the escape sequence `,('.

2.1 Scribe syntax

<expr>    --> <atom>
            | <text>
            | <list>
<list>    --> (<expr>+)
<text>    --> [any sequence but `,(' or a `,<list>']
<atom>    --> <boolean>
            | <integer>
            | <float>
            | <string>
            | <color>
<integer> --> [0-9]+
<float>   --> [0-9]+.[0-9]*
            | [0-9]*.[0-9]+
<string>  --> "..."
<color>   --> <string>
            | "#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"



This
Scribe page is generated by scribeinfo.
Last update Sun Feb 17 11:18:32 2002