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
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.
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
".
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
".
|
Source code - File "hello_world"
|
1 Hello, world!
|
|
Output of
"/opt/somusar/bin/tefigel hello_world"
|
1 Hello, world!
|
|
|
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]
|