Skip to content

Commit

Permalink
Tweak layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rossberg committed Nov 10, 2023
1 parent d4d10c4 commit 7d69731
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
5 changes: 0 additions & 5 deletions document/legacy/exceptions/appendix/index-instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
"""

FOOTER = """\
.. note::
Multi-byte opcodes are given with the shortest possible encoding in the table.
However, what is following the first byte is actually a :ref:`u32 <binary-uint>` with variable-length encoding
and consequently has multiple possible representations.\
"""

COLUMNS = [
Expand Down
10 changes: 6 additions & 4 deletions document/legacy/exceptions/binary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ Control Instructions
.. _binary-rethrow:

.. math::
\begin{array}{llcllll}
\begin{array}{@{}llcllll}
\production{instruction} & \Binstr &::=& \dots \\ &&|&
\hex{06}~~\X{bt}{:}\Bblocktype~~(\X{in}_1{:}\Binstr)^\ast~~
(\hex{07}~~x{:}\Btagidx~~(\X{in}_2{:}\Binstr)^\ast)^\ast~~
\hex{06}~~\X{bt}{:}\Bblocktype~~
(\X{in}_1{:}\Binstr)^\ast~~ \\&&&
(\hex{07}~~x{:}\Btagidx~~(\X{in}_2{:}\Binstr)^\ast)^\ast~~ \\&&&
(\hex{19}~~(\X{in}_3{:}\Binstr)^\ast)^?~~\hex{0B}
&\Rightarrow& \TRY~\X{bt}~\X{in}_1^\ast~(\CATCH~x~\X{in}_2^\ast)^\ast~
(\CATCHALL~\X{in}_3^\ast)^?\END \\ &&|&
\hex{06}~~\X{bt}{:}\Bblocktype~~(\X{in}{:}\Binstr)^\ast~~\hex{18}~~l{:}\Blabelidx
\hex{06}~~\X{bt}{:}\Bblocktype~~(\X{in}{:}\Binstr)^\ast~~ \\&&&
\hex{18}~~l{:}\Blabelidx
&\Rightarrow& \TRY~\X{bt}~\X{in}^\ast~\DELEGATE~l \\ &&|&
\hex{09}~~l{:}\Blabelidx &\Rightarrow& \RETHROW~l \\
\end{array}
5 changes: 4 additions & 1 deletion document/legacy/exceptions/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@

# Fancy chapters [Bjarne, Sonny, Lenny, Glenn, Conny, Rejne]
'fncychap': '\\usepackage[Sonny]{fncychap}',

# Allow chapters to start on even pages
'extraclassoptions': 'openany'
}

# Grouping the document tree into LaTeX files. List of tuples
Expand All @@ -311,7 +314,7 @@
name + '.tex',
title,
author + '\\\\ \\hfill\\large ' + editor,
'manual'
'howto'
),
]

Expand Down
3 changes: 1 addition & 2 deletions document/legacy/exceptions/exec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Stack

.. _syntax-handler:

Exception Handlers
..................
**Exception Handlers**

Legacy exception handlers are installed by |TRY| instructions.
Instead of branch labels, their catch clauses have instruction blocks associated with them.
Expand Down
13 changes: 7 additions & 6 deletions document/legacy/exceptions/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ The label identifier on a structured control instruction may optionally be repea
pseudo instructions, to indicate the matching delimiters.

.. math::
\begin{array}{llclll}
\begin{array}{@{}llclll}
\production{block instruction} & \Tblockinstr_I &::=& \dots \\ &&|&
\text{try}~~I'{:}\Tlabel_I~~\X{bt}{:}\Tblocktype~~(\X{in}_1{:}\Tinstr_{I'})^\ast~~
(\text{catch}~~\Tid_1^?~~x{:}\Ttagidx_I~~(\X{in}_2{:}\Tinstr_{I'})^\ast)^\ast~~
\\ &&&\qquad\qquad (\text{catch\_all}~~\Tid_1^?~~(\X{in}_3{:}\Tinstr_{I'})^\ast)^?~~\text{end}~~\Tid_2^?
\text{try}~~I'{:}\Tlabel_I~~\X{bt}{:}\Tblocktype~~(\X{in}_1{:}\Tinstr_{I'})^\ast~~\\&&&
(\text{catch}~~\Tid_1^?~~x{:}\Ttagidx_I~~(\X{in}_2{:}\Tinstr_{I'})^\ast)^\ast~~ \\&&&
(\text{catch\_all}~~\Tid_1^?~~(\X{in}_3{:}\Tinstr_{I'})^\ast)^?~~ \\&&&
\text{end}~~\Tid_2^?
\\ &&&\qquad \Rightarrow\quad \TRY~\X{bt}~\X{in}_1^\ast~(\CATCH~x~\X{in}_2^\ast)^\ast~(\CATCHALL~\X{in}_3^\ast)^?~\END
\\ &&&\qquad\qquad (\iff \Tid_1^? = \epsilon \vee \Tid_1^? = \Tlabel, \Tid_2^? = \epsilon \vee \Tid_2^? = \Tlabel) \\ &&|&
\text{try}~~I'{:}\Tlabel_I~~\X{bt}{:}\Tblocktype~~(\X{in}_1{:}\Tinstr_{I'})^\ast
~~\text{delegate}~~l{:}\Tlabelidx_I~~\X{l}{:}\Tlabelidx_I
\text{try}~~I'{:}\Tlabel_I~~\X{bt}{:}\Tblocktype~~(\X{in}_1{:}\Tinstr_{I'})^\ast~~ \\&&&
\text{delegate}~~l{:}\Tlabelidx_I~~\X{l}{:}\Tlabelidx_I
\\ &&&\qquad \Rightarrow\quad \TRY~\X{bt}~\X{in}_1^\ast~\DELEGATE~l
\qquad\quad~~ (\iff \Tid^? = \epsilon \vee \Tid^? = \Tlabel) \\
\production{plain instruction} & \Tplaininstr_I &::=& \dots \\ &&|&
Expand Down
1 change: 0 additions & 1 deletion document/legacy/exceptions/valid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Existing typing rules are adjusted as follows:
Instructions
------------


.. _valid-instr-control:

Control Instructions
Expand Down

0 comments on commit 7d69731

Please sign in to comment.