Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

release candidate changes: without-mysql/postgres working

  • Loading branch information...
commit 2677024020cd5ea1d619020758b220aed75d3e19 1 parent 1465d27
@kburtch authored
16 ChangeLog
@@ -113,3 +113,19 @@ numerics.sdbm_hash_of. Backported from Bush 2.0.
48. New: New examples: gray.sp
+49. New: pragma software_model and System.Script_Software_Model - set and read
+the software model name in a running script
+50. Fix: pragma annotate( see also,... ) now pragma annotate( see_also,...)
+51. Fix: no longer auto-declare identifiers containing a period.
+52. Fix: semicolon( ';' ) as a command name produces a "statement expected"
+error instead of being treated as a legitimate command name.
+53. Fix: without-mysql/without-postgres - configure substitutes correct libraries im
+54. Change: cd displays "cannot access" rather than "no such path", bringing
+it in line with Bash but also more accurate error message.
1  INSTALL
@@ -72,6 +72,7 @@ The following software packages are required for SparForte:
- Debian/Linux - apt-get install package-name (visit
for a list of available packages)
- FreeBSD - pkg_add package-name
+ - Pre-build versions of SDL_image are available from
The package name depends on your operating system. For example:
2  TODO
@@ -56,6 +56,8 @@ ISSUES (AdaScript)
- enumerateds should be upper-case, if this doesn't conflict with type-
- byte code changed to support more compressed reserved words
+ - vim syntax - $$ doesn't work
+ - unreachable code error doesn't indent token hilight properly
* assignments
- naturals and positives compatibility (intTypesOK) not handled at
42 doc/cont_roadmap.html
@@ -58,23 +58,37 @@
BUSH to SparForte.</p>
<p>Introduce integer type-casting.</p>
-<h3>Milestone 1</h3>
+<h3>SparForte 1.3</h3>
-<p>Remove critical barriers to scaling.</p>
-<p>Add bindings to as many standard Ada subroutines as possible.</p>
-<p>Include a facility for loading external source files.</p>
-<p>Permit multiple database connections.</p>
+<p>Remove barriers to scale: JSON for inter-langauge communication, include files, unit testing features.</p>
+<p>Complete documentation redesign: built-in packages cleanup, indexing.</p>
<p>Clean up regression testsuite.</p>
+<h3>Milestone 1</h3>
+<p>Remove barriers to scale: Permit multiple database connections, persistent connections and/or connection pooling.</p>
+<p>Finish backporting Bush 2.0 built-in packages into SparForte, including gnat.cgi.</p>
+<p>Symbol table redesign: function/procedure callbacks.</p>
+<p>Symbol table redesign: fix enumerated types.</p>
+<p>Architecture features: apply software_model to error checking.</p>
<h3>Milestone 2</h3>
-<p>Redesign the symbol table. Have true namespaces for symbols.</p>
+<p>Symbol table redesign: array-based storage.</p>
+<p>Symbol table redesign: true namespaces.</p>
+<p>Add bindings to as many standard Ada subroutines as possible.</p>
+<h3>Milestone 3</h3>
<p>Separate out a libspar library.</p>
<p>Improve database support for sophisticated applications</p>
-<h3>Milestone 3</h3>
+<p>CGI features: REST support, REST built-in package.</p>
+<h3>Milestone 4</h3>
<p>Exception handling</p>
@@ -82,16 +96,22 @@
-<h3>Milestone 4</h3>
+<h3>Milestone 5</h3>
-<p>User packages</p>
+<p>Symbol table redesign: User packages</p>
+<p>Symbol table redesign: Objects</p>
-<h3>Milestone 5</h3>
+<p>Symbol table redesign: Linked Lists</p>
+<p>Symbol table redesign: Programming by Contract</p>
+<h3>Milestone 6</h3>
<p>Performance Enhancements</p>
<h3>Other Important Tasks</h3>
<p>Internationalization / UTF charset support</p>
5 doc/pkg_system.html
@@ -58,6 +58,7 @@
System.Max_Base_Digits System.Default_Bit_Order
System.Max_Mantissa System.Login_Shell
System.Restricted_Shell System.Script_License
+ System.Script_Software_Model
<div class="code_caption">
@@ -128,6 +129,10 @@
<b>System.Script_License</b> - (string) the license name set by pragma
license (or empty string if none)</li>
+<b>System.Script_Software</b> - (string) the software model name set by pragma
+software_model (or empty string if none)</li>
<p>SparForte is case-sensitve.&nbsp; "system.system_name" is not the same as "System.System_Name".</p>
<p><tt>=&gt; ? System.Memory_Size</tt>
37 doc/ref_pragmas.html
@@ -73,6 +73,7 @@
<b>pragma</b> restriction( no_memcache )
<b>pragma</b> restriction( no_mysql_database )
<b>pragma</b> restriction( no_postgresql_database )
+ <b>pragma</b> software_model( model_name )
<b>pragma</b> template( css|html|js|json|text|wml|xml [, path] )
<b>pragma</b> test( `commands` )
<b>pragma</b> test_result( condition )
@@ -127,7 +128,9 @@
If extra exists, it is a string further describing the license (for example,
commercial/"trial license" or commercial/"15 users". The extra string
-can also be a URL to a complex license.<br>
+can also be a URL to a complex license.
+Only one license is permitted. The name can be read from the
+System package.<br>
<u>GCC Ada</u>: unrestricted, gpl and unrestricted are recognized by Ada. It
doesn't support the extra string. It treats these as levels and will
try to validate license compatibility where possible.</li>
@@ -157,8 +160,36 @@
<li> <b>pragma restriction( no_postgresql_database )</b> - disable
connections to a PostgreSQL database. Doesn't prevent the psql client or
other programs from using PostgreSQL.</li>
+ <li> <b>pragma software_model( model_name )</b> - declare the general
+software pattern or model best describing this script. model_name can
+<li><b>application_desktop</b> - a mouse-and-windows application</li>
+<li><b>application_mobile</b> - application for a small device</li>
+<li><b>application_realtime</b> - an application with strict time constraints</li>
+<li><b>application_realtime_ravenscar</b> - an application with strict time constraints adhering to the Ravenscar model</li>
+<li><b>daemon</b> - a server that is not an HTTP server</li>
+<li><b>daemon_proxy</b> - a server proxy that is not an HTTP proxy</li>
+<li><b>http_framework</b> - a web development library</li>
+<li><b>http_service_external</b> - public facing web service</li>
+<li><b>http_service_internal</b> - private web service</li>
+<li><b>http_site_external</b> - public facing web site or page</li>
+<li><b>http_site_internal</b> - private/intranet web site or page</li>
+<li><b>http_proxy</b> - a web service to direct or cache requests</li>
+<li><b>http_form</b> - a web script to do data entry</li>
+<li><b>package</b> - a library</li>
+<li><b>shell_batch</b> - a script to control a process</li>
+<li><b>shell_filter_script</b> - a script that uses standard input and output to transform data</li>
+<li><b>shell_report_script</b> - a script generating text reports</li>
+<li><b>shell_script</b> - that is, a command script</li>
+<li><b>multimedia</b> - media players or games</li>
+<li><b>etl</b> - extract, transform, load. that is, data conversion</li>
+<li><b>monitor</b> - a service that monitors activity</li>
+<li><b>driver</b> - a device driver</li>
+Only one software model is permitted. The name can be read from the
+System package.<br>
<h4>Debugging Pragmas</h4>
<p>Interpreter directives used to investigate problems in the source
@@ -227,7 +258,7 @@
<li><b>modified</b> - when the script was last modified</li>
<li><b>param</b> - description of a parameter to the script</li>
<li><b>return</b> - return value</li>
-<li><b>see also</b> - a reference to another document or script</li>
+<li><b>see_also</b> - a reference to another document or script</li>
<li><b>summary</b> - a short description of what the script does</li>
<li><b>todo</b> - unfinished work</li>
<li><b>version</b> - the version of the script</li>
5 src/GNUmakefile.orig
# For SDL, sdl_config is not always available.
# Libraries and Paths
@@ -30,7 +33,7 @@ INCLUDE=-I./adacgi-1.6/ -I./apq-2.1/ -I./pegasock/ ${SDLINCL} ${ADAVOXINCL}
INCLUDE_BIND=-I./adacgi-1.6/ -I./apq-2.1/ ${ADAVOXINCL} -I./pegasock/
#LIBS=-L`pg_config --libdir` -L./apq-1.92/ -lpq -lSDL ${PTHREAD_LIBS}
#LIBS=-L`pg_config --libdir` -L./apq-2.1/ ./apq-2.1/c_mysql.o -l SDL -l SDL_image ${PTHREAD_LIBS}
-LIBS=-L`pg_config --libdir` `mysql_config --libs` -L./apq-2.1/ ./apq-2.1/c_mysql.o -L./pegasock/ ./pegasock/c_tinyserve.o ./pegasock/c_os.o ${SDLLIBS}
+LIBS=-L ${PGLIBS} ${MYSQLLIBS} -L./apq-2.1/ ./apq-2.1/c_mysql.o -L./pegasock/ ./pegasock/c_tinyserve.o ./pegasock/c_os.o ${SDLLIBS}
# c_mysql.o missing in APQ 2.1 library
# Make Rules Start
2  src/builtins.adb.orig
@@ -188,7 +188,7 @@ begin
identifiers( pwd ).value := current_working_directory;
end if;
- err( "No such path '" & to_string( path ) & "'" );
+ err( "cannot access '" & to_string( path ) & "'" );
end if;
if showPath then
put_line( current_working_directory );
10 src/parser.adb.orig
@@ -7250,6 +7250,8 @@ begin
-- a script could be a single comment without a ;
elsif Token = symbol_t and identifiers( token ).value = "@" then
err( "@ must appear after a command or in an assignment expression" );
+ elsif Token = symbol_t and identifiers( token ).value = ";" then
+ err( "statement expected" );
elsif not identifiers( Token ).deleted and identifiers( Token ).list then -- array variable
resumeScanning( cmdStart ); -- assume array assignment
ParseAssignment; -- looks like a AdaScript command
@@ -7539,6 +7541,14 @@ begin
-- fix spacing is not smart enough to remove double spaces inside a cmd.
-- the cmd may have quotes and spaces may be significant
fixSpacing( command, inside => false ); -- strip leading/trailing spaces
+ -- add an ending ; if one is missing.
+ --
+ -- in order to do this, we have to take into account a comment (if any).
+ -- however, we haven't tokenized the string yet so how do we tell if
+ -- a double-minus is quoted or not? it's not possible to do it easily.
+ -- I could add a LF plus ; but then it will appear to be a missing
+ -- statement if a ; is actually there before a comment.
+ -- so we'll just check for an ending ; and add one if it is not there.
if length( command ) > 0 then -- something there?
if Element( command, length( command ) ) /= ';' then -- missing ending ;?
command := command & ";"; -- it's implicit so add it
Please sign in to comment.
Something went wrong with that request. Please try again.