Tech Support > Computer Hardware > Microprocessors > Unimal 2.0, a language-independent preprocessor
Unimal 2.0, a language-independent preprocessor
Posted by Marco on April 15th, 2006



Ark wrote:
It just doesn't seem like good programming practice to decorate your
source code with a non-standard and proprietary macro language.


Posted by Hans-Bernhard Broeker on April 18th, 2006


In comp.arch.embedded Marco <prenom_nomus@yahoo.com> wrote:

Exactly. I don't recall having seen any reason to prefer this
new-fangled, proprietary macro processor over plain old m4.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Posted by Ark on April 20th, 2006


Hans-Bernhard Broeker wrote:

Posted by Ark on April 20th, 2006


[Sorry, the post came crooked 1st time around]

Hans-Bernhard Broeker wrote:

Thank you for the reviews.
I am attempting to answer to both of you guys.

1. Unimal features set is well documented, so it is not proprietary: go
ahead and make your own implementation. The MacroExpressions version of
Unimal *program* uses a commercial library and cannot be open-sourced.

2. To compare different macro languages, aside from syntax
simplicity/complexity, it helps to have their target applications in
mind. Unimal is designed to help optimization and management efforts.
- Unimal's capability to output multiple files makes it very useful in
sharing data across different files/languages (entering one thing in
only one place is a good and often necessary practice).
- Unimal's capability to output include files dependencies and full
control of output directories makes it a great fit in most build
environments.

3. Comparing Unimal vs. m4... Unimal came around because I felt m4 was
inadequate in features and cumbersome in syntax. Consider how hard or
easy it is to
- tabulate a trig function
- share your memory map between your CRC check routine, linker command
file and a tool that post-processes the build output and plants the CRC
- hand-optimize loop unrolling in the executable code
- pre-compute and compress lookup tables for constant objects
- etc. There are a few app notes on the website illustrating how to
accomplish these and similar things with Unimal.

4. Unimal is *not* for capturing Unix commands output and such. This is
by design: Unimal can preprocess source code and a make utility (or
whatever the build driver) can control the build process. (I think a
feature should be added not because I can do it but because there is a
problem in the application domain that this feature solves.)

I hope this clarifies the issues you raised. Feel free to contact me if
you have further questions.

Thanks again for taking a look at Unimal.

Best,
- Ark


Similar Posts