HELP SYNTAX                                Updated A.Sloman July 1986

POP-11 program text is made up of sequences of WORDS. Rules about what
sequences of characters are taken to belong to the same word are
explained briefly in HELP *WORDS, and *ITEM_CHARTYPE, and in more detail
in REF *ITEMISE, *WORDS, *IDENT.

Certain words have a special significance to POP-11. These are
summarised in:

        *SYSWORDS

Extra information is available on certain of these special words:
        *SQUAREBRA    -    [ ]
        *ROUNDBRA     -    ( )
        *TWIDDLYBRA   -    { }
        *APOSTROPHE   -    '
        *WORDQUOTE    -    "
        *COMMA        -    ,
        *COLON        -    :

For more information about how to put words together to form programs,
see:
        *EXPRSTA      - Expressions and Statements

    -----------------------------------------------------------------

All the words described in the documentation above are words that POP-11
already knows about - they are defined in the system. New words can be
defined by users for different purposes. POP-11 includes a word "SYNTAX"
which can be used for defining new syntax words, for example:

    : vars syntax endwhile;

When the compiler encounters a syntax word it looks to see if the word
has as value as procedure. If so it applies that procedure. If not, it
complains.

Various SYS procedures are available for use in SYNTAX procedures. They
include procedures to compile up to some given syntax word, to plant
POP-11 virtual machine instructions etc. See REF *POPCOMPILE and
REF *VMCODE.

-- RELATED DOCUMENTATION ----------------------------------------------

Other classes of words can be defined, see:

HELP *IDENTIFIERS - intro to the range and nature of identifiers
HELP *VARIABLES   - range and nature of variables
REF  *IDENT       - details of identifiers

--- C.all/help/syntax --------------------------------------------------
--- Copyright University of Sussex 1987. All rights reserved. ----------
