contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Precedence of pattern operations
Prerequisite Concepts      

Parentheses must be used to change the precedence of an operation. The following list shows the precedence of all pattern operations when there are no parentheses, starting with the highest precedence:

  1. ul
  2. optionality, repetition, and general occurrence operators ("?", "*", "+", and "{"..."}")
  3. entity-type prefixes (cdata, text, etc)
  4. pattern-variable assignments (using =>)
  5. sequences (a pattern followed by a pattern, etc)
  6. lookahead and lookahead ! (lookahead not)
  7. | (or)

When a lower-precedence operation is embedded within a higher-precedence operation, the precedence of pattern operations requires parentheses, as follows:

This code sample illustrates the precedence of pattern operations:

  translate "%n" digit => key-digit
            lookahead text letter+ space ! ul "key" "word"? |
            sdata "[sect]" lookahead "." ! " " |
            digit+ => number
It is interpreted as if it were entered:
  translate (("%n" (digit => key-digit))
             lookahead ((text (letter+)) space)
                ! ((ul "key") ("word"?))) |
            ((sdata "[sect]") lookahead "." ! " ") |
            ((digit+) => number)

Prerequisite Concepts
     Pattern matching
 
   
----

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:00:50 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.