2. Scribe User Manual -- Syntax

2. Scribe User Manual -- Syntax

Browsing

Home: Scribe User Manual

Previous chapter: Getting Started
Next chapter: Standard Library

Syntax

2.1 Scribe syntax

Chapters

1. Getting Started
2. Syntax
3. Standard Library
4. Hyperlinks and References
5. Index
6. Bibliography
7. Computer programs
8. Graphical User Interfaces
9. Customization
10. Scribe style files
11. Editing Scribe Programs
12. Compiling Scribe programs
13. Compiling Texi documents
14. Using Bibtex databases
15. Functions and Variables

Scribe

Home page:Scribe

Documentation:user
expert
styles

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 page has been generated by Scribe.
Last update Wed Dec 18 09:23:02 2002