summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-11-02 08:40:53 +1100
committerJed Barber <jjbarber@y7mail.com>2017-11-02 08:40:53 +1100
commitb5c543f7639a8a545ae7c627e594ce4fcdbd6435 (patch)
treec9ee7685717d2869d06f5148c16c42fac1f5ba1a
parente6a81730d57d52f5b07c5269d61cfbed4a7e91bb (diff)
Further functional spec workHEADmaster
-rw-r--r--doc/functional_spec.html103
1 files changed, 84 insertions, 19 deletions
diff --git a/doc/functional_spec.html b/doc/functional_spec.html
index 855aeee..3d84da4 100644
--- a/doc/functional_spec.html
+++ b/doc/functional_spec.html
@@ -12,7 +12,8 @@
<h4>Overview</h4>
<p>Mini Ada is a minimalistic, standalone, portable, libre and open source REPL,
-interpreter, JIT, and compiler for the Ada programming language.</p>
+interpreter, JIT, and compiler for the Ada programming language. In that order
+of importance.</p>
<p>This spec is not complete. Nor does it discuss algorithms and data structures
used. For those, see the technical spec.</p>
@@ -29,8 +30,9 @@ written so far. Then he uses the Mini Ada Compiler to compile his assignments.</
<p>James is an Ada developer who wants to write some software for an architecture that
doesn't have an Ada compiler targeting it yet. He downloads and uses the Mini Ada
-Interpreter as a stopgap measure, making use of it being written in Forth, which
-is an extremely simple language that has been ported everywhere.</p>
+Interpreter as a stopgap measure, making use of it being written in a language that
+has already been ported to every architecture under the sun. He does not have to wait
+for a compiler backend to be written.</p>
<p>David is a sysadmin. He wants a scripting language that minimises errors. He uses
the Mini Ada JIT to take advantage of just-in-time compilation speedups and the
@@ -55,7 +57,7 @@ it as easy to deploy as any shell interpreter.</p>
<ul>
<li>Ada 83, 95, 2005 modes</li>
<li>all optional annexes</li>
- <li>any backend aside from amd64/ELF</li>
+ <li>any JIT/compiler backend aside from amd64/ELF</li>
</ul>
<p id="tech_issue">What linking is required for FFI and interfacing with already-compiled units?</p>
@@ -65,7 +67,7 @@ it as easy to deploy as any shell interpreter.</p>
<h4>Common Elements</h4>
-<p>Command line options recognised by all four utilities:</p>
+<p>Command line options recognised by all four programs:</p>
<table>
<tr>
<th>Short</th>
@@ -92,14 +94,6 @@ it as easy to deploy as any shell interpreter.</p>
<td>Displays the relevant help message then terminates. Any additional options will be ignored.</td>
</tr>
<tr>
- <td>-x</td>
- <td></td>
- <td>none</td>
- <td>N/A</td>
- <td>N/A</td>
- <td>Ignores the first line of file input. Doesn't take effect if input is from standard input.</td>
- </tr>
- <tr>
<td>-I</td>
<td></td>
<td>required</td>
@@ -116,6 +110,24 @@ it as easy to deploy as any shell interpreter.</p>
<td>Specify library files search path.</td>
</tr>
<tr>
+ <td>-A</td>
+ <td>--annex</td>
+ <td>required</td>
+ <td>string</td>
+ <td>Any combination of the characters "abcdefghj".</td>
+ <td>Sets the language annexes that will be available during program execution. The default value is "abcdefghj"
+ which allows all supported annexes to be used. Informative annexes are not affected by this option.</td>
+ </tr>
+ <tr>
+ <td>-w</td>
+ <td>--warning</td>
+ <td>required</td>
+ <td>character/string</td>
+ <td>One of the characters "ens" or one of the strings "error", "normal", "suppress".</td>
+ <td>Sets the way warnings are to be treated by the program. Either as an error, as normal, or completely
+ suppressed.</td>
+ </tr>
+ <tr>
<td>-</td>
<td>--</td>
<td>none</td>
@@ -151,6 +163,14 @@ marepl
<th>Description</th>
</tr>
<tr>
+ <td>-x</td>
+ <td></td>
+ <td>none</td>
+ <td>N/A</td>
+ <td>N/A</td>
+ <td>Ignores the first line of file input. Doesn't take effect if input is from standard input.</td>
+ </tr>
+ <tr>
<td>-i</td>
<td>--interactive</td>
<td>none</td>
@@ -162,7 +182,7 @@ marepl
<p>The version message is:</p>
<pre>
-Mini Ada REPL [version number]
+Mini Ada REPL [version in use]
</pre>
<p>The help message is:</p>
@@ -175,10 +195,12 @@ arguments are passed to the interpreted file as command line arguments.
Options:
--version displays the REPL version number
-h --help displays this help message
--x ignores the first line of file input
-Idir specifies source files search path
-Ldir specifies library files search path
+-Aarg --annex=arg specify which language annexes will be allowed
+-warg --warning=arg how to treat warnings
- -- terminates option list
+-x ignores the first line of file input
-i --interactive forces interactive mode after interpreting a file
</pre>
@@ -188,7 +210,7 @@ is supplied to interpret, input is obtained from standard input.</p>
<p>If no file to interpret is supplied, the following message is displayed:</p>
<pre>
-Mini Ada REPL [version number]
+Mini Ada REPL [version in use]
Ada [standard in use] mode, [annexes available]
</pre>
@@ -214,11 +236,13 @@ input is then interpreted and evaluated.</p>
ok
</pre>
-<p>Otherwise, an appropriate error message is displayed.</p>
+<p>Otherwise, an appropriate error message is displayed. See section on error and warning messages for
+information on specific error messages. For the purposes of the error, only the lines of the last complete
+input are numbered, starting from one.</p>
<p>If an input file has been supplied to interpret, processing of the file proceeds as above, except without
-any messages or prompts aside from those produced by the interpretation and evaluation of the contents of the
-file.</p>
+any messages or prompts aside from error messages and those produced by the interpretation and evaluation of
+the contents of the file.</p>
<p>Interpretation is ended and control returned to the operating system when the REPL encounters the
EOF character.</p>
@@ -243,6 +267,14 @@ mai
<th>Values</th>
<th>Description</th>
</tr>
+ <tr>
+ <td>-x</td>
+ <td></td>
+ <td>none</td>
+ <td>N/A</td>
+ <td>N/A</td>
+ <td>Ignores the first line of file input. Doesn't take effect if input is from standard input.</td>
+ </tr>
</table>
<p>The first non-option command line item specifies a file to interpret and terminates the option list.
@@ -255,6 +287,20 @@ Mini Ada Interpreter [version number]
<p>The help message is:</p>
<pre>
+Usage: mai [options] [arguments]
+
+The first argument specifies a file to interpret and terminates the option list. All additional
+arguments are passed to the interpreted file as command line arguments.
+
+Options:
+ --version displays the REPL version number
+-h --help displays this help message
+-Idir specifies source files search path
+-Ldir specifies library files search path
+-Aarg --annex=arg specify which language annexes will be allowed
+-warg --warning=arg how warnings are to be treated
+- -- terminates option list
+-x ignores the first line of file input
</pre>
<p>This program expects as file input a valid compilation_unit (RM 10.1.1). The input is interpreted and
@@ -284,5 +330,24 @@ Interpreter, with the word "JIT" substituted for "Interpreter".</p>
mac
</pre>
+
+
+
+<h4>Error and Warning Messages</h4>
+
+<p>Should any of these programs encounter an error, an error message will be displayed to the standard
+error stream. This error message will consist of the following format:</p>
+<pre>
+Error at line [number], character [number]
+</pre>
+
+<p>Should any of these programs encounter a warning, a warning message will be displayed to the standard
+error stream. This warning message will consiste of the following format:</p>
+<pre>
+Warning at line [number], character [number]
+</pre>
+
+<p id="tech issue">What sorts of error/warning messages are required by the Ada specification?</p>
+
</body>
</html>