diff --git a/docgenerator/data.json b/docgenerator/data.json index 75b5b416..15e723e9 100644 --- a/docgenerator/data.json +++ b/docgenerator/data.json @@ -14939,17 +14939,6 @@ "order": 1 } }, -{ - "model": "spec.staticpage", - "pk": 1, - "fields": { - "title": "Parsing microsyntaxes", - "url": "/infrastructure/parsing-microsyntaxes/", - "collection": 1, - "order": 1, - "content": "

Various parts of MNX use microsyntaxes, which require you to parse their contents. This parsing is separate from XML parsing.

\r\n\r\n

In this section, we provide some general information on how to parse MNX's microsyntaxes. Each microsyntax is described in detail on its appropriate data type page, but there are some common global terms and procedures shared among microsyntaxes; these commonalities are documented here.

\r\n\r\n

ASCII digits

\r\n\r\n

The ASCII digits are the characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).

\r\n\r\n

Space characters

\r\n\r\n

The space characters are:

\r\n\r\n\r\n\r\n

Uppercase ASCII letters

\r\n\r\n

The uppercase ASCII letters are the characters in the range U+0041 LATIN CAPITAL LETTER A to U+005A LATIN CAPITAL LETTER Z.

\r\n\r\n

Collecting a sequence of characters

\r\n\r\n

This spec uses the phrase \"collect a sequence of characters\" in some of its algorithm definitions. This is effectively a subroutine, and it means the following algorithm must be run:

\r\n\r\n
    \r\n
  1. Let characters be the set of characters that can be collected.
  2. \r\n
  3. Let input and position be the same variables as those of the same name in the algorithm that invoked these steps.
  4. \r\n
  5. Let result be the empty string.
  6. \r\n
  7. While position doesn’t point past the end of input and the character at position is one of the characters, append that character to the end of result and advance position to the next character in input.
  8. \r\n
  9. Return result.
  10. \r\n
\r\n\r\n

Strictly splitting a string

\r\n\r\n

This spec uses the phrase \"strictly splitting a string\" in some of its algorithm definitions. This is effectively a subroutine, and it means the following algorithm must be run:

\r\n\r\n
    \r\n
  1. Let input be the string being parsed.
  2. \r\n
  3. Let position be a pointer into input, initially pointing at the start of the string.
  4. \r\n
  5. Let tokens be an ordered list of tokens, initially empty.
  6. \r\n
  7. While position is not past the end of input:\r\n
      \r\n
    1. Collect a sequence of characters that are not the delimiter character.
    2. \r\n
    3. Append the string collected in the previous step to tokens.
    4. \r\n
    5. Advance position to the next character in input.
    6. \r\n
    \r\n
  8. \r\n
  9. Return tokens.
  10. \r\n
\r\n\r\n

Stripping leading and trailing whitespace

\r\n\r\n

Stripping leading and trailing whitespace from a string means removing all space characters that are at the start or end of the string.

\r\n\r\n

Rational numbers

\r\n\r\n

A string is a rational number if it is either an integer, or a pair of integers separated by a U+002F SLASH whose second element is nonzero.

\r\n\r\n

The rules for parsing rational numbers are given in the following algorithm. When invoked, the steps must be followed in the order given, aborting at the first step that returns a value. This algorithm will return a pair of integers, one for the numerator and one for the denominator which must be nonzero, or an error.

\r\n\r\n
    \r\n
  1. Let input be the string being parsed.
  2. \r\n
  3. Let position be a pointer into input, initially pointing at the start of the string.
  4. \r\n
  5. Let fraction be an initially empty list of integers.
  6. \r\n
  7. Collect a sequence of characters that are space characters. These are skipped.
  8. \r\n
  9. While position is not past the end of input, and fraction contains fewer than two elements:\r\n
      \r\n
    1. Collect a sequence of characters that are not space characters, ASCII digits, U+002D HYPHEN-MINUS or U+002F SLASH characters. This skips past leading garbage.
    2. \r\n
    3. Collect a sequence of characters that are not space characters or U+002F SLASH, and let unparsed number be the result.
    4. \r\n
    5. Let number be the result of parsing unparsed number using the rules for parsing signed integers.
    6. \r\n
    7. If number is an error, set number to zero.
    8. \r\n
    9. Append number to fraction.
    10. \r\n
    11. Collect a sequence of characters that are space characters or U+002F SLASH.
    12. \r\n
    \r\n
  10. \r\n
  11. If fraction has no elements, return zero.
  12. \r\n
  13. If fraction has only one element, append 1 to fraction.
  14. \r\n
  15. Return the first element of fraction as the numerator and the second element of fraction as the denominator.
  16. \r\n
" - } -}, { "model": "spec.staticpage", "pk": 2, diff --git a/docs/infrastructure/index.html b/docs/infrastructure/index.html index 5eaaea58..df2a59db 100644 --- a/docs/infrastructure/index.html +++ b/docs/infrastructure/index.html @@ -48,8 +48,6 @@

Infrastructure