Help: Tell latex to use a small font for cmake-language.7 productions
This commit is contained in:
parent
20c5f4fbd9
commit
79349ed8fc
|
@ -79,6 +79,10 @@ A CMake Language source file consists of zero or more
|
||||||
`Command Invocations`_ separated by newlines and optionally
|
`Command Invocations`_ separated by newlines and optionally
|
||||||
spaces and `Comments`_:
|
spaces and `Comments`_:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
file: `file_element`*
|
file: `file_element`*
|
||||||
file_element: `command_invocation` `line_ending` |
|
file_element: `command_invocation` `line_ending` |
|
||||||
|
@ -87,6 +91,10 @@ spaces and `Comments`_:
|
||||||
space: <match '[ \t]+'>
|
space: <match '[ \t]+'>
|
||||||
newline: <match '\n'>
|
newline: <match '\n'>
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
Note that any source file line not inside `Command Arguments`_ or
|
Note that any source file line not inside `Command Arguments`_ or
|
||||||
a `Bracket Comment`_ can end in a `Line Comment`_.
|
a `Bracket Comment`_ can end in a `Line Comment`_.
|
||||||
|
|
||||||
|
@ -98,6 +106,10 @@ Command Invocations
|
||||||
A *command invocation* is a name followed by paren-enclosed arguments
|
A *command invocation* is a name followed by paren-enclosed arguments
|
||||||
separated by whitespace:
|
separated by whitespace:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
command_invocation: `space`* `identifier` `space`* '(' `arguments` ')'
|
command_invocation: `space`* `identifier` `space`* '(' `arguments` ')'
|
||||||
identifier: <match '[A-Za-z_][A-Za-z0-9_]*'>
|
identifier: <match '[A-Za-z_][A-Za-z0-9_]*'>
|
||||||
|
@ -106,6 +118,10 @@ separated by whitespace:
|
||||||
: `separation`* '(' `arguments` ')'
|
: `separation`* '(' `arguments` ')'
|
||||||
separation: `space` | `line_ending`
|
separation: `space` | `line_ending`
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
@ -137,9 +153,17 @@ Command Arguments
|
||||||
|
|
||||||
There are three types of arguments within `Command Invocations`_:
|
There are three types of arguments within `Command Invocations`_:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
argument: `bracket_argument` | `quoted_argument` | `unquoted_argument`
|
argument: `bracket_argument` | `quoted_argument` | `unquoted_argument`
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
.. _`Bracket Argument`:
|
.. _`Bracket Argument`:
|
||||||
|
|
||||||
Bracket Argument
|
Bracket Argument
|
||||||
|
@ -149,6 +173,10 @@ A *bracket argument*, inspired by `Lua`_ long bracket syntax,
|
||||||
encloses content between opening and closing "brackets" of the
|
encloses content between opening and closing "brackets" of the
|
||||||
same length:
|
same length:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
bracket_argument: `bracket_open` `bracket_content` `bracket_close`
|
bracket_argument: `bracket_open` `bracket_content` `bracket_close`
|
||||||
bracket_open: '[' '='{len} '['
|
bracket_open: '[' '='{len} '['
|
||||||
|
@ -156,6 +184,10 @@ same length:
|
||||||
: of the same {len} as the `bracket_open`>
|
: of the same {len} as the `bracket_open`>
|
||||||
bracket_close: ']' '='{len} ']'
|
bracket_close: ']' '='{len} ']'
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
An opening bracket of length *len >= 0* is written ``[`` followed
|
An opening bracket of length *len >= 0* is written ``[`` followed
|
||||||
by *len* ``=`` followed by ``[`` and the corresponding closing
|
by *len* ``=`` followed by ``[`` and the corresponding closing
|
||||||
bracket is written ``]`` followed by *len* ``=`` followed by ``]``.
|
bracket is written ``]`` followed by *len* ``=`` followed by ``]``.
|
||||||
|
@ -197,6 +229,10 @@ Quoted Argument
|
||||||
A *quoted argument* encloses content between opening and closing
|
A *quoted argument* encloses content between opening and closing
|
||||||
double-quote characters:
|
double-quote characters:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
quoted_argument: '"' `quoted_element`* '"'
|
quoted_argument: '"' `quoted_element`* '"'
|
||||||
quoted_element: <any character except '\' or '"'> |
|
quoted_element: <any character except '\' or '"'> |
|
||||||
|
@ -204,6 +240,10 @@ double-quote characters:
|
||||||
: `quoted_continuation`
|
: `quoted_continuation`
|
||||||
quoted_continuation: '\' `newline`
|
quoted_continuation: '\' `newline`
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
Quoted argument content consists of all text between opening and
|
Quoted argument content consists of all text between opening and
|
||||||
closing quotes. Both `Escape Sequences`_ and `Variable References`_
|
closing quotes. Both `Escape Sequences`_ and `Variable References`_
|
||||||
are evaluated. A quoted argument is always given to the command
|
are evaluated. A quoted argument is always given to the command
|
||||||
|
@ -246,12 +286,20 @@ An *unquoted argument* is not enclosed by any quoting syntax.
|
||||||
It may not contain any whitespace, ``(``, ``)``, ``#``, ``"``, or ``\``
|
It may not contain any whitespace, ``(``, ``)``, ``#``, ``"``, or ``\``
|
||||||
except when escaped by a backslash:
|
except when escaped by a backslash:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
unquoted_argument: `unquoted_element`+ | `unquoted_legacy`
|
unquoted_argument: `unquoted_element`+ | `unquoted_legacy`
|
||||||
unquoted_element: <any character except whitespace or one of '()#"\'> |
|
unquoted_element: <any character except whitespace or one of '()#"\'> |
|
||||||
: `escape_sequence`
|
: `escape_sequence`
|
||||||
unquoted_legacy: <see note in text>
|
unquoted_legacy: <see note in text>
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
Unquoted argument content consists of all text in a contiguous block
|
Unquoted argument content consists of all text in a contiguous block
|
||||||
of allowed or escaped characters. Both `Escape Sequences`_ and
|
of allowed or escaped characters. Both `Escape Sequences`_ and
|
||||||
`Variable References`_ are evaluated. The resulting value is divided
|
`Variable References`_ are evaluated. The resulting value is divided
|
||||||
|
@ -294,12 +342,20 @@ Escape Sequences
|
||||||
|
|
||||||
An *escape sequence* is a ``\`` followed by one character:
|
An *escape sequence* is a ``\`` followed by one character:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
escape_sequence: `escape_identity` | `escape_encoded` | `escape_semicolon`
|
escape_sequence: `escape_identity` | `escape_encoded` | `escape_semicolon`
|
||||||
escape_identity: '\' <match '[^A-Za-z0-9;]'>
|
escape_identity: '\' <match '[^A-Za-z0-9;]'>
|
||||||
escape_encoded: '\t' | '\r' | '\n'
|
escape_encoded: '\t' | '\r' | '\n'
|
||||||
escape_semicolon: '\;'
|
escape_semicolon: '\;'
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
A ``\`` followed by a non-alphanumeric character simply encodes the literal
|
A ``\`` followed by a non-alphanumeric character simply encodes the literal
|
||||||
character without interpreting it as syntax. A ``\t``, ``\r``, or ``\n``
|
character without interpreting it as syntax. A ``\t``, ``\r``, or ``\n``
|
||||||
encodes a tab, carriage return, or newline character, respectively. A ``\;``
|
encodes a tab, carriage return, or newline character, respectively. A ``\;``
|
||||||
|
@ -348,9 +404,17 @@ Bracket Comment
|
||||||
A ``#`` immediately followed by a `Bracket Argument`_ forms a
|
A ``#`` immediately followed by a `Bracket Argument`_ forms a
|
||||||
*bracket comment* consisting of the entire bracket enclosure:
|
*bracket comment* consisting of the entire bracket enclosure:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
bracket_comment: '#' `bracket_argument`
|
bracket_comment: '#' `bracket_argument`
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
@ -371,10 +435,18 @@ Line Comment
|
||||||
A ``#`` not immediately followed by a `Bracket Argument`_ forms a
|
A ``#`` not immediately followed by a `Bracket Argument`_ forms a
|
||||||
*line comment* that runs until the end of the line:
|
*line comment* that runs until the end of the line:
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
|
||||||
.. productionlist::
|
.. productionlist::
|
||||||
line_comment: '#' <any text not starting in a `bracket_argument`
|
line_comment: '#' <any text not starting in a `bracket_argument`
|
||||||
: and not containing a `newline`>
|
: and not containing a `newline`>
|
||||||
|
|
||||||
|
.. raw:: latex
|
||||||
|
|
||||||
|
\end{small}
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
Loading…
Reference in New Issue