Giter Site home page Giter Site logo

kburtch / sparforte Goto Github PK

View Code? Open in Web Editor NEW
50.0 12.0 6.0 11.99 MB

Bourne shell, template engine, scripting language reliable, scalable projects. Based a ISO standard proven effective for large, mission-critical projects, SparForte is designed for fast development while, at the same time, providing easier designing, maintenance and bug removal. About 130.000 lines of code.

Home Page: https://www.sparforte.com

License: GNU General Public License v2.0

SourcePawn 6.48% Shell 1.55% C 4.37% Ada 85.96% HTML 0.97% Makefile 0.25% NSIS 0.11% Roff 0.31%
shell ada interpreted-programming-language reliable security strongly-typed elegant agile-integration side-effects safety-critical

sparforte's People

Contributors

blady-com avatar cicku avatar kburtch avatar qunying avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sparforte's Issues

build failure with freebsd; patch attached

sparforte can't possibly build on freebsd. This patch fixes one problem:

--- src/os_bindings/spar_freebsd.ads.orig       2020-03-28 23:21:57 UTC
+++ src/os_bindings/spar_freebsd.ads
@@ -653,7 +653,7 @@ pragma import( C, C_is_includable_file,
 --  True if a file exists, is readable, not world writable and has data
 -- (that is, that it has permissions for an include file)

-function C_is_secure_dir( char * path ) return boolean;
+function C_is_secure_dir( path : string ) return boolean;
 pragma import( C, C_is_secure_dir, "C_is_secure_dir" );
 --  True if a dir exists, is readable, not world writable.

Another problem is group_member function isn't available on freebsd (c_os.c) but it's used unconditionally in C_is_executable_file. That's a problem that requires opening another issue I think.

character - (dash) is a word separator

Currently the dash or (soft ?) hyphen - is considered at least in some situation, as a word separator by the interpretor. Even without space.
Names of commands not enclosed in " " can't be interpreted rightly.
If that space could be the only word separator, it would make sparforte more usable, for more users.

Tried building Sparforte with FSF GCC 13 recently?

Sparforte currently doesn't build for me since switching from GCC 11.2 to GCC 13.2

The first issue was stopped on a treat-warnings-as-errors here:

parser_memcache.adb:105:01: warning: type "aMemcacheClusterEntry" is frozen by body [enabled by default]
parser_memcache.adb:105:01: warning: an equality operator cannot be declared after this point [enabled by default]
parser_memcache.adb:110:10: warning: equality operator must be declared before type "aMemcacheClusterEntry" is frozen (RM 4.5.2 (9.8)) (Ada 2012) [enabled by default]
parser_memcache.adb:110:10: warning: equality operation may not compose [enabled by default]
parser_memcache.adb:154:01: warning: type "aMemcacheDualClusterEntry" is frozen by body [enabled by default]
parser_memcache.adb:154:01: warning: an equality operator cannot be declared after this point [enabled by default]
parser_memcache.adb:159:10: warning: equality operator must be declared before type "aMemcacheDualClusterEntry" is frozen (RM 4.5.2 (9.8)) (Ada 2012) [enabled by default]
parser_memcache.adb:159:10: warning: equality operation may not compose [enabled by default]

I got past that by adding the "-gnatd.E" flag.

But a bit further it crashed again due to a compiler ICE:

+===========================GNAT BUG DETECTED==============================+
| 13.2.0 (x86_64-raven-freebsd13) GCC error:                               |
| in gnat_to_gnu_entity, at ada/gcc-interface/decl.cc:475                  |
| Error detected at parser_pen.adb:4017:61                                 |
| Compiling parser_pen.adb                                                 |
| Please submit a bug report; see https://gcc.gnu.org/bugs/ .              |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact command that you entered.                              |
| Also include sources listed below.                                       |
+==========================================================================+

The ICE isn't the code's fault but there might be during coding choice that works around it.

In any case I would be interested to hear if these issues can be reproduced by others.

2 issues with release 2.2 (so far)

issue 1: The v2.2 tag refers to a commit "fixing conflict in todo file" (8a4d5f3) that doesn't seem to be in the master branch. Perhaps the tag was pushed but the tree was not?

issue 2: It doesn't build!

(cd /construction/sparforte/SparForte-2.2/src && /usr/bin/env SDL_CONFIG="/raven/bin/sdl-config" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 444" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" PREFIX=/raven LOCALBASE=/raven OPSYS="FreeBSD" CC="cc" CFLAGS="-pipe -O2   -I/raven/include -I/raven/include/db5" CPP="cpp" CPPFLAGS="-I/raven/include -I/raven/include/db5" LDFLAGS="-L/raven/lib -Wl,-rpath,/raven/lib -L/raven/lib/db5 -lpthread" LIBS="" CXX="c++" CXXFLAGS="" STD_DOCDIR="/raven/share/doc/sparforte" STD_EXAMPLESDIR="/raven/share/examples/sparforte" MANPREFIX="/raven/share" ADA_PROJECT_PATH="/raven/lib/gnat" F77="gfortran" FC="gfortran" PATH=/raven/libexec/ccache:/bin:/usr/bin:/raven/toolchain/gcc8/bin:/raven/toolchain/bin:/raven/sbin:/raven/bin CCACHE_DIR="/ccache"  gnatprep -DOPENGL=true -DMYSQL=true -DSOUND=true -DPOSTGRES=true -DGCGI=false -DAPQ=true -DREADLINE=true -DBDB=true scanner_res.adb.orig scanner_res.adb)
(cd /construction/sparforte/SparForte-2.2/src && /usr/bin/env SDL_CONFIG="/raven/bin/sdl-config" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 444" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" PREFIX=/raven LOCALBASE=/raven OPSYS="FreeBSD" CC="cc" CFLAGS="-pipe -O2   -I/raven/include -I/raven/include/db5" CPP="cpp" CPPFLAGS="-I/raven/include -I/raven/include/db5" LDFLAGS="-L/raven/lib -Wl,-rpath,/raven/lib -L/raven/lib/db5 -lpthread" LIBS="" CXX="c++" CXXFLAGS="" STD_DOCDIR="/raven/share/doc/sparforte" STD_EXAMPLESDIR="/raven/share/examples/sparforte" MANPREFIX="/raven/share" ADA_PROJECT_PATH="/raven/lib/gnat" F77="gfortran" FC="gfortran" PATH=/raven/libexec/ccache:/bin:/usr/bin:/raven/toolchain/gcc8/bin:/raven/toolchain/bin:/raven/sbin:/raven/bin CCACHE_DIR="/ccache"  gnatprep -DOPENGL=true -DMYSQL=true -DSOUND=true -DPOSTGRES=true -DGCGI=false -DAPQ=true -DREADLINE=true -DBDB=true parser.adb.orig parser.adb)
gnatprep: unable to find input file "parser.adb.orig"
*** Error code 4

Stop.
make: stopped in /port

The parser.adb.orig file is indeed not in the src/ directory.

Unable to build without SDL?

Hi, upon doing ./configure --prefix=/data/users/specing/install/spar --without-bdb --without-mysql --without-opengl --without-postgres --without-readline --without-sound and fixing configure enough to make it pass, then running gmake all greets me with:

gmake -C src
gmake[1]: Entering directory '/data/users/specing/programs/SparForte/src'

---------------------------------------------------------------
  Compiling C Wrappers on Kernel and OS Library Functions
  To Make SparForte Portable
---------------------------------------------------------------

gcc  -I./adacgi-1.6/  -I./pegasock/  -I/usr/include/SDL  -I./areadline/ -Wall -Werror -fstack-check -fstack-protector -O1 -D_FORTIFY_SOURCE=2 -c c_os.c
c_os.c:372:21: fatal error: SDL/SDL.h: No such file or directory
 #include <SDL/SDL.h>
                     ^
compilation terminated.
gmake[1]: *** [GNUmakefile:133: c_os.o] Error 1
gmake[1]: Leaving directory '/data/users/specing/programs/SparForte/src'
gmake: *** [GNUmakefile:12: all] Error 2

For reference, my configure fixes were the following:

diff --git a/configure b/configure
index f16d8fb..333ac6b 100755
--- a/configure
+++ b/configure
@@ -271,7 +271,7 @@ echo -n "checking for architecture (\$ARCH)... "
 if [ -z "$ARCH" ] ; then
    echo "no"
    echo -n "checking for architecture (uname -p and -m)... "
-   ARCH=`uname -p 2>/dev/null`
+   ARCH=`uname -m 2>/dev/null`
    if [ $? -ne 0 ] ; then   # Cygwin runs but says unknown
       ARCH="unknown"
    fi
@@ -353,6 +353,7 @@ CPU_FLAG="-march"
 # support -march=native but this is not yet supported on the Raspberry
 # Pi.  Apparently there are several different Debian flavours for the
 # Pi.  I've only tested it on the one using armv6l.
+printf "OS: %s, CPU_ARCH: %s\n" "$OS" "$CPU_ARCH"
 if [ "$OS" = "Linux" -a "$CPU_ARCH" = "armv6" ] ; then
    echo -n "Linux/ARM6 (assuming Raspberry Pi)"
    if test -r spar_os.ads ; then
@@ -560,6 +561,7 @@ fi
 
 echo -n "checking for libgnat (ldconfig -p, Linux)... "
 TMP=`$LDCONFIG_SUDO /sbin/ldconfig -p 2>/dev/null | grep libgnat`
+TMP="dwdwdw"
 if [ -z "$TMP" ] ; then
    echo "no"
    echo -n "checking for libgnat (ldconfig -r, FreeBSD)... "
@@ -849,6 +851,7 @@ SDLINCLTYPE=`echo "$SDLINCL" | sed 's/\ /\\\ /g;s/\//\\\\\//g'`
 # Bytes are aligned differently between 32-bit and 64-bit SDL data structures.
 # Default to 64-bit else use 32-bit.
 
+# copied manually
 echo -n "selecting SDL binding... "
 if test -r spar_os-sdl.ads ; then
    echo " (cached, make distclean to remove)";
  1. uname -p prints processor product and not architecture
  2. GNAT is not installed system-wide (but is at start of PATH)
  3. Is SDL not obsolete and superseeded by SDL2?

OS is Gentoo GNU/Linux on amd64

Some more build issues

gmake

gmake -C src
gmake[1]: Entering directory '/tmp/SparForte/src'

---------------------------------------------------------------
  Compiling C Wrappers on Kernel and OS Library Functions
  To Make SparForte Portable
---------------------------------------------------------------

gcc  -I./adacgi-1.6/  -I./pegasock/  -I/usr/include/SDL -D_GNU_SOURCE=1  -I./areadline/ -Wall -Werror -fstack-check -fstack-protector -O1 -D_FORTIFY_SOURCE=2 -c c_os.c
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
gmake[1]: *** [GNUmakefile:133: c_os.o] Error 1
gmake[1]: Leaving directory '/tmp/SparForte/src'
gmake: *** [GNUmakefile:12: all] Error 2

on 2eb28f7 + patch in #11

Issue resolved by

sed -i -e "s/-D_FORTIFY_SOURCE=2 //" src/bdb/GNUmakefile
sed -i -e "s/-D_FORTIFY_SOURCE=2 //" src/pegasock/Makefile
sed -i -e "s/-D_FORTIFY_SOURCE=2 //" src/GNUmakefile

This is due to gcc from ada-overlay on Gentoo being hardened.

MySQL does not compile

Concerns with compiling MySQL

Firstly, I think it would be nice if I could just compile without MySQL, since both fundamental functionality and compile-ability are essential to the usefulness and growing popularity of this wonderful idea and scripting kit. The problem I have right now and that is likely very common elsewhere is that MySQL does not compile and it seems that it is a source code issue.

Isn't there a pure Ada implementation of SQL? Ada and MySQL are practically cousins, so why is MySQL being loaded from the modern C libraries? If it is for some general compatibility with library changes over time, I'd rather have pure Ada rudimentary database support. Anyway, the most practical choice I have right now is to get MySQL running. Here is the failure output of the compiler:

---------------------------------------------------------------
  Making APQ (PostgreSQL/MySQL DBI)
    http://home.cogeco.ca/~ve3wwg
---------------------------------------------------------------

gmake -C apq-2.1/
gmake[2]: Entering directory '/home/micah/.devel/ada/sparforte/src/apq-2.1'
chmod u+x mysql_xcr mysql_xcr2 mysql_xcr3 mysql_incl mysql_xty mysql_linker_opti
ons
./mysql_xcr >mysql_errmsg.h
./mysql_xty >mysql_type_codes.h
gcc -Wall  -O1 -I/usr/include/mysql  mysql_generr.c -o mysql_generr
gcc -Wall  -O1 -I/usr/include/mysql  mysql_gentyp.c -o mysql_gentyp
In file included from mysql_gentyp.c:34:0:
mysql_type_codes.h: In function ‘main’:
mysql_type_codes.h:23:8: warning: missing terminating " character
   { "*/", */ },
        ^
mysql_type_codes.h:23:8: error: missing terminating " character
   { "*/", */ },
        ^~~~~~~~
mysql_type_codes.h:24:3: warning: braces around scalar initializer
   { "MYSQL_TYPE_TIMESTAMP2", MYSQL_TYPE_TIMESTAMP2 },
   ^
mysql_type_codes.h:24:3: note: (near initialization for ‘codes[17].code’)
mysql_type_codes.h:24:5: warning: initialization makes integer from pointer with
out a cast [-Wint-conversion]
   { "MYSQL_TYPE_TIMESTAMP2", MYSQL_TYPE_TIMESTAMP2 },
     ^~~~~~~~~~~~~~~~~~~~~~~
mysql_type_codes.h:24:5: note: (near initialization for ‘codes[17].code’)
mysql_type_codes.h:24:5: error: initializer element is not computable at load ti
me
mysql_type_codes.h:24:5: note: (near initialization for ‘codes[17].code’)
mysql_type_codes.h:24:30: warning: excess elements in scalar initializer
   { "MYSQL_TYPE_TIMESTAMP2", MYSQL_TYPE_TIMESTAMP2 },
                              ^~~~~~~~~~~~~~~~~~~~~
mysql_type_codes.h:24:30: note: (near initialization for ‘codes[17].code’)
mysql_type_codes.h:25:3: error: extra brace group at end of initializer
2   { "MYSQL_TYPE_DATETIME2", MYSQL_TYPE_DATETIME2 },    
   ^
mysql_type_codes.h:25:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:25:3: warning: excess elements in struct initializer
mysql_type_codes.h:25:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:26:3: error: extra brace group at end of initializer
   { "MYSQL_TYPE_TIME2", MYSQL_TYPE_TIME2 },
   ^
mysql_type_codes.h:26:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:26:3: warning: excess elements in struct initializer
mysql_type_codes.h:26:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:27:3: error: extra brace group at end of initializer
   { "MYSQL_TYPE_NEWDECIMAL", MYSQL_TYPE_NEWDECIMAL },
   ^
mysql_type_codes.h:27:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:27:3: warning: excess elements in struct initializer
mysql_type_codes.h:27:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:28:3: error: extra brace group at end of initializer
   { "MYSQL_TYPE_ENUM", MYSQL_TYPE_ENUM },
   ^
mysql_type_codes.h:32:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:32:3: warning: excess elements in struct initializer
mysql_type_codes.h:32:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:33:3: error: extra brace group at end of initializer
   { "MYSQL_TYPE_BLOB", MYSQL_TYPE_BLOB },
   ^
mysql_type_codes.h:33:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:33:3: warning: excess elements in struct initializer
mysql_type_codes.h:33:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:34:3: error: extra brace group at end of initializer
   { "MYSQL_TYPE_VAR_STRING", MYSQL_TYPE_VAR_STRING },
   ^
mysql_type_codes.h:34:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:34:3: warning: excess elements in struct initializer
mysql_type_codes.h:34:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:35:3: error: extra brace group at end of initializer
   { "MYSQL_TYPE_STRING", MYSQL_TYPE_STRING },
   ^
mysql_type_codes.h:35:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:35:3: warning: excess elements in struct initializer
mysql_type_codes.h:35:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:36:3: error: extra brace group at end of initializer
   { "MYSQL_TYPE_GEOMETRY", MYSQL_TYPE_GEOMETRY },
   ^
mysql_type_codes.h:36:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:36:3: warning: excess elements in struct initializer
mysql_type_codes.h:36:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:37:3: error: extra brace group at end of initializer
   { 0, 0 }
   ^
mysql_type_codes.h:37:3: note: (near initialization for ‘codes[17]’)
mysql_type_codes.h:37:3: warning: excess elements in struct initializer
mysql_type_codes.h:37:3: note: (near initialization for ‘codes[17]’)
mysql_gentyp.c:35:3: error: expected ‘}’ before ‘;’ token
   };
   ^
mysql_gentyp.c:41:1: error: expected ‘,’ or ‘;’ at end of input
 }
 ^
mysql_gentyp.c:41:1: error: expected declaration or statement at end of input
mysql_gentyp.c:33:18: warning: unused variable ‘codes’ [-Wunused-variable]
  static TypeCode codes[] = {
                  ^~~~~
At top level:
mysql_gentyp.c:33:18: warning: ‘codes’ defined but not used [-Wunused-variable]
GNUmakefile:46: recipe for target 'apq-mysql.ads' failed
gmake[2]: *** [apq-mysql.ads] Error 1

configure logic is incorrect for database detection

Hi Ken,

I noticed you revert one of my patch regarding the database configuration. But the current logic is not right.

I have both MySQL and PostgreSQL installed in the system, given the following commands:
configure --arch=x86_64 --without-sql
or
configure --arch=x86_64 --without-postgres
will result in no database being configure.

I added a line just before the database configuration to show the variables' value:
for --without-mysql
NO_MYSQL 1 NO_POSTGRES
HAS_MYSQL HAS_POSTGRES 1
for --without-postgres
NO_MYSQL NO_POSTGRES 1
HAS_MYSQL 1 HAS_POSTGRES

As the test [ -z "$NO_MYSQL" -a -z "$NO_POSTGRES" ] will always failed when you have one of the without parameter set, "-z" only test whether the variable is empty or not, it does not care it contains "0" or "1".

When you have --without-mysql defined, HAS_MYSQL is always empty and when --without-postgres is given, HAS_POSTGRES is always empty.

If system has only one DB installed, and run with "./configure --arch=x86_64" , will result in calling the APQ configure with full DB support, and it will prompt when one of the DB is not found, breaking automatic building script.

Using HAS_MYSQL and HAS_MYPOSTGRES will result in clearer logic flow of configure the APQ lib.

Some issues with SparForte and the language

All issues based on 2eb28f7:

  1. the rules around end loop;, end if;, end <name>;, ... could be made more lax such that end; would be enough.

  2. Is there a way to read a number in arbitrary base? Specifically numerics.value does not understand 0x... notation.

  3. Huh? Shouldn't it be an exception?

raise constraint_error with "String repr does not start with 0x";
      ^--------------^ constraint_error is a variable not an exception
  1. How does one use rem and mod in scripts?
case 20 rem 16 is
     ^^ identifier expected, not a number
case n rem 16 is
       ^-^ is expected
=> ? 20 rem 16
 4
  1. Command completion in shell mode is not working

  2. When spar is restarted, command lines issued from previous sessions are not loaded.

  3. neither start-up greeting Type "help" for help nor help print SparForte version.

  4. pkg_cmdline.html: s := command_name - number of environment vars in documentation is wrong? (it does not make sense).

BDB compile error

Compiled under Slackware64, with gcc 11.2.0 (SparForte 2.4.1)
Tested with main trunk, still has the same error.

Making Berkeley DB Support

gmake -C bdb
gmake[2]: Entering directory '/tmp/slackAda/SparForte-2.4.1/src/bdb'
gcc -DBDB4 -o gen_constants -Wall -fstack-protector -O1 -D_FORTIFY_SOURCE=2 gen_constants.c
gcc -O3 -DBDB4 -Wall -fstack-protector -O1 -D_FORTIFY_SOURCE=2 -c c_bdb.c
./gen_constants > bdb_constants.ads
gnatmake -c -gnatVaep -gnateEeAeEeF db.adb
gcc -c -gnatVaep -gnateEeAeEeF db.adb
db.adb:69:58: prefix of "overlaps_storage" attribute must be object

Example of SparForte running under/inside Ada

Good day to everyone, I came across SparForte while surfing the internet for teaching resource that could be used or adapted in my Ada programming classes. Beginners at College level learners, being exposed to the Ada language first. I think SparForte will be a solid pathway for incremental programming within Ada as a mix-in to start off gradually. Many thanks!

Question: Is there an example or some examples of using SparForte inside an Ada code?
I saw a quote in the documentation==> "AdaScript scripts should run with little difficulty under Ada". So I was wondering if I could see example of an how to. Many thanks!

I already register on SparForte mailing list but I could not post yet, waiting for approval, hence my coming here to post at the development portal.

Also, I saw an attempt and communication on Alire regarding SparForte but I could find it in the index nor how to go about using Alire.

I strongly believe that using SparForte using will be a great success in introducing beginner to programming in Ada, it will allay and remove the fear that faces most starter and beginner positively.

Many thanks for your all your efforts and many years of valuable time that went into SparForte.

Hear from you soon.

God blesses!!!

Regards

A collection of errors and other issues

Hi,

Sorry if this is a bit of a laundry list but these are a small collection of issues I've encountered early on when using sparforte.

  • x86_64-pc-linux-gnu
  • spar 2.2 (0e982cf)

Picture layout exception

#!/bin/spar

put(123.45, "##9.99");
% spar picture_string_exception.spar
raised ADA.IO_EXCEPTIONS.LAYOUT_ERROR : a-teioed.adb:300

This also crashes the shell when used directly which wouldn't be ideal if spar was being used as the user's main shell.

Range Check Failure

#!/bin/spar

ragma annotate(summary, "range check error");

procedure range_check_error is
  procedure usage is
  begin
     put("usage: ") @ (source_info.file);
     command_line.set_exit_status(0);
  end usage;

begin
  if $# /= 0 then
     usage;
     return;
  end if;
end range_check_error;
% spar range_check_error.spar
raised CONSTRAINT_ERROR : scanner.adb:1992 range check failed

This issue was discovered when trying to elaborate on how spar -gc handles various errors and warnings. It turned out that simply running the script with spar resulted in the same error.

Inconsistent Error Format

#!/bin/spar

procedure wrong_error_style is
  error: string;
begin
  loop
    error := get_line
    exit when error = ";
end wrong_error_style;
% spar -gc wrong_error_style.spar
wrong_error_style.spar:8:1:[11/19 11:29:13] missing double quote

I would have expected:

wrong_error_style.spar:8:1: missing double quote

If I wanted to add timestamps I could use ts from moreutils or svlogd -tt from runit.

Error Reported for the Wrong Line

#!/bin/spar

procedure misleading_line_match is
  error: string
begin
  loop
    error := get_line
    exit when error = "";
end misleading_line_match;
% spar -gc misleading_line_match.spar
misleading_line_match.sp:5:1: ';' expected

The missing ';' should be reported on line 2, column 16, but it is being reported on the line containing begin.

Documentation Misleading

For any example which delcare commands as such:

ls : constant command := "/bin/ls";

I get the following error:

ls : constant command := "/bin/ls";
                      ^^ command variables must be limited

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.