Home Page   We Generate Your Software.
Products Services Company Technology Demo Contact Site Map Search
Please note: this document is currently under revision.
The information herein contained, while still valid, does not reflect the latest state of the described technology.
The Somusar/SoProTech[tm] Booklet Series
Volume I

"somusar/SoProTech: An Introduction"

Printer friendly


Contents
1. Introduction
2. Overview of SoProTech[tm]
3. Software Production Using SoProTech[tm]
4. Software System Layers and Pillars
5. Multifacet Software Entities
6. Software Molds
7. Generatable Files
8. The Somusar/File Generation Scheme[tm]
9. The Somusar Languages and Language Processors
9.1 Somusar/Sisendel[tm]
9.2 Somusar/Tefigel[tm]
10. Structure of a SoProTech Project
11. Further Reading

Chapter 9 - The Somusar Languages and Language Processors

This chapter briefly introduces the two languages, as well as the related language processors, that constitute the SoProMach:

  • Somusar/Sisendel[tm], also referred to as Sisendel;

  • Somusar/Tefigel[tm], also referred to as Tefigel.

The following illustration shows the relationships among Sisendel, Tefigel, Software Entities, Software Molds, and generatable files.

Figure 17 - Role of Sisendel and Tefigel
Figure 17 - Role of Sisendel and Tefigel
Enlarge

As shown in the figure, Software Entity files are processed by Sisendel, which provides the Tefigel processor with the instructions required to apply the appropriate Software Molds in order to produce the source code generatable files.

Within the SoProTech, entity designers need only use Sisendel, as Tefigel is the back-end language, and thus is used only by mold builders. Nevertheless, Tefigel can be used by software developers as a stand-alone tool, for example as a generalized macroprocessor or preprocessor for practically any source code language. In particular, the original text of this very document, as well as that of all Somusar technical documents and web site pages, is written in Tefigel.

9.1 - Somusar/Sisendel[tm]        top

As described earlier in this document, Sisendel is the language and processor for the Software Entities. It is a highly specialized computer language, in that its specific purpose is to serve as a simple software entity design language, to aid software developers and designers in automatizing the production of software source files.

The input to the Sisendel processor consists of one or more entity files; its intermediate output is a set of Tefigel scripts related to the mold kit of the current project. Sisendel automatically and transparently runs Tefigel to produce the target source code files, which are the main output of the SoProMach.

A very small set of environment variables provides Sisendel with enough information about the current project, which - as explained in detail in the next chapter - basically consists of a set of Software Entities and a set of Software Molds.

More information about Sisendel can be found in "Somusar/Sisendel[tm]: A Tutorial Introduction " and "Somusar/Sisendel[tm]: Reference Guide ".

9.2 - Somusar/Tefigel[tm]        top

Tefigel is a text file generation language: in a way, it is a hybrid of text file and language processors, as its input can be in principle any human-readable text file in any single-byte (typically, ASCII or ISO8859) character set, but it features all necessary constructs to perform basic general-purpose computation, although its main purpose is to output text files, in particular files containing source code of virtually any computer language. Tefigel statements can be freely intermixed with plain text: the statements are interpreted and executed, and the plain input text is by default copied to output.

Main features of Tefigel are the following:

  • Translation of one or more input files to one or more output files;

  • Multilevel placeholder substitution: variables in Tefigel allow transparent name-to-value substitution from input to output;

  • File-oriented modularity: functions and subroutines in Tefigel are also text files, directly accessed via their path name;

  • Dynamic syntax constructs and operators;

  • Traditional set of control flow statements, such as IF and WHILE;

  • Non-intrusive translation of input to output: Tefigel for instance by default preserves from input to output even the blank and tab formatting of the input text;

  • Processing speed.

The two following code examples should provide a first glimpse of Tefigel. More information about Tefigel is provided in "Somusar/Tefigel[tm]: A Tutorial Introduction " and "Somusar/Tefigel[tm]: Reference Guide ".

Code Example 8 - "Hello world" in Tefigel
The simplest Somusar/Tefigel[tm] program: the traditional one-line greeting message. No actual processing takes place: input is copied to output.
Source code - File "hello_world"
    1      Hello, world!
	       
Output of "/opt/somusar/bin/tefigel hello_world"
    1      Hello, world!
	       

Code Example 9 - Commands and variables in Tefigel
Short example introducing command lines, variables and the concept of command marker.
Source code - File "plain_cmd"
    1      Text lines, not to be altered by tefigel, as they contain neither
    2      tefigel variables, nor tefigel commands.
    3      @ echo Command line, echo message.
    4      @ set MESSAGE="Hello!"
    5      % echo Not a command line (yet), but contains a variable: MESSAGE.
    6      @ mark CMD %
    7      % echo Now a command line, due to command mark CMD. Variable: MESSAGE.
    8      % unset MESSAGE
    9      % echo After unset, variable MESSAGE is no longer a variable.
   10      % mark CMD
   11      % echo '%' is no longer the command line marker.
   12        Some more text lines, not to be altered by tefigel, as they contain
   13        neither tefigel variables, nor tefigel commands. Note that white
   14        s p a c e s   within text lines     are     left           untouched.    
	       
Output of "/opt/somusar/bin/tefigel plain_cmd"
    1      Text lines, not to be altered by tefigel, as they contain neither
    2      tefigel variables, nor tefigel commands.
    3      Command line, echo message.
    4      % echo Not a command line (yet), but contains a variable: "Hello!".
    5      Now a command line, due to command mark CMD. Variable: "Hello!".
    6      After unset, variable MESSAGE is no longer a variable.
    7      % echo '%' is no longer the command line marker.
    8        Some more text lines, not to be altered by tefigel, as they contain
    9        neither tefigel variables, nor tefigel commands. Note that white
   10        s p a c e s   within text lines     are     left           untouched.    
	       

[Previous chapter]    [Next chapter]    [Back to top]

http:// www.somusar.com  / doc  / booklets  / intro  - Powered by SoProMach
Copyright © 2003-2012 Somusar - Trademarks - Legal - Privacy - Webmaster