Merge pull request #2501 from xexyl/vanb93-fmt-code
Format improvements in 1993/vanb/index.html
This commit is contained in:
2 files changed
+56
-26
No files matched your search
+27
-14
@@ -39,14 +39,12 @@ What happens if you use something other than valid digits?
|
|||||||
|
|
||||||
The octal expression may contain:
|
The octal expression may contain:
|
||||||
|
|
||||||
```
|
- unary operators: `+`, `-`
|
||||||
unary operators: +, -
|
- binary operators: `+`, `-`, `*`, `/`, `%`
|
||||||
binary operators +, -, *, /, %
|
- hex numbers: `x` or `X` followed by hex digits
|
||||||
hex numbers: x or X followed by hex digits
|
- decimal numbers: `d` or `D` followed by decimal digits
|
||||||
decimal numbers: d or D followed by decimal digits
|
- octal numbers: octal digits
|
||||||
octal numbers: octal digits
|
- grouping: `()`
|
||||||
grouping: ()
|
|
||||||
```
|
|
||||||
|
|
||||||
No spaces are allowed in the expression. To avoid shell expansion,
|
No spaces are allowed in the expression. To avoid shell expansion,
|
||||||
one should surround the expression in single quotes.
|
one should surround the expression in single quotes.
|
||||||
@@ -105,14 +103,29 @@ Here's the grammar (`'e'` denotes the empty string) :
|
|||||||
|
|
||||||
```
|
```
|
||||||
<E> ::= <T><E'>
|
<E> ::= <T><E'>
|
||||||
<E'> ::= +<T><E'> | -<T><E'> | e
|
<E'> ::= +<T><E'> |
|
||||||
|
-<T><E'> | e
|
||||||
<T> ::= <F><T'>
|
<T> ::= <F><T'>
|
||||||
<T'> ::= *<F><T'> | /<F><T'> | %<F><T'> | e
|
<T'> ::= *<F><T'> |
|
||||||
<F> ::= +<F> | -<F> | (<E><C> | d<D> | D<D> | x<X> | X<X> | <O>
|
/<F><T'> |
|
||||||
|
%<F><T'> | e
|
||||||
|
<F> ::= +<F> |
|
||||||
|
-<F> |
|
||||||
|
(<E><C> |
|
||||||
|
d<D> |
|
||||||
|
D<D> |
|
||||||
|
x<X> |
|
||||||
|
X<X> |
|
||||||
|
<O>
|
||||||
<C> ::= )
|
<C> ::= )
|
||||||
<D> ::= [0-9]<D> | e
|
<D> ::= [0-9]<D> |
|
||||||
<X> ::= [0-9]<X> | [A-F]<X> | [a-f]<X> | e
|
e
|
||||||
<O> ::= [0-7]<O> | e
|
<X> ::= [0-9]<X> |
|
||||||
|
[A-F]<X> |
|
||||||
|
[a-f]<X> |
|
||||||
|
e
|
||||||
|
<O> ::= [0-7]<O> |
|
||||||
|
e
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's how the grammar nonterminals map to octal state numbers:
|
Here's how the grammar nonterminals map to octal state numbers:
|
||||||
|
|||||||
+29
-12
@@ -416,12 +416,14 @@ hexadecimal and decimal numbers.</p>
|
|||||||
<p>What happens if you use something other than valid digits?</p>
|
<p>What happens if you use something other than valid digits?</p>
|
||||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||||
<p>The octal expression may contain:</p>
|
<p>The octal expression may contain:</p>
|
||||||
<pre><code> unary operators: +, -
|
<ul>
|
||||||
binary operators +, -, *, /, %
|
<li>unary operators: <code>+</code>, <code>-</code></li>
|
||||||
hex numbers: x or X followed by hex digits
|
<li>binary operators: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>, <code>%</code></li>
|
||||||
decimal numbers: d or D followed by decimal digits
|
<li>hex numbers: <code>x</code> or <code>X</code> followed by hex digits</li>
|
||||||
octal numbers: octal digits
|
<li>decimal numbers: <code>d</code> or <code>D</code> followed by decimal digits</li>
|
||||||
grouping: ()</code></pre>
|
<li>octal numbers: octal digits</li>
|
||||||
|
<li>grouping: <code>()</code></li>
|
||||||
|
</ul>
|
||||||
<p>No spaces are allowed in the expression. To avoid shell expansion,
|
<p>No spaces are allowed in the expression. To avoid shell expansion,
|
||||||
one should surround the expression in single quotes.</p>
|
one should surround the expression in single quotes.</p>
|
||||||
<p>It is a good thing that this program consists of only one
|
<p>It is a good thing that this program consists of only one
|
||||||
@@ -457,14 +459,29 @@ what grammar non-terminal to parse. <code>**O7</code> is the next character.
|
|||||||
involving <code>**O7</code> and octal constants are looking for certain characters.</p>
|
involving <code>**O7</code> and octal constants are looking for certain characters.</p>
|
||||||
<p>Here’s the grammar (<code>'e'</code> denotes the empty string) :</p>
|
<p>Here’s the grammar (<code>'e'</code> denotes the empty string) :</p>
|
||||||
<pre><code> <E> ::= <T><E'>
|
<pre><code> <E> ::= <T><E'>
|
||||||
<E'> ::= +<T><E'> | -<T><E'> | e
|
<E'> ::= +<T><E'> |
|
||||||
|
-<T><E'> | e
|
||||||
<T> ::= <F><T'>
|
<T> ::= <F><T'>
|
||||||
<T'> ::= *<F><T'> | /<F><T'> | %<F><T'> | e
|
<T'> ::= *<F><T'> |
|
||||||
<F> ::= +<F> | -<F> | (<E><C> | d<D> | D<D> | x<X> | X<X> | <O>
|
/<F><T'> |
|
||||||
|
%<F><T'> | e
|
||||||
|
<F> ::= +<F> |
|
||||||
|
-<F> |
|
||||||
|
(<E><C> |
|
||||||
|
d<D> |
|
||||||
|
D<D> |
|
||||||
|
x<X> |
|
||||||
|
X<X> |
|
||||||
|
<O>
|
||||||
<C> ::= )
|
<C> ::= )
|
||||||
<D> ::= [0-9]<D> | e
|
<D> ::= [0-9]<D> |
|
||||||
<X> ::= [0-9]<X> | [A-F]<X> | [a-f]<X> | e
|
e
|
||||||
<O> ::= [0-7]<O> | e</code></pre>
|
<X> ::= [0-9]<X> |
|
||||||
|
[A-F]<X> |
|
||||||
|
[a-f]<X> |
|
||||||
|
e
|
||||||
|
<O> ::= [0-7]<O> |
|
||||||
|
e</code></pre>
|
||||||
<p>Here’s how the grammar nonterminals map to octal state numbers:</p>
|
<p>Here’s how the grammar nonterminals map to octal state numbers:</p>
|
||||||
<pre><code> <E> is 012
|
<pre><code> <E> is 012
|
||||||
<E'> is 011
|
<E'> is 011
|
||||||
|
|||||||
Reference in new issue
Block a user