th1-sgb  Artifact Content

Artifact 331a9ae8a276bfda247450332a612f6689c62af8:

Wiki page [th1-sgb] by stephan 2012-08-14 14:46:52.
D 2012-08-14T14:46:52.490
L th1-sgb
P 00ab61f03a72e5cc1438c3ed424105898497ad1c
U stephan
W 2595
This is the source repo for [|stephan beal]'s fork/adaptation of Richard Hipp's TH1  ("Test Harness 1") script language engine, more or less as it existed [|at this point in fossil's history], minus the fossil-specific features and refactored a tiny bit to make it easier to use as a drop-in in other projects. This TH1 implementation has no compatibility requirements with its origin implementation and "might" eventually change significantly from Fossil's version.

TH1 is an embeddable TCL-like language, but is a mini-language. It has only a few built-in commands, has no just-in-time compiler or such fancy bells and whistles, stores all values as strings, and internally allocates/frees memory very often. It is <em>not</em> a high-performance solution to your embedded scripting problems. It <em>is</em> an easy way to quickly create a scripting API for, e.g., running library/application test code (which is what it was originally designed for - running [|sqlite] tests on Symbian OS).

TH1 is written in ANSI C89 and "should" compile as-is on any C89 platform. It requires no esoteric or non-standard language features. Build files are provided for GNU Make. They assume one is using gcc but can be used with other C compiler/linker by setting the CC/CXX makefile vars. e.g. <tt>make CC=clang CXX=clang CFLAGS="-g -Wall -Werror" CXXFLAGS="-g"</tt>. For more significant build tweaks, one might be required to edit <tt>config.make</tt> or <tt>Makefile</tt>.

This library is more or less functional but needs more docs and might see some experimentation along the way. e.g. it "might be interesting" to extend its data type support to internally use something closer to native values (e.g. JSON-compatible data types), and [|a separate library] is under construction to experiment with that.

<strong>License</strong>: Simplified BSD License (a.k.a. 2-Clause BSD License, a.k.a. FreeBSD License).

Useful links:

   *  [download|Download the code].
   *  Creating a so-called [AmalgamationBuild] of these sources.
   *  [|The only manual] for Fossil's TH1 language.
   *  [|That same manual], ported to Google Docs and expanded to include details specific to this API.
   *  [HowTo|Exceedingly brief HowTo] for this library.
   *  [th1_ob|The "ob" API] th1 API extension provided by this code.
Z a31620e54afb82cad59ba660e9269328