TMCALGO R1: Algorithm Compiler

Note: this document does not refer to the latest version of the TMCALGO language. Please refer to TMCALGO R2 for the latest documentation.

Contents

    0.0: Invocation
    A.0: Syntax
      A.1: Grammar
      A.2: Lexical Syntax

0.0: Invocation

    tmcalgo [options] [files]
            -k             Keep output file (.c) even on error
            -o <filename>  Send .tmc output to named file
            -v             Produce Debug Messages
            -q             Show this help message
            -w             Give error return on warnings
            -C <node>      Look for command server on specified node

A.0: Syntax

Following is a list of rules for interpreting the TMCALGO Input Grammar specification followed by the TMCALGO Input Grammar specification itself. Don't confuse these rules with the rules for interpreting a TMCALGO program, which is what the grammar defines. Since we're using a grammar to define a program which is used to define other grammars, there is a heavy dose of self-referentiation. If you lose your bearings, get outside and walk fast enough to double your heartrate for at least 20 minutes.

A.1: TMCALGO Input Grammar

  program
    : [ prog-item ... ]
  prog-item
    : <TMC-STATEMENT>
    : STATE <NAME> '{' untimed-commands timed-commands '}'
    : PARTITION
  untimed-commands
    : [ <TMC-STATEMENT> ... ]
  timed-commands
    : [ [ [ '+' ] time ] command ... ]
  time
    : <INTEGER> [ ':' <INTEGER> ... ]
  command
    : <TEXT-COMMAND>
    : <TMC-STATEMENT>

A.2: TMCALGO Lexical Syntax

<TEXT-COMMAND>
A text command is a written instrument command prefixed by a right angle-bracket (>). The syntax must match that of the command client/server pair. For example:
              > Lamp On
<TMC-STATEMENT>
As you might guess, a TMC statement bracketed by, well, brackets ([ ]). The syntax is not checked until TMC gets it. For example:
              [ validate lamp_is_on; ]
<INTEGER>
An integer consists of one or more digits.
<NAME>
A name is a unique C-style symbol (begins with a letter and consists of letters, numbers and/or underscore characters) used to identify the state.

Return to Manuals Guide (c)1995 Norton T. Allen