# All Past Downloads

CodeWorker is distributed under the terms of the GNU Lesser General Public License.
### CONTENT Overview Why use this tool? Getting Started (47kb) Documentation Tutorials Repository of scripts Download Related links ### MAIN VERSIONS #### Loading of packages since version 3.0 #### Socket handling since version 2.17 #### BNF of the language since version 2.14 #### CGI program since version 2.10 #### XSL pattern matching since version 2.08 #### Sending HTTP requests since version 2.07 #### Handling of binary files since version 2.04 ### CONTACT US |
| The Sun Solaris version compiles under CC v8 correctly since version 3.5. The Mac version compiles under Mac OS X 10.3 correctly since version 3.4. The Linux version compiles under gcc 3.2 20020927. CodeWorker runs under Cygwin correctly since version 2.09. Under Linux/Unix, please read the `Makefile` before compiling.
Under Windows platform, you might have to download the DLLs below: From version 3.5 of the binary: runtime DLLs of VC++ 7.1 msvcp71.dll and msvcr71.dll in `"‰SystemRoot‰/System32"`. Up to version version 3.4 of the binary: runtime DLL of VC++ 6.0 msvcp60.dll in `"‰SystemRoot‰/System32"`.
#### Please do not hesitate to contact us for any trouble (source recompiling, binaries, constructive criticisms, suggestions, ...).
To subscribe to new releases.
CodeWorker 4.0.1, 19aug2005
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | -4 | CodeWorker_WIN4_0_1.zip
Any platform (?) | sources | -4 | CodeWorker_SRC4_0_1.zip
Changes
Date | Type | Caller | Description
18aug2005 | bug_fix | - | The compilation of the scripting language failed on functions where the first argument was optional and when the function was called without parameter.
18aug2005 | improvement | - | Now, the procedure `incrementIndentLevel()` and the function `decrementIndentLevel()` accept both an optional argument, giving the indentation depth to add or remove.
15aug2005 | improvement | - | The native translation of CodeWorker scripts to C++ has been improved, to get ready for the version 4.1, which will be the first release where scripts can substitute the CodeWorker scripting language for Java (C++ intervenes here!).
15aug2005 | bug_fix | - | In extended-BNF scripts, the directive `#matching` wasn't recording properly the coverage of parsed files by production rules.
31jul2005 | feature | - | New BNF statement modifier `#debug`: it opens a debug session, applied on the rest of the BNF sequence.
CodeWorker 4.0, 28jul2005
Platform | Type | Size | Archive | GnuPG signature
WINDOWS 98/2000/NT/XP | binaries | 621344 | CodeWorker_WIN4_0.zip | CodeWorker_WIN4_0.zip.asc
Any platform (?) | sources | 2223437 | CodeWorker_SRC4_0.zip | CodeWorker_SRC4_0.zip.asc
Changes
Major evolution of CodeWorker. It is now possible to integrate the CodeWorker's features about parsing and code generation into C++, Java and .NET applications.
Date | Type | Caller | Description
27jul2005 | feature | Alan CYMENT | Implementation of a .NET assembly for CodeWorker.
24jul2005 | feature | - | The native translation of CodeWorker scripts to C++ produces a C++ source code, which can be optimized. The C++ optimizer is an external program-transformation script that the developer can reuse to implement his own transformations.
24jul2005 | option | - | Add of a new option on the command line: -c++2target
23jul2005 | feature | - | Implementation of Java interface for CodeWorker (JNI library and org.codeworker.jni package).
17jul2005 | feature | - | Add of the new BNF directive `#matching(variable)`: this directive is put outside the production rules. It informs the BNF engine to record the coverage of the input text by the production rules. Concretely, the BNF engine stores into a variable the list of all production rules of the grammar and all areas they match in the input text, once the execution has finished. The BNF engine populates the variable specified by the directive. ``` Tree structure of the variable populated by the BNF engine `` for #matching(variable): `` `` * variable `` | `` +- rules[]: list of production rules (signatures only), `` | `` +- areas[]: table of positions in the input text, the `` | key is worth the position P; no item value `` +- begin[]: (optional) table for every rule starting `` | | at the position P, the key being worth the `` | | ending position Pf (decreasing order) `` | +- []: list of all rules matching [P, Pf] exactly, `` | `` +- end[]: (facultative) table for every rule ending at `` | the position P, the key being worth the `` | starting position Pi (increasing order) `` +- []: list of all rules matching [Pi, P] exactly,`
28jun2005 | improvement | Jon SCOBIE | During a debugging session, break/watch points are numbered for an easy deletion.
23jun2005 | improvement | Brian WELCH | Now, the function `traceObject()` can display a tree up to a given depth (second optional parameter).
CodeWorker 3.12, 24jun2005
Platform | Type | Size | Archive | GnuPG signature
WINDOWS 98/2000/NT/XP | binaries | 604656 | CodeWorker_WIN3_12.zip | CodeWorker_WIN3_12.zip.asc
Any platform (?) | sources | 2110946 | CodeWorker_SRC3_12.zip | CodeWorker_SRC3_12.zip.asc
Changes
Date | Type | Caller | Description
23jun2005 | feature | Jon SCOBIE | A debugger session now accepts conditional breakpoints and handles watchpoints on variables, conditional or not. These new features are very efficient to accelerate the debugging. Conditions conform to the syntax of usual CodeWorker expressions. When a break/watchpoint is activated, a block of instructions can be executed. The block is a piece of CodeWorker script.
CodeWorker 3.11.0.1, 07jun2005
Platform | Type | Size | Archive | GnuPG signature
WINDOWS 98/2000/NT/XP | binaries | 601319 | CodeWorker_WIN3_11_0_1.zip | CodeWorker_WIN3_11_0_1.zip.asc
Any platform (?) | sources | 1825643 | CodeWorker_SRC3_11_0_1.zip | CodeWorker_SRC3_11_0_1.zip.asc
Changes
Date | Type | Caller | Description
07jun2005 | bug_fix | - | The C++ source file `ExprScriptFunction.cpp` wasn't capable to compile correctly; fixed. Two C++ source files had to be removed from the Makefile: `GrfCreateIterator.cpp` and `GrfCreateReverseIterator.cpp`; fixed.
CodeWorker 3.11, 03jun2005
Platform | Type | Size | Archive | GnuPG signature
WINDOWS 98/2000/NT/XP | binaries | 600188 | CodeWorker_WIN3_11.zip | CodeWorker_WIN3_11.zip.asc
Any platform (?) | sources | 1838717 | CodeWorker_SRC3_11.zip | CodeWorker_SRC3_11.zip.asc
Changes
Date | Type | Caller | Description
03jun2005 | deprecated | - | In precedent versions, a function prototype may accept the parameter type index (rarely used). It is now obsolete and changed to iterator.
- 03jun2005 | function | Jon SCOBIE | function duplicateIterator(oldIt : iterator, newIt : treeref) : bool
  Parameter | Type | Description
  oldIt | iterator | the original iterator to duplicate
  newIt | treeref | copy of the original iterator
- Duplicates an iterator or returns `false` if oldIt isn't an iterator. function createIterator(i : iterator, list : treeref) : bool
  Parameter | Type | Description
  i | iterator | iterator to initialize
  list | treeref | the iterator will point to the beginning of this list
- The variable `i` will become an iterator pointing to the first item of the list. If the list is empty, there is no iterator created and the function returns `false`. `i` must have been declared before. function createReverseIterator(i : iterator, list : treeref) : bool
  Parameter | Type | Description
  i | iterator | iterator to initialize
  list | treeref | the iterator will point to the end of this list
- The variable `i` will become an iterator pointing to the last item of the list and will iterate in the reverse order. If the list is empty, there is no iterator created and the function returns `false`. `i` must have been declared before. function index(i : iterator) : int
  Parameter | Type | Description
  i | iterator | iterator of a \samp{foreach} statement
- Returns the position of the item the iterator points to. The position in the list begins counting at 0. function prec(i : iterator) : bool
  Parameter | Type | Description
  i | iterator | iterator of a \samp{foreach} statement or pointing to items of a list
- The iterator will now point to the precedent item of the list and returns `true` if exists. function next(i : iterator) : bool
  Parameter | Type | Description
  i | iterator | iterator of a \samp{foreach} statement or pointing to items of a list
The iterator will now point to the next item of the list and returns `true` if exists.
CodeWorker 3.10.4, 27may2005
Platform | Type | Size | Archive | GnuPG signature
WINDOWS 98/2000/NT/XP | binaries | 597722 | CodeWorker_WIN3_10_4.zip | CodeWorker_WIN3_10_4.zip.asc
Any platform (?) | sources | 1816779 | CodeWorker_SRC3_10_4.zip | CodeWorker_SRC3_10_4.zip.asc
Changes
Date | Type | Caller | Description
26may2005 | improvement | - | The function `saveProject()` accepts a facultative parameter nodeToSave, which is a subtree you wish to save to XML; by default, the saved node is the global tree `project`.
26may2005 | improvement | - | The functions `loadFile()` and `loadBinaryFile` accept a facultative parameter length indicating the number of bytes to read.
26may2005 | bug_fix | - | A template-based script using the automatic indent mode (function `incrementIndentLevel`) for generating text, may badly copy rough text after a new line starting with more tabulations than the current indent level.
18may2005 | bug_fix | - | A translation script, passed as a relative path in the function `translateString`, may haven't been found.
CodeWorker 3.10.3, 16may2005
Platform | Type | Size | Archive | GnuPG signature
WINDOWS 98/2000/NT/XP | binaries | 596975 | CodeWorker_WIN3_10_3.zip | CodeWorker_WIN3_10_3.zip.asc
Any platform (?) | sources | 1817717 | CodeWorker_SRC3_10_3.zip | CodeWorker_SRC3_10_3.zip.asc
CodeWorker 3.10, 22apr2005
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 596988 | CodeWorker_WIN3_10.zip
Any platform (?) | sources | 1807000 | CodeWorker_SRC3_10.zip
Changes
Until the version 3.9.1, the scripting language didn't oblige to declare the variables before their use. From now, it is recommended and a warning message appears otherwise, but the beheviour doesn't change yet. This warning is going to mutate to an error message in future versions of the interpreter. In front of a variable name never declared, the behaviour remains the same: the variable is inserted to the `this` context automatically as a new attribute. The rationale is firstly for improving the reliability of scripts, detecting bad variable names like spelling or foolish mistake in the name, and secondly to prepare the introduction of Object-Oriented Programming into CodeWorker.
Date | Type | Caller | Description
20apr2005 | improvement | - | As stipulated in the remarks heading, a warning occurs if a variable is used whitout having been declared before. These warnings are going to become an error message in the future, so it is strongly recommended to hunt them now, by declaring these variables as local or global or as attributes belonging to the `this` context tree (default behaviour).
- 19apr2005 | function | - | function addToDate(date : string, format : string, shifting : string) : string
  Parameter | Type | Description
  date | string | the date to change
  format | string | the format to apply on the reading of the \samp{shifting} argument
  shifting | string | the offset values to apply on the date, whose meanings are known by the \samp{offset} argument
Change a date by applying offset values on its internal representation. The internal representation holds the year / month / day and hour / minute / second and millisecond fields. You choose what fields to shift, giving a date format as the first argument, and an offset value for each fields seen in the format as the second argument. The field types have the same syntax as in the function `formatDate`, except that the field values might be negative. For instance, if the field type is "%m", the month must occupy 2 digits maximum for a positive offset, and 3 characters for a negative offset, the first one being the sign. The offsets are applied in the order they are read, from the left-hand side to the right. The function returns the value of the date after applying the shift.
14apr2005 | bug_fix | - | About the parsing: `#nextStep` had no effect on the jump operator when put in a repeat regular expression.
- 13apr2005 | function | - | procedure allFloatingLocations(list : tree)
  Parameter | Type | Description
  list | tree | floating location names and their position
Populates the argument `list` with all floating location registered to the current output stream, such as the entry key is the floating location name and the entry value is the position in the stream.
12apr2005 | bug_fix | - | Correction of a bug introduced in the version 3.9: the BNF predefined non-terminal `#readNumeric` wasn't returning the correct floating-point value after the reading of a signed exponent.
CodeWorker 3.9, 08apr2005
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 589051 | CodeWorker_WIN3_9.zip
Any platform (?) | sources | 1733461 | CodeWorker_SRC3_9.zip
Changes
Date | Type | Caller | Description
- 07apr2005 | function | - | function removeFloatingLocation(key : string) : int
  Parameter | Type | Description
  key | string | name of an existing floating position into the output stream
Removes the floating location attached to `key` and returns its position. If the floating location belongs to a parent output stream, it is removed from the parent. The function returns a negative integer if the floating location doesn't exist.
06apr2005 | behaviour | - | The predefined tree node null was added, and means a null pointer. Used for writing plugins, for instance, passing a tree node as a null pointer to C++.
10mar2005 | bug_fix | - | The directive `#nextStep` should have been available in a repeating regular expression ([...]*), but wasn't.
- 17feb2005 | function | - | function sqrt(x : double) : double
  Parameter | Type | Description
  x | double | the number we want to calculate the square root
Calculates the square root of `x`. An invalid number causes the function to throw an error.
- 16feb2005 | function | Laurent DOMINGOS | procedure sleep(millis : int)
  Parameter | Type | Description
  millis | int | how many milliseconds the execution must be suspended
The procedure suspends the execution for `millis` milliseconds.
10feb2005 | bug_fix | - | Correction on the C++ native translation of BNF template non-terminals.
10feb2005 | bug_fix | - | In functions `parseAsBNF()` and `translate()` and `expand()` and `generate()`, looking for the BNF-parsing script filename starts at the current directory of the callee.
10feb2005 | bug_fix | - | During the native translation of scripts to C++, the leader script might have an empty C++ short file name in a rare use-case.
27jan2005 | function | - | procedure incrementIndentLevel() Increments the indentation level, used to indenting output files automatically while writing. If first call, it enables the indent-mode: each time a text will have to be written at the beginning of a line, the line will be indented, depending on the indentation level. Call the function `decrementIndentLevel()` to decrease the indentation. function decrementIndentLevel() : bool Decrements the indentation level, used to indenting output files automatically while writing. If the function returns `false`, the indentation level is worth zero and it disables the indent-mode. Otherwise, each time a text will have to be written at the beginning of a line, the line will be indented, depending on the indentation level. Call the function `incrementIndentLevel()` to increase the indentation.
21jan2005 | bug_fix | Markus MARB | The native C++ translation of a constant tree wasn't implemented yet. A constant tree is, for instance: `{"a", {"yellow", "red"}, "submarine"}`
- 20jan2005 | function | - | function isNumeric(number : string) : bool
  Parameter | Type | Description
  number | string | a floating-point number in text representation
This predicate checks whether the string passed by parameter is a floating-point or not.
CodeWorker 3.8.4, 19jan2005
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 577662 | CodeWorker_WIN3_8_4.zip
Any platform (?) | sources | 1690184 | CodeWorker_SRC3_8_4.zip
Changes
Date | Type | Caller | Description
19jan2005 | bug_fix | Lionel AUROUX | The predefined BNF terminal `#readCChar` had the same behaviour as `#readCString`, instead of consuming a C-like constant character.
18jan2005 | bug_fix | - | the assignment operator `setall` was causing a memory leak or a crash on attributes pointing to a reference, while freeing the memory.
11jan2005 | bug_fix | - | The BNF directive `#skipIgnore` wasn't applying correctly the implicit copy: the scanned text was repeated twice.
10jan2005 | bug_fix | - | An ellipsis exception may have occured when a dynamic library module was compiled with a too ancient version of CodeWorker ("CW4dl.h" or "CppParsingTree.h" or "CGRuntime.h" has changed).
17dec2004 | bug_fix | - | The and-or junction BNF operator (symbol &| was returning a failure when the right-hand side member was unable to match the input.
15dec2004 | bug_fix | - | The interpreter crashed when an argument had the same name as the BNF rule. Now, an explicit error message occurs.
08dec2004 | improvement | - | During the parsing of a floating-point number, the dot is consumed only if it doesn't exist a second dot just behind the first one: if you parse a double at the beginning of `"2. is a floating point"`, 2. is consumed. if you parse a double at the beginning of `"2..n"`, 2 only is consumed.
03dec2004 | improvement | Eric NICOLAS | Now, the compiler detects an attempt to declare the reserved variables `this` or `project` as local or global.
- 02dec2004 | function | - | procedure insertElementAt(list : treeref, key : string, position : int)
  Parameter | Type | Description
  list | treeref | an array of nodes
  key | string | the entry key of the element to insert
  position | int | where to insert the new element, starting at 0
Insert a new element to `list`, at a position given by the argument `position`. The argument `key` indicates the key of this element, which is built empty. If the key is an empty string, then the key is supposed to be worth the size of the list automatically. You can access the new element by writing either: `list#[position]` or `list[key]`
29nov2004 | feature | - | Add of `#ignore(Ada)` for eliminating Ada comments and whitespaces in a extended-BNF script.
CodeWorker 3.8.3, 19nov2004
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 574602 | CodeWorker_WIN3_8_3.zip
Any platform (?) | sources | 1668657 | CodeWorker_SRC3_8_3.zip
Changes
Date | Type | Caller | Description
19nov2004 | bug_fix | Laurent RIESTERER | A temporary file, used during the code generation of a source file, was badly formed: the path was containing anti-slashes, which may have caused some troubles on non-Windows platforms.
14nov2004 | bug_fix | - | About expressions embedded between tags `@@` in a template-based script: starting with a constant string was causing an unrelevant syntax error.
04nov2004 | bug_fix | - | the assignment operator `setall` wasn't copying attributes pointing to a reference correctly.
26oct2004 | improvement | - | Now, the binding to the dynamic library libcurl is resolved while using the cURL API. So, the dynamic library doesn't need to be present if you don't use the cURL API.
29oct2004 | bug_fix | - | An imperative parse script (`parseFree()`) wasn't reentrant completely: an ellipsis exceptions might have appeared in some cases.
26oct2004 | bug_fix | - | In the native C++ translation of scripts for building a standalone executable: aVariable#front ignored during the C++ translation in some cases, the keyword cascading wasn't taken into account while translating `foreach` and `forfile`, the return value of a BNF symbol (piece of text matched) wasn't concatenated correctly when needed (functionality rarely required).
CodeWorker 3.8.2, 07oct2004
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 571481 | CodeWorker_WIN3_8_2.zip
Any platform (?) | sources | 1659058 | CodeWorker_SRC3_8_2.zip
Changes
Date | Type | Caller | Description
03oct2004 | improvement | - | Now, the `local` and `localref` and `global` statements accept more than one variable declaration, separated by commas. Example: `// declaration of 3 local variables in one shot local a = "1", b, c= 2;`
03oct2004 | feature | - | Now, the path of dynamic library plugins can end with a `"_d"` suffix for debug version. Examples for a plugin named MyModule: `MyModulecw_d.dll MyModulecw_d.so`
03oct2004 | feature | - | Add of `setIntValue()` and `setDoubleValue()` in the interpreter interface, as declared in "CW4dl.h", used for building C++ dynamic library plugins intended to extend CodeWorker.
26sep2004 | bug_fix | - | Infinite loop in `saveProject()`, when the root graph `project` has a child referring to a node.
19sep2004 | bug_fix | - | Sometimes, the interpreted was detecting a syntax error on the extended-BNF directive `#catch`, while the writing was correct.
18sep2004 | bug_fix | Thierry WILMOT | Now, the declaration of a local variable my-local-variable must be explicit, before calling the BNF directives `#insert(my-local-variable)` or `#pushItem(my-local-variable)`.
07sep2004 | bug_fix | - | the function `composeHTMLLikeString()` recognizes the apostrophe correctly, and doesn't invert this character anymore.
07sep2004 | improvement | - | An error message raises if the BNF directive `#nextStep` is used outside of a jump or repeat regular expression.
CodeWorker 3.8, 24aug2004
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 570036 | CodeWorker_WIN3_8.zip
Any platform (?) | sources | 1648999 | CodeWorker_SRC3_8.zip
Changes
Date | Type | Caller | Description
22aug2004 | improvement | - | Now, the function `scanFiles()` accepts a path in the short filename pattern. Example: `scanFiles(dir, "project/examples", "src/*.cpp", true)` will filter: `"project/examples/airplanes/src/*.cpp" "project/examples/boats/yacht/src/*.cpp" "project/examples/bicycles/src/*.cpp"`
15aug2004 | bug_fix | - | The native C++ translation of CodeWorker‘s scripts has been corrected on some features: the BNF directive `#skipIgnore`, the BNF binary operator `‘|>‘`,
14aug2004 | improvement | - | A new format type was added to the function `completeDate`: `‘%|‘`. Once the date has been iterated up to the end, if the format wasn‘t applied on it completely, an error occurs, except if `‘%|‘` stands at the current position in the format.
14aug2004 | feature | - | The statement `exit` was added, for exiting CodeWorker with an error code. It expects an integer expression, for determining the value of the error code that the interpreter will have to return to the system.
14aug2004 | feature | - | The new predefined BNF directive `#readUptoIgnore` was added. It reads all characters up to encountering the first insignificant one. Insignificant characters are those to ignore between BNF terminal matchings, and specified thanks to the directive `#ignore`.
10aug2004 | improvement | - | Now, the native C++ translation of CodeWorker‘s scripts generates a GNU makefile of the project.
08aug2004 | deprecated | - | The functions `getInputLocation()` and `setInputLocation()` replace the respective obsolete `getLocation()` and `setLocation()` writings.
07aug2004 | bug_fix | - | The native C++ translation of CodeWorker‘s scripts has been corrected on some features: initialization of predefined global variables (`_ARGS` and `_REQUEST`), C++ writing of variable expressions in general, implicit copy in a translation script,
07aug2004 | bug_fix | - | The date conversion of a two-digits year to a four-digit one was erroneous in the function `formatDate()`.
CodeWorker 3.7, 04aug2004
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 562617 | CodeWorker_WIN3_7.zip
Mac OS X 10.3 (Panther) | binaries | 10162156 | CodeWorker_MAC3_7.zip
Any platform (?) | sources | 1640339 | CodeWorker_SRC3_7.zip
Changes
Date | Type | Caller | Description
01aug2004 | behaviour | Thierry WILMOT | The format of error messages has changed: `<filename>(line-number): <error-message>` replaces: `"<filename>" line line-number): <error-message>`
01aug2004 | feature | - | The new predefined non-terminal BNF symbol `#readCChar` reads a C-like constant character. A C-like character stands between single quotes and admits the escape character \.
01aug2004 | improvement | - | The interpreter executes a BNF parsing if the first argument on the command line has file extension being worth `".cwp"`.
29jul2004 | behaviour | - | The procedure `copySmartFile()` has become a function, returning `true` when it executes the copy.
25jul2004 | bug_fix | - | When a variable was declared twice local to the same scope (not recommended), a bug was appearing: once the second local declaration was reached, if the local variable was previously referring to another, the referenced variable was cleaned.
24jul2004 | bug_fix | - | Some regressions were corrected on the native C++ translation of CodeWorker‘s scripts.
19jul2004 | function | - | function countInputCols() : int Determines the column number in the line where the parse cursor points to. function countOutputCols() : int Determines the column number in the line where the output stream cursor points to.
CodeWorker 3.6, 09jul2004
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 546963 | CodeWorker_WIN3_6.zip
Any platform (?) | sources | 1616738 | CodeWorker_SRC3_6.zip
Changes
Date | Type | Caller | Description
06jul2004 | feature | - | A new BNF directive was added: `#moveAhead`. Located into a BNF sequence, it means that after a valid matching of the rest of the sequence, the cursor has necessary moved. Example: `#moveAhead [A]? [B]?` If `A` doesn‘t match, then `B` must match so that the scan has read at least one character.
- 06jul2004 | function | Stephane PELTIER | function getShortFilename(pathFilename : string) : string
  Parameter | Type | Description
  pathFilename | string | a file name with its path
Returns the short name of a file, meaning without the path. It is composed of a radical + an extension.
06jul2004 | improvement | - | Floating-point numbers representation: a better removal of superfluous digits after the dot.
23jun2004 | feature | Eric NICOLAS | Add of a new switch to pass on the command line: `-nologo` reclaims that the interpreter doesn‘t write the copyright about CodeWorker in the shell while starting.
15jun2004 | improvement | - | A new way to pass parameters to the command line: `codeworker <script-file> <arg1> ... <argN> [<switch>]*` It is more natural than the equivalent writing: `codeworker -script <script-file> -args <arg1> ... <argN> [<switch>]*` }
06jun2004 | bug_fix | - | Some regressions were corrected on the native C++ translation of CodeWorker‘s scripts.
23may2004 | improvement | - | Now, the `foreach` statement can iterate a list sorted by its values instead of its keys. Example: ``` local list; `` insert list["silverware"] = "tea spoon"; `` insert list["Mountain"] = "Everest"; `` insert list["SilverWare"] = "Tea Spoon"; `` insert list["Boat"] = "Titanic"; `` insert list["acrobat"] = "Circus"; `` `` traceLine("Sorted list in a classical order:"); `` foreach i in sorted by_value list { `` traceLine("\t" + i + " -> " + key(i)); `` }` Output: Titanic -> Boat Everest -> Mountain Tea Spoon -> SilverWare Circus -> acrobat tea spoon -> silverware
CodeWorker 3.5, 07may2004
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 534804 | CodeWorker_WIN3_5.zip
Any platform (?) | sources | 2487789 | CodeWorker_SRC3_5.zip
Changes
Under Windows platforms, the binaries are compiled with VC++ 7.1 for now. If you don‘t have the DLLs `msvcp71.dll` and `msvcr71.dll` on your computer, please download them from the header of the download page.
Date | Type | Caller | Description
06may2004 | improvement | - | Now, the function `getLastDelay()` works even during the measurement of the time consuming (controlling sequence under a `delay` statement modifier): it returns the time elapsed since the beginning of the time-keeping.
28apr2004 | improvement | - | A better precision for floating point numbers (up to 24 digits, instead of 6 before).
25apr2004 | feature | - | A new preprocessor instruction called `#line`. It forces the compiler to change the current value of the script line counter.
25apr2004 | bug_fix | - | Calling the function `translateString()` with the first parameter being the translation script directly (and not the file name of the translation script) was raising the error: `"cannot ask for the value of a piece of script"`.
24apr2004 | feature | - | A tree node can point to an external data, holding the value of the node. This external data might be any kind of data structure, inheriting from the class `ExternalValueNode` declared in the header file `"ExternalValueNode.h"`. The scripting language has accepted external functions. Now, it also accepts external data. An example is encapsulating a Trolltech-Qt widget for building GUI, implemented in a plugin or in an application linking with the CodeWorker‘s library, and handled from a CodeWorker‘s script.
24apr2004 | improvement | - | Have reduced the memory space allocation of a tree node.
16apr2004 | bug_fix | - | The function ‘putEnv()‘ now works on pure Unix platforms.
- 15apr2004 | function | - | function computeMD5(text : string) : string
  Parameter | Type | Description
  text | string | the string to encrypt in MD5
Computes the MD5 of a string. This optimized MD5 implementation conforms to RFC 1321. Source: http://www.cr0.net:8040/code/crypto/md5/ Copyright 2001-2004 Christophe Devine
30mar2004 | bug_fix | - | CodeWorker now compiles under Sun Solaris with CC. Please follow the instructions in the makefile to configure it manually.
28mar2004 | behaviour | - | In function ‘`setOutputLocation(`location`)`‘, if location is worth `-1`, the cursor moves to the end of the output stream.
- 28mar2004 | function | - | function getWriteMode() : string Returns how text is written during a generation or during an implicit copy while translating: `"insert"` or `"overwrite"` mode (default mode). procedure setWriteMode(mode : string)
  Parameter | Type | Description
  mode | string | is worth \samp{"insert"} or \samp{"overwrite"}
Selects how to write text during a generation and how to apply an implicit copy during a translation. By default, a text is written in overwrite mode (`mode` = `"overwrite"`): if the file cursor doesn‘t point to the end of the current output file, the new text overwrites the old one and the remaining, if any, is inserted at the end. The insert mode (`mode` = `"insert"`) causes a shift of the old text, so as to preserve it.
- 27mar2004 | function | - | function addGenerationTagsHandler(key : string, reader : script, writer : script) : bool
  Parameter | Type | Description
  key | string | designates the handler
  reader | script | extended-BNF script of the reader
  writer | script | template-based script of the writer
- Adds a new generation tags handler, designated by `key`. Returns `true` if `key` isn‘t reserved yet for another generation tags handler. function removeGenerationTagsHandler(key : string) : bool
  Parameter | Type | Description
  key | string | designates the handler to remove
- Removes the current generation tags handler amongst those previously registered thanks to the function `addGenerationTagsHandler()`. If the current generation tags handler is worth this one, no custom handler is selected. Returns `true` if `key` designates a registered handler. function selectGenerationTagsHandler(key : string) : bool
  Parameter | Type | Description
  key | string | designates the handler to take
Selects the current generation tags handler amongst those previously registered thanks to the function `addGenerationTagsHandler()`. If the parameter `key` is worth false (empty string), the default generation tags handler is used. Returns `true` if `key` designates a registered handler.
CodeWorker 3.4, 22mar2004
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 629811 | CodeWorker_WIN3_4.zip
Any platform (?) | sources | 1463857 | CodeWorker_SRC3_4.zip
Changes
Date | Type | Caller | Description
14mar2004 | bug_fix | - | Under Linux/Unix, the keyboard wasn‘t initialized properly: running the interpreter in the interaction mode was freezing the console.
07mar2004 | improvement | - | While sending an HTTP request (send/get/post `HTTPRequest(...)` functions), the header is extracted and made available in the session, and cookies are propagated.
29feb2004 | feature | David JOBET | A new command line swith has appeared: ‘-args‘ allows to pass arguments to the leader script without having to put them in properties. The arguments are stored in the global array ‘_ARGS‘.
- 28feb2004 | function | David JOBET | procedure sortArray(array : tree)
  Parameter | Type | Description
  array | tree | the array node to sort
Sort an array in the lexicographical order of the entry keys.
- 08feb2004 | function | Patrick BRANNAN | procedure listAllGeneratedFiles(files : treeref)
  Parameter | Type | Description
  files | treeref | populated with the names of all files generated since the interpreter has launched
Populates the parameter `files` with the list of all output files generated since the interpreter has launched. The array `files` indexes each node with the name of the generated output file, and each node owns a branch called `scripts`. This branch gives the list of all template-based scripts that have contributed to the generation of the output file (often one script only, but could be more). The key index and the value of the nodes in the array `scripts` are worth the script file names. The procedure raises an error if the tree parameter `files` doesn‘t exist.
07feb2004 | bug_fix | - | CodeWorker should compile on 64 bits processors properly now. A side effect on memory allocation under Windows was corrected. Correction of minor bugs.
- 12jan2004 | function | Eric NICOLAS | function createDirectory(path : string) : bool
  Parameter | Type | Description
  path | string | the path of directories to create
This function creates a new directory and returns whether the operation has succeeded or not. It fails if the complete path already exists, or if it is invalid.
CodeWorker 3.3, 05jan2004
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 628680 | CodeWorker_WIN3_3.zip
Any platform (?) | sources | 1982777 | CodeWorker_SRC3_3.zip
Changes
It exists three families of scripts here. To facilitate their syntax highlighting in editors, or to indicate briefly the type of the script, we suggest to employ some file extensions, depending on the nature of the script. The next table exposes the different extensions used commonly in CodeWorker.
Extension | Description
`".cwt"` | a template-based script, for text generation
`".cwp"` | a extended-BNF parse script, for parsing text
`".cws"` | a common script, none of the precedent
The structure of the grammar is so rich that it is a challenge to find a text editor, which offers a syntax highlighting engine powerful enough. JEdit proposes the writing of production rules to describe it, so it is possible to express the syntax highlighting of the scripting language. You‘ll find a package dedicated to JEdit on the Web site, for the inclusion of these new highlighting modes. Many thanks to Patrick Brannan for this contribution.
Date | Type | Caller | Description
07dec2003 | feature | - | Add of a new BNF directive: `#ratchet`. When encountered in a production rule, the BNF engine memorizes what is the current position in the input stream, and then controls that the scan will never come back before this position.
07dec2003 | feature | - | Two new hooks were added, intended to trace and debug calls of BNF non-terminals: `stepintoHook()` and `stepoutHook()`.
- 06dec2003 | function | - | function translateString(patternFileName : script, this : tree, inputString : string) : string
  Parameter | Type | Description
  patternFileName | script | file name of the \textit{pattern script}, which merges both the BNF syntax and the source code generation tags
  this | tree | the current node that will be accessed via \textit{this} variable
  inputString | string | the input string to parse
Parses the input string given by the argument `inputString` and returns the output string resulting of the translation, following the instructions of the pattern script called `patternFileName`. The pattern script merges the BNF syntax presented section BNF syntax with the source code generation syntax described section source code generation.
06dec2003 | feature | - | Add of the new BNF statement `#transformRules`, which provides a convenient way to reuse a BNF script. It defines a rule that describes how to transform the header (left member) and the production rule (right member) of a non-terminal declaration. Example: `INTEGER ::= #ignore [‘0‘..‘9‘]*;` INTEGER is the header and #ignore [‘0‘..‘9‘]* is the production rule. During the compilation of a BNF parse script, before processing the declaration of a non-terminal, the compiler checks whether a transforming rule validates the name of the non-terminal. If so, both the header of the declaration and the production rule are translated, following the directives of the rule. The #transformRules statement must be put in the BNF script, before the production rules to transform.
04dec2003 | behaviour | - | In the function `composeHTMLLikeString()`, the minus symbol isn‘t changed to the entity `#150;` anymore.
03dec2003 | feature | - | A new BNF binary operator `&|` was added. `A &| B` is equivalent to `A B | A | B` (the order of resolution is important). It means that A and/or B match(es), which justifies the syntax of the operator.
03dec2003 | function | - | function countOutputLines() : int Determines the line number of where the cursor points in the output stream.
30nov2003 | bug_fix | - | In a dynamic-library module, calling a CodeWorker function with a node parameter crashes the application.
30nov2003 | feature | - | The method `‘CW4dl::Interpreter::createTree()‘` was added in the C++ header `"CW4dl.h"`. Now, local trees can be build in dynamic-library modules.
29nov2003 | feature | - | Syntax extension for the BNF directive `#skipIgnore`: you can choose an ignore mode different of the current one, set by `#ignore`.
27nov2003 | bug_fix | Maxime BOURGET | Under Windows, while scanning directory with filter files like `"*.bar"`, the system accepts also files terminating by a tilde. Now, a validation ensures that each accepted file matches the filter correctly.
26nov2003 | feature | - | A new BNF directive `#parsedString(expression)` was added. It changes temporarily the input stream of a parse script by the text resulting of the evaluation of expression.
26nov2003 | feature | - | The new BNF directive `#nextStep` is put into BNF sequences inlayed in a BNF jump operator (`->`) or in a BNF complementary operator (^ or ~). Normally, these operators move the cursor of the input stream one position further, in case of failure while applying the BNF sequence. Using `#nextStep` allows changing the shift of the cursor to more than one character. It is very useful when you encounter quoted strings or identifiers. For instance, if you are looking for constant strings and then number or identifiers, the following code is incorrect: `->[#readCString #readInteger | #readIdentifier]` Why is it incorrect? If the constant string matches but not the integer, the next iteration will put the cursor just after the quote and will perhaps point to an identifier, embedded into the constant string. Then, the operator will match during the second iteration. In fact, if the constant string matches but not the rest of the BNF sequence, we want to force the next jump just after the constant string: `->[#readCString #nextStep #readInteger | #readIdentifier]`
CodeWorker 3.2, 24nov2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2333935 | CodeWorker_WIN3_2.zip
Any platform (?) | sources | 1423937 | CodeWorker_SRC3_2.zip
Changes
Date | Type | Caller | Description
22nov2003 | feature | - | The BNF directive `#trace` traces the resolution steps of an extended–BNF script. Hit a key to interrupt the display of trace information and to pause the controlling sequence.
- 22nov2003 | function | - | function inputKey(echo : bool) : string
  Parameter | Type | Description
  echo | bool | asks for echoing the standard input on the console
Returns a character extracted from the standard input, the keyboard generally. If no key was pressed, it returns an empty string. See statement modifiers `file_as_standard_input` (file as standard input) and `string_as_standard_input` (string as standard input) to change the source of the standard input. If the source of the standard input is the keyboard, the argument `echo` has no effects. Otherwise, the input text is displayed into the console only if `echo` is worth `true`.
20nov2003 | bug_fix | Gwenael CHAZAL | CodeWorker crashed when an expression was passed to a node parameter of any non–terminal BNF symbol, instead of passing a tree node. Now, it raises an error.
20nov2003 | feature | Maxime BOURGET | A BNF symbol resolved with success, has accepted the assignment of its scanned portion of sentence to a variable for a long time: `B:v` means that the text covered by B is assigned to v. Now, you can specify to concatenate the covered text to the ancient value of the variable: `B:+v`. Example: If v is worth `"nebula:"` and if the sentence starts with "Orion.", then v becomes `"nebula:Orion"` after the resolution of `#readIdentifier:+v`.
20nov2003 | improvement | - | The template functions accept a template–based script to define their body. The specialization of a function for a given template instantiation key is resolved at runtime. Example: `function f(x : node) {/*is a synonym of f<"">(x : node)*/} function f<T>(x : node) {{ // ‘{{‘ announces a template–based script, which // will generate the correct implementation during the instantiation insert x.@T@ = "@T@"; f<"@T.rsubString(1)@">(x); @ // ‘}}‘ announces the end of the template–based script }} f<"field">(project); traceObject(project);` Output: `Tracing variable ‘project‘: field = "field" fiel = "fiel" fie = "fie" fi = "fi" f = "f" End of variable‘s trace ‘project‘.`
19nov2003 | improvement | - | The engine has improved the compilation‘s speed of scripts.
17nov2003 | feature | Maxime BOURGET | A new BNF binary operator `‘|>‘` was added. The sequence `A |> B` is understood as considering the sub sentence scanned by `A`, which delimits the portion of text left visible to `B`. `B` starts scanning at the beginning of the sub sentence covered by `A` and cannot go beyond. When the operator has achieved with success, the cursor points to the end of the sub sentence covered by `A`. You‘ll find below the different steps processed by the operator: the BNF literal `A` is executed, if success, the cursor comes back to the beginning of the sub sentence covered by `A` then, `B` is executed, knowing that the operator forces the end of the sub sentence where `A` had finished, if success, the cursor points to the end of `A`, even if `B` hadn‘t scan up to the end of the sentence. Example: We want to recognize all colons present on a line. The sub sentence we would like to scan is a line: `–>‘\n‘`. Recognizing colons is like: `[–>‘:‘]*`, which asks for jumping from a colon to another, without considering the end of line. `–>‘\n‘ |> [–>‘:‘]*` restricts the colon recognition to the line.
17nov2003 | improvement | Maxime BOURGET | The BNF operator `‘–>‘` admits a syntax extension, for the adjustment of its internal mechanism. `–>A` jumps just after the the first matching of A in the sentence. It processes the equivalent piece of extended–BNF script: `=> local iLocation; ~[A => iLocation = getInputLocation();]* => setInputLocation(iLocation);` To intervene on the boundaries of the repeated sequence `[A ...]*`, an extension was added to the syntax: `–>boundaries A`, where boundaries gives the multiplicity of the bracketed sequence (`‘?‘`, `‘+‘`, `‘2..*‘`, `#repeat(iBegin, iEnd)` ...). Note: the boundaries must be declared just after the arrow. The text covered by `–>A` includes the unmatched characters plus the sub sentence scanned by A, so `–>A:v` assigns the complete covered text to the variable v. This is sometimes a drawback: perhaps do you want to take the unmatched character or the sub sentence scanned by A. So now, you can specify the variables intended to receive these intermediate values: `–>(:varBefore –:varAfter)A:varTotal` Note: the intermediate variables are declared just before the BNF symbol A, after the boundaries if any. Example: We will apply `[–>(:varBefore –:varAfter) #readNumeric]:varTotal` on the sentence `"Garfield.laziness 99.99 percent"`: varBefore = "Garfield.laziness " varAfter = "99.99" varTotal = "Garfield.laziness 99.99" The last extension brought to the jump operator `–>A` is to allow the execution of a BNF sequence at the beginning of the sub sequence matched by A. This BNF sequence is declared into the parenthesis used for the intermediate variables, behind these variables, if any: `–>(:varBefore –:varAfter B)A` The advantage of infiltrating the BNF sequence B is that the intermediate variables are populated, and that the cursor doesn‘t point after the matching of A yet, but at the beginning of the sub sentence matched by A.
- 15nov2003 | function | Maxime BOURGET | function getVariableAttributes(variable : treeref, list : tree) : int
  Parameter | Type | Description
  variable | treeref | the variable to explore
  list | tree | will contain the name and type (reference to another node or not) of each attribute
Populates a list with all attribute names of a tree node. The name of branches just below the node `variable` are put into `list`. The attribute‘s name is a key in the list and there is no value assigned to the item, except for attributes that point to another node (a reference). In that case, the item is worth the complete name of the referenced node. The function returns the number of attributes found, or a negative value (–1) if the tree node `variable` doesn‘t exist. Note: use `#evaluateVariable()` to navigate along a tree node, where the complete name is determined at runtime.
CodeWorker 3.1, 12nov2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2303028 | CodeWorker_WIN3_1.zip
Any platform (?) | sources | 1370834 | CodeWorker_SRC3_1.zip
Changes
Date | Type | Caller | Description
11nov2003 | feature | Maxime BOURGET | More than one customized ignore–clause is accepted now. Before, the customized ignore clause was written: `#ignore ::= /*production rule*/;`. Now, customized ignore clauses are declared with a key between brackets : `#ignore["designate this ignore clause"] ::= /*production rule*/;`. Into production rules, you specify the change with `#ignore(textit{"designate this ignore clause"`)}.
11nov2003 | feature | Maxime BOURGET | A new BNF directive is added: `#break`. It leaves successfully the closer repeat token into which the directive was put. Example: `["–––" #break | attribute]+` Here, the engine reads at least one attribute, and leaves with success when it encounters the string `"–––"`.
09nov2003 | bug_fix | - | Now, the procedure `executeString()` sees the scope of functions declared in the script that calls the procedure.
09nov2003 | improvement | - | The procedure `expand()` allows the pattern script passed as a block of instructions, instead of a script file name (behaviour already existing for `generate()`).
08nov2003 | improvement | - | A function name cannot be a reserved keyword anymore (should have been done a long time ago).
- 04nov2003 | function | Maxime BOURGET | function joinStrings(list : tree, separator : string) : string
  Parameter | Type | Description
  list | tree | the list that contains the strings to join
  separator | string | the sequence of chars that separates the strings
This function returns the concatenation of all strings put into `list`, putting a separator between each of them. If the list is empty, the function will return an empty string.
31oct2003 | improvement | - | The `foreach` statement allows the reverse iteration of unsorted items too.
- 30oct2003 | function | - | function equalsIgnoreCase(left : string, right : string) : bool
  Parameter | Type | Description
  left | string | first string to compare
  right | string | second string to compare
Compares two strings, ignoring the case. It returns `true` when the comparison succeeds.
20oct2003 | improvement | - | The building of plug–in packages (dynamic libraries written in C++) accepts some new features: more functions to handle parse trees, call of CodeWorker‘s functions from the plug–in
CodeWorker 3.0, 10oct2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2277244 | CodeWorker_WIN3_0.zip
Any platform (?) | sources | 1363933 | CodeWorker_SRC3_0.zip
Changes
Date | Type | Caller | Description
05oct2003 | feature | - | A new fundamental feature: extension of the language via packages implemented in executable modules (dynamic libraries), like in Tcl or other scripting languages. You can integrate your own functions or interface layers to work with databases or any other gluing requirements.
- 01oct2003 | function | - | procedure appendFile(filename : string, content : string)
  Parameter | Type | Description
  filename | string | name of the file to append
  content | string | sequence of characters to write at the end of the file
- Writes the text content at the end of the file filename. If the file doesn‘t exist, the function creates it. function composeSQLLikeString(text : string) : string
  Parameter | Type | Description
  text | string | a sequence of character to convert to a SQL-like string
Returns the conversion of the sequence of characters given by argument text to a SQL–like string, without single quote delimiters. It means that special characters of text are replaced by their escape sequence, the rest remaining the same. It recognizes the following escape sequences: ‘\\‘ as backslash (\), ASCII value 92, ‘\‘ ‘ as single quotation mark (‘), ASCII value 39, ‘\"‘ as double quotation mark ("), ASCII value 34, ‘\a‘ as alert (BEL), ASCII value 7, ‘\b‘ as backspace (BS), ASCII value 8, ‘\f‘ as formfeed (FF), ASCII value 12, ‘\n‘ as newline (LF), ASCII value 10, ‘\r‘ as carriage return (CR), ASCII value 13, ‘\t‘ as horizontal tab (HT), ASCII value 9, ‘\v‘ as vertical tab (VT), ASCII value 11, The function translates the single quote to an escape sequence "\‘", instead of repeating twice the single quote as in the SQL–standard. It presents the advantage of being more readable, but if you encounters a drawback in using this translation, apply replaceString() to change "\‘" in "‘‘".
30sep2003 | improvement | - | Improvement that concerns formatDate()/completeDate(): ‘%Q‘ is a new date/time format specifier that represents a SQL timestamp (equivalent to ‘%Y–%m–%d %H:%M:%S.%L‘).
CodeWorker 2.19.2, 30sep2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2226078 | CodeWorker_WIN2_19_2.zip
Any platform (?) | sources | 1340624 | CodeWorker_SRC2_19_2.zip
Changes
Date | Type | Caller | Description
28sep2003 | function | - | function getOutputFilename() : string Returns the path of the output file being generated.
25sep2003 | bug_fix | - | Very important: some troubles may have appeared on the use of first() and last() iterator functions in a recursive call to a foreach loop.
CodeWorker 2.19.1, 19sep2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2224846 | CodeWorker_WIN2_19_1.zip
Any platform (?) | sources | 1334448 | CodeWorker_SRC2_19_1.zip
Changes
Date | Type | Caller | Description
- 18sep2003 | function | - | function ceil(number : double) : int
  Parameter | Type | Description
  number | double | the floating-point number to ceil
- Returns the smallest integer that is greater than or equal to number. If number isn‘t a number, the function returns 0. function exp(x : double) : double
  Parameter | Type | Description
  x | double | the floating-point whose exponential is to compute
- Returns the exponential of x. On underflow, it returns 0. On overflow, it returns infinite. function log(x : double) : double
  Parameter | Type | Description
  x | double | the floating-point whose logarithm is to compute
Returns the logarithm of x. If x is negative, it throws an error. If x is 0, it returns infinite.
18sep2003 | bug_fix | - | Functions put into an arithmetic expression (between ‘$‘ symbols) didn‘t accept to pass string expressions to parameters.
14sep2003 | bug_fix | - | An embedded script now ignores insignificant characters following the trailing bracket: generate({...the embedded script...} /* insignificant characters */, project, "bubblegum.txt");
13sep2003 | bug_fix | - | Now, the engine doesn‘t allow the user to choose a non–terminal amongst reserved keywords function, declare or external.
CodeWorker 2.19, 12sep2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2218753 | CodeWorker_WIN2_19.zip
Any platform (?) | sources | 1304090 | CodeWorker_SRC2_19.zip
Changes
Date | Type | Caller | Description
10sep2003 | feature | - | Now, procedures running a script (for parsing / generating / translating / interpreting) accept the script to be embedded between { and }, instead of to give the path of the script necessary. It avoids the writing of a specific script file each time the developer requires a task of parsing or code generation. Example: `//generation of an HTML file, which shows the title and the content //of some financial market news previously extracted generate( {<html> <body> @ foreach i in this.news { @@composeHTMLLikeString(i.title)@<br>@endl()@@ @<table><tr><td>@endl()@@ @@composeHTMLLikeString(i.body) + endl()@@ @</td></tr></table>@endl()@@ } @ </body> </html> @}, project, "news.html");` It avoids the writing of 2 files, as it was unavoidable before: `generate("news2HTML.gen", project, "news.html");` such as "news2HTML.gen", which contains: `<html> <body> @ foreach i in this.news { @@composeHTMLLikeString(i.title)@<br>@endl()@@ @<table><tr><td>@endl()@@ @@composeHTMLLikeString(i.body) + endl()@@ @</td></tr></table>@endl()@@ } @ </body> </html>`
10sep2003 | feature | - | Add of a new boolean operator that checks whether the result of an expression belongs to a set or not: sHTMLTag in { ‘i‘, "kbd" } returns true if sHTMLTag is worth ‘i‘ or "kbd" and false in all other cases.
09sep2003 | bug_fix | Gilles GHATTAS | Now, the engine checks whether a function is allowed for a type of script. Example: getInputFilename() isn‘t allowed in a common script, because it should be present in parse scripts only (it gives the name of the file being currently parsed). Now, if you try to use this function in a common script, a syntax error occurs.
- 08sep2003 | function | - | function resolveFilePath(filename : string) : string
  Parameter | Type | Description
  filename | string | the path of the file to resolve
Searches the file filename in the current directory and, if fails, it continues searching it in the include directories (‘–I‘ switch on the command line). It returns the location of the file in directories, removing any ambiguity. If the file doesn‘t exist, the function returns an empty string. If filename points to a virtual file, the function returns filename.
CodeWorker 2.18, 08sep2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2194114 | CodeWorker_WIN2_18.zip
Any platform (?) | sources | 1318051 | CodeWorker_SRC2_18.zip
Changes
Date | Type | Caller | Description
04sep2003 | improvement | - | Add of the unary negation operator in arithmetic expressions.
04sep2003 | improvement | Eric NICOLAS | An arithmetic expression between ‘$‘ or an expression between parenthesis wasn‘t admitted by the parser as an expression to flush in the output file of a template–based script (expression embedded between ‘@‘).
03sep2003 | bug_fix | Gwenael CHAZAL | Removal of superfluous ‘0‘ that may have appeared in some cases on floating–point numbers.
02sep2003 | bug_fix | Eric NICOLAS | The indentation of C++ files was incorrect when the algorithm was confronted to "::" in functions indentFile() or indentText().
01sep2003 | function | - | function countInputLines() : int Determines the current line number where the parse cursor points to. function getInputFilename() : string Returns the path of the input file being parsed.
31aug2003 | feature | - | Add of a new BNF directive called #skipIgnore, which forces the skipping of insignificant characters (set by the #ignore(...) directive) at the current position of the parse cursor. The directive is always true, even if the parsing has already reached the end of file or if there are no insignificant characters.
CodeWorker 2.17.4, 08sep2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2181698 | CodeWorker_WIN2_17_4.zip
Any platform (?) | sources | 1307333 | CodeWorker_SRC2_17_4.zip
Changes
Date | Type | Caller | Description
20aug2003 | function | - | function skipEmptyCppExceptDoxygen() : bool Ignores all blank characters and all C++/JAVA–like comments, except when the comment conforms to the Doxygen format. The current file position moves to the first character that must be kept.
Changes on private version 2.17.3
Date | Type | Caller | Description
19aug2003 | bug_fix | - | While parsing C++ comments, Ada–like comments were detected too.
CodeWorker 2.17.2, 13aug2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2181994 | CodeWorker_WIN2_17_2.zip
Any platform (?) | sources | 1271448 | CodeWorker_SRC2_17_2.zip
Changes
Date | Type | Caller | Description
13aug2003 | bug_fix | Gwenael CHAZAL | A bug has appeared in the last version 2.17.1: sometimes, assignment instructions not prefixed by a set statement may raise a syntax error (‘;‘ expected).
04aug2003 | improvement | - | Before, template functions had a specific body for each function instantiation: function f<"a">() { /*body of f<"a">()*/ } function f<"b">() { /*body of f<"b">()*/ } but no generic template body, such as generic programming with C++ templates. Now, it exists: function f<T>() { /*generic template body when no specific function instantiation is found*/ } Classical example: `function f<1>() { return 1; } function f<N>() { return $N*f<$N – 1$>()$; } traceLine("10! = " + f<10>());`
CodeWorker 2.17.1, 01aug2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2177557 | CodeWorker_WIN2_17_1.zip
Any platform (?) | sources | 1268530 | CodeWorker_SRC2_17_1.zip
Changes
Date | Type | Caller | Description
31jul2003 | bug_fix | - | The method–like syntax for calling a procedure wasn‘t parsed correctly: now, myHTMLContext.clearVariable() is well–recognized and is worth clearVariable(myHTMLContext).
17jul2003 | bug_fix | - | Parsing error when an arithmetic shift operator was following an identifier: writing $iValue << 1$ was raising the unrelevant error literal expected.
CodeWorker 2.17, 11jul2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2178583 | CodeWorker_WIN2_17.zip
Any platform (?) | sources | 1195033 | CodeWorker_SRC2_17.zip
Changes
Date | Type | Caller | Description
08jul2003 | feature | - | Now, a BNF sequence may be repeated a variable number of times: `[BNF–sequence]#repeat(begin–expression[, end–expression])` where #repeat specifies how many times the sequence must be repeated, after resolving the boundary values given by the arithmetic expressions.
- 07jul2003 | function | - | function hostToNetworkLong(bytes : string) : string
  Parameter | Type | Description
  bytes | string | a 4-bytes representation of a long integer sorted in the host bytes order
- Converts a 4–bytes representation of a long integer to the network bytes order. CodeWorker stores a byte as a 2–hexadecimal digits; the function raises an error if the argument bytes is malformed. Use longToBytes() and bytesToLong() to swap between decimal and host binary representation of a long integer. function networkLongToHost(bytes : string) : string
  Parameter | Type | Description
  bytes | string | a 4-bytes representation of a long integer sorted in the network bytes order
- Converts a 4–bytes representation of a long integer to the host bytes order. CodeWorker stores a byte as a 2–hexadecimal digits; the function raises an error if the argument bytes is malformed. Use longToBytes() and bytesToLong() to swap between decimal and host binary representation of a long integer. function hostToNetworkShort(bytes : string) : string
  Parameter | Type | Description
  bytes | string | a 2-bytes representation of a short integer sorted in the host bytes order
- Converts a 2–bytes representation of a short integer to the network bytes order. CodeWorker stores a byte as a 2–hexadecimal digits; the function raises an error if the argument bytes is malformed. Use shortToBytes() and bytesToShort() to swap between decimal and host binary representation of a short integer. function networkShortToHost(bytes : string) : string
  Parameter | Type | Description
  bytes | string | a 2-bytes representation of a short integer sorted in the network bytes order
Converts a 2–bytes representation of a short integer to the host bytes order. CodeWorker stores a byte as a 2–hexadecimal digits; the function raises an error if the argument bytes is malformed. Use shortToBytes() and bytesToShort() to swap between decimal and host binary representation of a short integer.
- 07jul2003 | function | - | function longToBytes(long : ulong) : string
  Parameter | Type | Description
  long | ulong | an unsigned long integer using the decimal base
- Converts an unsigned long integer in decimal base to its 4–bytes representation. Bytes are ordered in the host order (memory storage). function shortToBytes(short : ushort) : string
  Parameter | Type | Description
  short | ushort | an unsigned short integer using the decimal base
- Converts an unsigned short integer in decimal base to its 2–bytes representation. Bytes are ordered in the host order (memory storage). function bytesToShort(bytes : string) : ushort
  Parameter | Type | Description
  bytes | string | a 2-bytes representation of an unsigned short integer (host bytes order)
- Converts a 2–bytes representation of an unsigned short integer to its decimal representation. Bytes are ordered in the host order (memory storage). If the argument bytes is malformed, the function raises an error. function bytesToLong(bytes : string) : ulong
  Parameter | Type | Description
  bytes | string | a 4-bytes representation of an unsigned long integer (host bytes order)
Converts a 4–bytes representation of an unsigned long integer to its decimal representation. Bytes are ordered in the host order (memory storage). If the argument bytes is malformed, the function raises an error.
06jul2003 | feature | - | Two new BNF directives have appeared: #readBytes(length–expr): to read a sequence of bytes, where the arithmetic expression length–expr determines how many bytes to read, #readChars(length–expr): to read a sequence of characters, where the arithmetic expression length–expr determines the length of the text,
- 05jul2003 | function | - | function createINETClientSocket(remoteAddress : string, port : int) : int
  Parameter | Type | Description
  remoteAddress | string | a remote IP address (Internet namespace)
  port | int | a remote port number
- This function creates a client socket and connects it to the specified remote port, at the specified address IP remoteAddress, and returns a new socket descriptor. The socket is of type stream. Once the creation has achieved, use directly the send/receive functions or attachInputToSocket()/attachOutputToSocket for reading/writing to the socket via a BNF–parsing/template–based script. function createINETServerSocket(port : int, backLog : int) : int
  Parameter | Type | Description
  port | int | a local port number
  backLog | int | maximum queue length for incoming connection (1-5)
- This function creates a server socket bound to port and returns a new socket descriptor. The socket is of type stream. The argument backLog specifies the size of the queue connection. A new connection is refused when the queue is full. Once the creation has achieved, use the function acceptSocket() to wait for a new client connection (blocking call). function acceptSocket(serverSocket : int) : int
  Parameter | Type | Description
  serverSocket | int | a server socket previously created via \samp{createINETServerSocket()}
- This function blocks until a client connection arrives, and returns the corresponding socket descriptor. Once a connection has been established, use directly the send/receive functions or attachInputToSocket()/attachOutputToSocket for reading/writing to the socket via a BNF–parsing/template–based script. procedure attachInputToSocket(socket : int)
  Parameter | Type | Description
  socket | int | a client socket descriptor
- Joins the input stream of a parsing script to a socket stream: each time that the input stream pointer reaches the end, the interpreter waits for bytes coming from the socket. Waiting for bytes is a blocking process, so once you don‘t expect for other bytes anymore, don‘t forget to detach the socket via the procedure detachInputFromSocket() before reaching the end of the stream. procedure detachInputFromSocket(socket : int)
  Parameter | Type | Description
  socket | int | a client socket descriptor
- Disconnects the input stream of a parsing script from a socket stream. You should have join the socket to the input stream before, via the procedure attachInputToSocket(). procedure attachOutputToSocket(socket : int)
  Parameter | Type | Description
  socket | int | a client socket descriptor
- Joins the output stream of a template–based or translation script so that to send the generated text to the socket. The generated text is sent at the end of the complete script execution. procedure detachOutputFromSocket(socket : int)
  Parameter | Type | Description
  socket | int | a client socket descriptor
- Disconnects the output stream of a parsing script from a socket stream. You should have join the socket to the output stream before, via the procedure attachOutputToSocket(). To call only if you have changed your mind and don‘t want the generated text to be sent to the socket at the end of the template–based script execution anymore. function flushOutputToSocket(socket : int) : bool
  Parameter | Type | Description
  socket | int | a client socket descriptor
- Sends to a socket the complete text or binary data already generated by the template–based or translation script. The function then purges the output stream. This function has no link with attachOutputToSocket(). It only requires that the socket descriptor exists and is opened correctly. function receiveBinaryFromSocket(socket : int, length : int) : string
  Parameter | Type | Description
  socket | int | a client socket descriptor
  length | int | number of bytes to read
- This function waits for length bytes to read from socket, and returns a sequence of bytes (CodeWorker represents a byte with 2 hexadecimal digits). If an error occurs, the function returns an empty string. function receiveFromSocket(socket : int, isText : boolref) : string
  Parameter | Type | Description
  socket | int | a client socket descriptor
  isText | boolref | the function will populate this parameter with \samp{true} if read bytes designate a string and \samp{false} if they are binary data
- This function waits for bytes to read from socket and returns them. If an error occurs, the function returns an empty string. The function sets isText to: true if it has received a text, false if it has received binary data: the returned string is then a sequence of bytes (CodeWorker represents a byte with 2 hexadecimal digits), function receiveTextFromSocket(socket : int, length : int) : string
  Parameter | Type | Description
  socket | int | a client socket descriptor
  length | int | size of the text to read
- This function waits for length bytes to read from socket, and returns a string. If an error occurs, the function returns an empty string. function sendTextToSocket(socket : int, text : string) : bool
  Parameter | Type | Description
  socket | int | a client socket descriptor
  text | string | the text to write
- This function writes a text to a socket and returns true if it has achieved successfully. function sendBinaryToSocket(socket : int, bytes : string) : bool
  Parameter | Type | Description
  socket | int | a client socket descriptor
  bytes | string | a sequence of bytes to write
- This function writes binary data to a socket and returns true if it has achieved successfully. The function raises an error if a byte passed to bytes is malformed: CodeWorker expects 2 hexadecimal digits to represent a byte. procedure closeSocket(socket : int)
  Parameter | Type | Description
  socket | int | a \textit{client}/\textit{server} socket descriptor
This procedure closes the socket descriptor specified to the argument socket.
01jul2003 | behaviour | - | Now, the function getFloatingLocation() raises an error if the floating location doesn‘t exist.
- 29jun2003 | function | - | procedure insertTextToFloatingLocation(location : string, text : string)
  Parameter | Type | Description
  location | string | the name of a floating location
  text | string | sequence of characters to insert
- Inserts a sequence of characters passed to argument text, at the position of the floating location, whose name is given by the argument location. If the floating location doesn‘t exist, the function raises an error. In expansion mode, the floating location might point into a markup area previously generated. So, on the contrary of insertText(), the function permits to insert text out of the current markup area. procedure insertTextOnceToFloatingLocation(location : string, text : string)
  Parameter | Type | Description
  location | string | the name of a floating location
  text | string | sequence of characters to insert
- Inserts a sequence of characters passed to argument text, at the position of the floating location, whose name is given by the argument location, but only if the text has never been encountered previously by a insertTextOnce() or a writeTextOnce()procedure. If the floating location doesn‘t exist, the function raises an error. In expansion mode, the floating location might point into a markup area previously generated. So, on the contrary of insertTextOnce(), the function permits to insert text out of the current markup area. function existFloatingLocation(key : string, parent : bool) : bool
  Parameter | Type | Description
  key | string | name of a floating position into the output stream
  parent | bool | while expanding a file, search into precedent markup area if this floating location exists or not
Returns true if the floating location, whose name is passed to argument key, already exists. If required (parameter parent set to true) and if the current output file is being expanded, the function searches the floating location in precedent visited markup areas.
29jun2003 | bug_fix | Gwenael CHAZAL | The function completeDate() didn‘t work correctly on the Excel–like date format %t (fractionable number of days since december 30th, 1899).
28jun2003 | bug_fix | - | Now, the functions send/get/postHTTPRequest() extract binary data correctly.
CodeWorker 2.16, 23jun2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2106940 | CodeWorker_WIN2_16.zip
Any platform (?) | sources | 1497884 | CodeWorker_SRC2_16.zip
Changes
If you wish to recompile sources, please note that from now on, CodeWorker doesn‘t need SWORD and ACE libraries anymore. Nevertheless, it requires libcurl as a dynamic library from now. The tool uses libcurl for sending HTTP requests only. If you don‘t need this functionality, you might recompile sources after having disabled the preprocessor definition CODEWORKER_CURL_LIB.
Date | Type | Caller | Description
13jun2003 | feature | Gwenael CHAZAL | Now, foreach statement may iterate in reverse order: `foreach i in reverse sorted list ...`
CodeWorker 2.15, 11jun2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2075146 | CodeWorker_WIN2_15.zip
Any platform (?) | sources | 1263521 | CodeWorker_SRC2_15.zip
Changes
Date | Type | Caller | Description
- 10jun2003 | function | - | procedure autoexpand(outputFileName : string, this : treeref)
  Parameter | Type | Description
  outputFileName | string | the existing file to expand
  this | treeref | the current node that will be accessed with \textit{this} variable
Expands an existing file whose name is passed to the argument outputFileName, executing template–based scripts located at each markup. The file contains its own scripts for expanding code. Expanding a file consists of generating code into marked out areas only, the rest of the file remaining the same. The markup is put into a comment, knowing that the syntax of the comment must conform to the type of the expanded file outputFileName. So, an HTML file expects <!– – and – –>, a JAVA file is waiting for // and "\n", ... The markup is announced by ##markup## followed by a string that represents the markup key. Don‘t forget to configure correctly the syntax of comment boundaries with procedures setCommentBegin() (see setCommentBegin()) and setCommentEnd() (see setCommentEnd()). When the procedure is called, CodeWorker jumps from a markup to another. To handle a markup, it checks whether text was already generated, put between tags ##begin##"markup–key" and ##end##"markup–key", added automatically the first time an expansion is required, to demarquate the portion of code that doesn‘t belong to the user. Then, it extracts all protected areas, if any, and it generates code at the position of the markup, adding begin/end tags seen before. The interpreter reclaims the tags ##script## just after the markup. It extracts the embedded text, considered as a template–based script, eventually put between comments, and the interpreter executes this embedded script. Note that some data might be put between tags ##data##, accessible in the template–based script via the function getMarkupValue() (see getMarkupValue()). This block of custom data comes after the ##script## tag, if present. Be careful not to confuse this prodedure with generate() that doesn‘t care about markups and that overwrites the output file completely, except protected areas of course.
09jun2003 | feature | - | Add of a BNF general directive called #parameters.
08jun2003 | improvement | - | When looking for an included script (#include "included–script.gen") in the filesystem, if the included script is known as a relative path, the preprocessor starts searching from the directory of the caller script. Before, the preprocessor was starting from the current directory.
06jun2003 | bug_fix | - | In expansion mode only, the interpreter was forgotting to keep for checking the protected areas that weren‘t interesting anymore the template–based script.
05jun2003 | feature | - | Add of the extended–BNF directive ‘#super‘ to call an overloaded non–terminal.
CodeWorker 2.14, 04jun2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2053598 | CodeWorker_WIN2_14.zip
Any platform (?) | sources | 1139467 | CodeWorker_SRC2_14.zip
Changes
Date | Type | Caller | Description
04jun2003 | function | - | procedure traceEngine() Traces some states about the interpreter and the current script.
04jun2003 | option | - | Add of a new option on the command line: -insert
03jun2003 | feature | - | A translation script might require to transform scanned characters before copying them implicitely in the output: #implicitCopy(composeHTMLLikeString) means that each scanned character is transformed to HTML before writing it by implicit copy.
03jun2003 | feature | - | BNF production rules are overloadable thanks to the directive #overload: #overload nonterminal ::= ...; replaces the ancient nonterminal clause by a new production rule.
01jun2003 | note | - | Function getMarkerKey() is deprecated and replaced by getMarkupKey().
01jun2003 | function | - | function getMarkupValue() : string This function must be called into a pattern script that runs in expansion mode. It returns the current markup value, if any, put between tags ‘##data##‘ after declaring the markup key.
01jun2003 | improvement | - | Add of a data section, attached to expansion markups (put between ##data## tags just after the ##markup## tag).
01jun2003 | note | - | For expansion mode, ##markup## replaces the tag ##marker##.
- 28may2003 | function | - | function changeFileTime(filename : string, accessTime : string, modificationTime : string) : int
  Parameter | Type | Description
  filename | string | name of the file to set
  accessTime | string | date-time of the last access
  modificationTime | string | date-time of the last modification
The function changes the access and modification times of the file filename. The user ID of the process must be the owner of the file, or the process must have appropriate privileges. In case of failure, the function returns a negative integer: –1: unknown error that shouldn‘t appear, –2: permission denied, –3: too many files have been opened, –4: file not found, –5: invalid times argument,
CodeWorker 2.13, 27may2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2662129 | CodeWorker_WIN2_13.zip
Any platform (?) | sources | 1095172 | CodeWorker_SRC2_13.zip
Changes
Date | Type | Caller | Description
27may2003 | bug_fix | - | When called via a C++ binding, bad context variable passed to CGRuntime::expand(), CGRuntime::parseAsBNF() and CGRuntime::generate().
26may2003 | feature | - | Add of template BNF clauses (non–terminal symbols) where the instantiation isn‘t resolved. Example: nonterminal<"Case 1"> ::= ...; nonterminal<"Case 2"> ::= ...; are instantiations of nonterminal resolved for "Case 1" and "Case 2". nonterminal<T> ::= ...; is a template BNF clause where the instantiation isn‘t resolved and that describes the generic implementation of the production rule. It will be called for "Case 3" or any constant different of "Case 1" and "Case 2".
CodeWorker 2.12, 22may2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2656478 | CodeWorker_WIN2_12.zip
Any platform (?) | sources | 1086858 | CodeWorker_SRC2_12.zip
Changes
Date | Type | Caller | Description
- 19may2003 | function | Gwenael CHAZAL | procedure randomSeed(seed : int)
  Parameter | Type | Description
  seed | int | a new seed for generating pseudorandom integers
Sets the seed for generating a series of pseudorandom integers. To change the seed to a given starting point, choose any positive value different of 1 as the seed argument. A value of 1 reinitializes the generator. Any negative value let CodeWorker choose a random seed for you. function randomInteger() : int Generates a pseudorandom number.
- 19may2003 | function | - | procedure copyGenerableFile(sourceFileName : string, destinationFileName : string)
  Parameter | Type | Description
  sourceFileName | string | the name of the file to copy
  destinationFileName | string | the name of the copy
This procedure copies a generable file sourceFileName to another location destinationFileName if the files have differences in the hand–typed text. It raises an error if something wrong has happened (either the source file doesn‘t exist or permissions are insufficient for copy). A generable file is any source file containing protected areas or expandable markups.
15may2003 | feature | - | Add of the ternary operator: ternary–expr ::= boolean–expr ‘?‘ expression1 ‘:‘ expression2 where expression1 is executed if the condition is verified, and expression2 otherwise.
12may2003 | function | Eric NICOLAS | function UUID() : string This function generates an UUID and returns it as a string. An UUID is a 128–bit universally unique id, used by Microsoft and being proposed as an internet standard.
CodeWorker 2.11, 25apr2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2618310 | CodeWorker_WIN2_11.zip
Any platform (?) | sources | 1062258 | CodeWorker_SRC2_11.zip
Changes
Date | Type | Caller | Description
- 24apr2003 | function | - | procedure environTable(table : tree)
  Parameter | Type | Description
  table | tree | will contain the list of all environment variable names
The procedure returns the array of all environment variable in the argument table. The name of the environment variable is assigned to the value of the item.
24apr2003 | bug_fix | - | The BNF operator –> had a strange behaviour when the matched input was assigned to a variable (–>BNF–expression:variable). While translating a file in #implicitCopy mode, the content of the variable was written in the destination file, whereas the matched input of BNF–expression had already been copied. Consequence: the matched input of BNF–expression was appearing twice in the destination file.
- 24apr2003 | function | - | procedure setFloatingLocation(key : string, location : int)
  Parameter | Type | Description
  key | string | name of a floating position to put into the output stream
  location | int | the position into the output stream to assign to the key, starting at \samp{0}
Assigns a position to the floating location whose name is passed to argument key.
- 22apr2003 | function | - | procedure openLogFile(filename : string)
  Parameter | Type | Description
  filename | string | name of the file where log information will be put
Creates (or erases if already exists) a log file, which remains valid upto the end of the execution. Each trace function (traceLine(), traceText(), traceStack()) will write in the log file. This function is very convenient for debugging a CGI script, where the standard output is devoted to the result page. Note that passing an empty filename stops the log mechanism.
- 22apr2003 | function | Gwenael CHAZAL | function completeDate(date : string, format : string) : string
  Parameter | Type | Description
  date | string | a date-time representation to complete
  format | string | the format that the \samp{date} argument conforms to
Completes the date passed to the argument date, so as it conforms to the syntax of a date in CodeWorker meaning: "%d%b%Y %H:%M:%S.%L". Starting from today date with reset time (00:00:00.0), it replaces date–time characteristics with those of the parameter date and returns the result of the substitutions.
22apr2003 | improvement | Gwenael CHAZAL | Add of two new formats in formatDate(): ‘%w‘ means that the weekday must be written as an integer (0–6; 0 is sunday), ‘%W‘ means that the weekday must be written as the complete english name,
CodeWorker 2.10, 18apr2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2597932 | CodeWorker_WIN2_10.zip
Any platform (?) | sources | 1050598 | CodeWorker_SRC2_10.zip
Changes
From now, CodeWorker is able to run as a CGI program. It may be attached to the ".gen" file extension. See the script repository for discovering some use–cases.
Date | Type | Caller | Description
18apr2003 | feature | - | CodeWorker can run as a CGI program.
- 17apr2003 | function | - | function encodeURL(URL : string) : string
  Parameter | Type | Description
  URL | string | readable URL to encode
- Encode an URL for an HTTP request, meaning that the space character changes in ‘+‘ and all non–alphanumeric characters are encoded in hexadecimal, preceded by ‘%‘. Note that conversions are transparent while doing HTTP requests. function decodeURL(URL : string) : string
  Parameter | Type | Description
  URL | string | readable URL to encode
Decode an URL from an HTTP request, meaning that the ‘+‘ character changes in a space and all hexadecimal descriptions of bytes (2 digits preceded by ‘%‘) are converted to characters. Note that conversions are transparent while doing HTTP requests.
Changes on private version 2.09
This version runs under CygWin correctly. One should be able to make a Linux version from source files (not checked yet, next step).
Date | Type | Caller | Description
16apr2003 | bug_fix | Laurent RIESTERER | The function saveProject() didn‘t write node references. Now, a node reference is announced with the keyword __REFERENCE in the XML output of the project.
- 14apr2003 | function | - | function getNow() : string Returns the current date–time, conforming to the format: %d%b%Y %H:%M:%S.%L For explanations about format types, see function formatDate at {formatDate()}. procedure setNow(constantDateTime : string)
  Parameter | Type | Description
  constantDateTime | string | the current date-time is fixed to this value
Fixes the current date–time to the value passed to argument constantDateTime, conforming to the format: %d%b%Y %H:%M:%S.%L The procedure doesn‘t change the system time. now is just frozen for the scripting language when calling getNow(). One passes an empty date–time to unfreeze the time. For explanations about format types, see function formatDate at {formatDate()}.
07apr2003 | feature | - | The scripting language offers to declare global variables. Up to now, the only way to declare global variables was to put them somewhere in the project main tree. The global statement was added to provide the feature: global–statement ::= "global" variable [‘=‘ expression–to–assign]?
- 04apr2003 | function | - | function existEnv(variable : string) : bool
  Parameter | Type | Description
  variable | string | the environment variable name
The function returns true if the environment table entry contains the variable.
CodeWorker 2.08, 03apr2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2539560 | CodeWorker_WIN2_08.zip
Any platform (?) | sources | 1011071 | CodeWorker_SRC2_08.zip
Changes
Date | Type | Caller | Description
- 01apr2003 | function | - | procedure setWorkingPath(path : string)
  Parameter | Type | Description
  path | string | the new working path
Changes the output directory that was assigned to the option –path on the command line.
- 31mar2003 | function | - | function getIncludePath() : string It returns the include path passed to the command line with one or more times the setting of option –I, or the latest include path set via the procedure setIncludePath(). The include path is a concatenation of paths separated by semi–commas ( extbf{‘;‘}). procedure setIncludePath(path : string)
  Parameter | Type | Description
  path | string | a concatenation of paths separated by \textbf{';'}
It changes the include path passed to the command line with one or more times the setting of the option –I. The include path expects a concatenation of paths separated by semi–commas (‘;‘).
- 26mar2003 | function | - | procedure overwritePortion(location : int, text : string, size : int)
  Parameter | Type | Description
  location | int | points to a position in the output stream
  text | string | sequence of characters to write
  size | int | size of the portion to overwrite
Writes a sequence of characters passed to argument text, at the position of the output stream given by argument location. The text overwrites up to size characters and inserts the rest if any. The position starts counting at 0. About the behaviour of the overwriting: If there are more than size characters in text, all floating locations that point to location + size, or after, are impacted by the insertion of the remaining characters of text, and shift for an offset that is worth the size of the text minus the size of the portion to overwrite. overwritePortion(pos, text, 0) is worth insertText(pos, text). If the portion to overwrite is bigger than the length of text, all not overwritten characters of the portion are removed. overwritePortion(pos, "", size) removes size characters from the output stream at position pos. If the position isn‘t valid, negative or bigger than the end of the output stream, an error is raised. In expansion mode, the position 0 points to the first character written for expansion and cannot exceed the last character written for expansion. Generally, the position is given by the function getFloatingLocation().
26mar2003 | improvement | - | translation scripts admit calls to both parsing and code generation functions in the procedural statement blocks (e.g. announced by the symbol =>).
26mar2003 | improvement | - | BNF–parsing scripts admit calls to parsing functions in the procedural statement blocks (e.g. announced by the symbol => in the production rules).
- 24mar2003 | function | - | function findNextString(text : string, find : string, position : int) : int
  Parameter | Type | Description
  text | string | a sequence of characters to explore
  find | string | a substring to find into \samp{text}
  position | int | the position in the string (starting at 0) the search must begin
Returns the lowest beginning index of the substring find that matches the sequence of characters passed to argument text, starting the search at position. The index starts counting to 0. If the substring find doesn‘t belong to text (starting at position), the negative value –1 is returned.
10mar2003 | feature | - | Add of motif expressions that enable to operate on the logical structure of a tree. It allows filtering and selecting the nodes of a tree, which match a motif. This is something like XPath, but working on a parse tree of CodeWorker instead of an XML tree.
10mar2003 | feature | - | Add of a new statement called select, which operates a little like the foreach statement, but iterating a list of nodes that match a motif expression. It is similar to the <xsl:foreach select=motif > XSL statement.
CodeWorker 2.07, 06mar2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2487490 | CodeWorker_WIN2_07.zip
Any platform (?) | sources | 2017720 | CodeWorker_SRC2_07.zip
Changes
Date | Type | Caller | Description
06mar2003 | bug_fix | - | The function readIdentifier() didn‘t match the rule [‘a‘..‘z‘ | ‘A‘..‘Z‘ | ‘_‘][‘a‘..‘z‘ | ‘A‘..‘Z‘ | ‘_‘ | ‘0‘..‘9‘]* correctly.
06mar2003 | feature | - | Now, the scripting language accepts char literals, written as in C/JAVA and converted to a string literal.
Changes on private version 2.06
If you wish to recompile sources, please note that from now on, CodeWorker requires both SWORD and ACE libraries as static.
Date | Type | Caller | Description
05mar2003 | feature | - | Add of a new BNF directive: #insert(variable) sequence–of–BNF–instructions. The directive creates a new node variable (if it doesn‘t exist yet) and executes the sequence of BNF instructions that follow. If the sequence fails and if the node was created by the directive, variable is removed.
05mar2003 | bug_fix | - | When #pushItem had created the variable to which push a new item, it wasn‘t removed in case of failure in the sequence of tokens.
- 05mar2003 | function | - | procedure removeVariable(node : tree)
  Parameter | Type | Description
  node | tree | the node to remove from the tree
All attributes of the argument node are deleted, its array of nodes is cleared and its value becomes an empty string. If the node was referring to another node, the link is cleared. Once these task are completed, the variable node is removed from the tree it belongs to (as an attribute or an element). Note that trying to remove a local variable throws an error.
- 04mar2003 | function | - | function getHTTPRequest(URL : string, HTTPSession : tree, arguments : tree) : string
  Parameter | Type | Description
  URL | string | URL of the HTTP server
  HTTPSession | tree | an object to describe the HTTP session
  arguments | tree | list of the arguments to GET; the key contains the name of the argument and the element gives the value
- This function sends an HTTP‘s GET request to the HTTP server pointed to by the parameter URL with the list of arguments put into the the parameter arguments. The function returns the document read from the HTTP server. The function sendHTTPRequest() (see {sendHTTPRequest()}) describes the structure of the HTTP session object. function postHTTPRequest(URL : string, HTTPSession : tree, arguments : tree) : string
  Parameter | Type | Description
  URL | string | URL of the HTTP server
  HTTPSession | tree | an object to describe the HTTP session
  arguments | tree | list of the arguments to POST; the key contains the name of the argument and the element gives the value
- This function sends an HTTP‘s POST request to the HTTP server pointed to by the parameter URL with the list of arguments put into the the parameter arguments. The function returns the document read from the HTTP server. The function sendHTTPRequest() (see {sendHTTPRequest()}) describes the structure of the HTTP session object. function sendHTTPRequest(URL : string, HTTPSession : tree) : string
  Parameter | Type | Description
  URL | string | URL of the HTTP server
  HTTPSession | tree | an object to describe the HTTP session
This function sends an HTTP request to the HTTP server pointed to by the argument URL, and returns the document read from the HTTP server. If the request fails, an error message is thrown. The well–named argument HTTPSession specifies some information into devoted attributes: agent (optional) is the browser name, "CodeWorker" by default, referer (optional), proxy (optional): proxy.host (compulsory), proxy.port (compulsory), cookies (optional) is a list of nodes such as: name (compulsory), value (optional) is worth by default, path (optional), domain (optional), expires (optional) for a permanent cookie,
Changes on private version 2.05
Date | Type | Caller | Description
28feb2003 | feature | - | Add of the arithmetic bit shift operators << and >>, available in arithmetic expressions only.
28feb2003 | feature | - | Add of the arithmetic bitwise not operator ~, available in. arithmetic expressions only.
27feb2003 | bug_fix | - | File handles weren‘t closed after calling any function like file*(...) (fileSize(...), fileLastModification(...), ...).
CodeWorker 2.04, 26feb2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2369560 | CodeWorker_WIN2_04.zip
Any platform (?) | sources | 3095268 | CodeWorker_SRC2_04.zip
Changes
Date | Type | Caller | Description
26feb2003 | feature | - | Add of directive #evaluateVariable(expression) to resolve a branch at runtime: `pushItem #evaluateVariable("variable.list");` is equivalent to: `pushItem variable.list;` and is useful when the branch is known at runtime exclusively. Below, an new item is added to an attribute of a variable v, and the name of the attribute is held by the variable a: `function f(v : variable, a : value) { pushItem #evaluateVariable("v." + a);` It allows building the structure of the parse tree dynamically. It is the case when parsing an XML file with no information about its DTD.
26feb2003 | feature | - | Add of a new BNF directive: #pushItem(variable) sequence–of–BNF–instructions. The directive pushes a new item into the array of the node variable and executes the sequence of BNF instructions that follow. If the sequence fails, the last element of the array variable is removed.
21feb2003 | improvement | Gwenael CHAZAL | The memory space of parse trees has been reduced, and will be more later.
- 17feb2003 | function | - | procedure removeFirstElement(list : tree)
  Parameter | Type | Description
  list | tree | an array of nodes
- Removes the first element from the array of nodes called list. Nothing occurs if list doesn‘t exist or is empty. procedure removeLastElement(list : tree)
  Parameter | Type | Description
  list | tree | an array of nodes
Removes the last element from the array of nodes called list. Nothing occurs if list doesn‘t exist or is empty.
17feb2003 | bug_fix | - | Use of free memory might have occurred on function removeElement().
- 12feb2003 | function | - | function octalToDecimal(octalNumber : string) : int
  Parameter | Type | Description
  octalNumber | string | an octal integer to convert to a decimal number
- Converts an octal integer, passed to the argument octalNumber, to a signed decimal integer and returns the result. If octalNumber doesn‘t conform to the syntax of an octal number (octalNumber ::= #!ignore [‘0‘..‘8‘]+), the function raises an error. function hexaToDecimal(hexaNumber : string) : int
  Parameter | Type | Description
  hexaNumber | string | an hexadecimal integer to convert to a decimal number
Converts an hexadecimal integer, passed to the argument hexaNumber, to a signed decimal integer and returns the result. If hexaNumber doesn‘t conform to the syntax of an hexadecimal number (hexaNumber ::= #!ignore [‘0‘..‘9‘ | #noCase ‘A‘..‘F‘]+), the function raises an error.
06feb2003 | improvement | - | Now, the option ‘–c++‘ admits a second optional parameter, which is the root path of CodeWorker either in development or distributed state (subfolders aren‘t the same).
06feb2003 | improvement | - | Better way to ignore insignificant characters between tokens. May have corrected strange behaviors in some use cases.
06feb2003 | feature | - | Add of a new predefined BNF clause: #readCompleteIdentifier is valid if and only if the current position of the input stream coincides with the beginning of an identifier. Examples: if the current position points to the fifth character... #readCompleteIdentifier scans "room" from the input stream "1234room", #readCompleteIdentifier fails to scan the input stream "mushroom", because "room" doesn‘t coincide with the beginning of an identifier, but is a part of "mushroom".
06feb2003 | bug_fix | - | The implicit copy of source–to–source translation (running the BNF–translation script in #implicitCopy mode) wasn‘t working correctly while copying ignored characters (specified by #ignore(...)) to the output stream.
06feb2003 | bug_fix | - | The implicit copy of source–to–source translation (running the BNF–translation script in #implicitCopy mode) wasn‘t working correctly on token operator –>.
05feb2003 | feature | - | Add of two new predefined BNF clauses: #readInteger to scan an integer ; equivalent to #!ignore [‘0‘..‘9‘]+, #readNumeric to scan a floating–point number ; equivalent to #!ignore [#readInteger [‘.‘ [‘0‘..‘9‘]*]? | ‘.‘ [‘0‘..‘9‘]*] [[‘e‘ | ‘E‘] [‘+‘ | ‘–‘]? [‘0‘..‘9‘]+]?,
- 05feb2003 | function | - | function readByte() : string Returns the byte read at the current file position, or an empty string if the end of file has been reached. If succeeded, the position of the input file moves to the next character. The byte is returned as a 2–hexadecimal digit. procedure writeBytes(bytes : string)
  Parameter | Type | Description
  bytes | string | sequence of bytes to write at the current position of the output stream
Writes a sequence of bytes passed to argument bytes, at the current position of the output stream. A byte is a couple of hexadecimal digits.
05feb2003 | feature | - | Add of a new predefined BNF clause: #readByte to scan a byte (converted to a) 2–hexadecimal digit in the parse tree).
05feb2003 | bug_fix | - | When a BNF token with a set of constant to check didn‘t match the input stream, the error message was writing the token expression badly.
03feb2003 | bug_fix | Gwenael CHAZAL | While compiling the C++ translation of scripts: 3 parameters expected to initialize the runtime environment of a BNF–parsing script since version 2.03, conversion to string expected for the name of files to generate (C++ translation of functions generate(), expand(), translate()),
- 31jan2003 | function | - | function byteToChar(byte : string) : string
  Parameter | Type | Description
  byte | string | an hexadecimal number of 2 digits exactly
- Converts a byte to a character. A byte is considered as an hexadecimal number of 2 digits exactly. If the argument byte doesn‘t contain an hexadecimal number of 2 digits, an error is raised. If byte is worth ‘00‘, the function returns an empty string. function charToByte(char : string) : string
  Parameter | Type | Description
  char | string | a character
Converts a character to its hexadecimal representation, taking 2 digits, even if less than 0x10. If the argument char is empty, the function returns ‘00‘. If it contains more than one character, an error is raised.
- 31jan2003 | function | - | function loadBinaryFile(file : string) : string
  Parameter | Type | Description
  file | string | name of the binary file to load
- Returns the binary content of the file whose name is passed to argument file. The content concatenates a sequence of hexadecimal digits, so a byte is stored in 2 characters: binary–content ::= [byte]*; byte ::= [‘0‘..‘9‘ | ‘A‘..‘F‘ | ‘a‘..‘f‘]2; If the file doesn‘t exist or can‘t be read with success, an error occurs. procedure saveBinaryToFile(filename : string, content : string)
  Parameter | Type | Description
  filename | string | name of the binary file to write into
  content | string | sequence of bytes (2 hexadecimal digits) to write into the file
- Saves the binary content to the file filename. The parameter content concatenates a sequence of hexadecimal digits, so a byte is stored in 2 characters: binary–content ::= [byte]*; byte ::= [‘0‘..‘9‘ | ‘A‘..‘F‘ | ‘a‘..‘f‘]2; The hexadecimal pairs of digit are converted to binary (8 bits) before writing the content. If the file cannot be created, an error is raised. If the file already exists, its content is replaced by the new binary content. procedure saveToFile(filename : string, content : string)
  Parameter | Type | Description
  filename | string | name of the text file to write into
  content | string | sequence of characters to write into the file
Saves the text content to the file filename. If the file cannot be created, an error is raised. If the file already exists, its content is replaced by the new text content.
31jan2003 | feature | - | Add of the statement modifier parsed_file(filename) statement and of a new BNF–script directive #parsedFile(filename)BNF–sequence
31jan2003 | option | - | Add of a new option on the command line: -parseBNF
CodeWorker 2.03, 31jan2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2256234 | CodeWorker_WIN2_03.zip
Any platform (?) | sources | 975153 | CodeWorker_SRC2_03.zip
Changes
Date | Type | Caller | Description
30jan2003 | feature | Laurent RIESTERER | CodeWorker enables to come back up the parent of a node into the parse tree. the syntax is myVariable#parent to take back the parent of myVariable.
30jan2003 | bug_fix | - | Bad translation in C++ of myVariable#back, which was generated as myVariable#front with the option ‘–c++‘ on the command line!
30jan2003 | option | - | Add of a new option on the command line: -translate
28jan2003 | feature | apm35 | Add of two directives in the Extended BNF grammar: #implicitCopy and #explicitCopy, used into a translation script: #implicitCopy means that the scanned text is copied to the output stream during the pattern matching. If a rule fails, the scanned text is removed from the output stream, up to the last valid token, #explicitCopy means that the translation doesn‘t take in charge of populating the output stream. You have to specify it (the classical mode). It simplifies scripts for source transformations in source–to–source translations (function translate()), where both the input and the output are written in the same language and that only some little transformation may occur on the output. Example: to scan all variable identifiers and to rename them after applying a coding rule.
- 28jan2003 | function | - | function getOutputLocation() : int Returns the current file position for writing to the output stream. procedure resizeOutputStream(newSize : int)
  Parameter | Type | Description
  newSize | int | new size of the output stream
- This procedure changes the size of the output stream to newSize. The only allowed resizing is to reduce the stream (the request is ignored otherwise). If the current position becomes out of the boundaries, it points to the new end of the output stream. procedure setOutputLocation(location : int)
  Parameter | Type | Description
  location | int | points to a position of the output stream
This procedure moves the position of the output stream elsewhere. The position passed to the argument location starts at 0.
24jan2003 | feature | - | Add of a new kind of regular expression for the BNF parsing scripts: –> followed by a token means that the parser has to find the next occurrence of the token into the imput stream. In case of success, the position moves just after the matched token. –>expression is equivalent to [~expression]* expression
24jan2003 | bug_fix | Gwenael CHAZAL | Normally, the option –stack prevents infinite loops of functions calling, but a bug has hidden another: When the internal function–call stack had reached a depth of more than 128 entries, raising an error had caused to crash the interpreter, The stack allocated by the VC++ linker wasn‘t sufficient,
CodeWorker 2.02.1, 23jan2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2216925 | CodeWorker_WIN2_02_1.zip
Any platform (?) | sources | 923022 | CodeWorker_SRC2_02_1.zip
Changes
Date | Type | Caller | Description
23jan2003 | improvement | - | Correction of some spelling mistakes into the documentation and the source code.
CodeWorker 2.02, 22jan2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2216973 | CodeWorker_WIN2_02.zip
Any platform (?) | sources | 925066 | CodeWorker_SRC2_02.zip
Changes
Date | Type | Caller | Description
22jan2003 | bug_fix | Laurent RIESTERER | The function coreString(text, pos, last) didn‘t work correctly when pos was equal to 0 (an empty string was returned systematically).
CodeWorker 2.01, 22jan2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2217184 | CodeWorker_WIN2_01.zip
Any platform (?) | sources | 922151 | CodeWorker_SRC2_01.zip
Changes
Date | Type | Caller | Description
20jan2003 | feature | - | A BNF clause may precise a different #ignore mode, which will be applied just before running it by the caller. For example: `myClause #ignore(blanks) ::= ... ;` and `myCallerClause ::= #ignore(C++) ... myClause` means that when myCallerClause will arrive on the myClause expression, it won‘t ignore all what match the C++ empty characters (#ignore(C++) was put at the beginning), but it will ignore blanks only (as specified into the declaration of the clause myClause).
CodeWorker 2.0, 21jan2003
Platform | Type | Size | Archive
WINDOWS 98/2000/NT/XP | binaries | 2216065 | CodeWorker_WIN2_0.zip
Any platform (?) | sources | 923724 | CodeWorker_SRC2_0.zip
Changes
Date | Type | Caller | Description
19jan2003 | note | - | First valid publication of the tool on Internet.
CodeWorker is maintained by Cedric Lemaire. Please send a mail to Submit a bug or feature