compute

compute

part of shnell – a source to source compiler enhancement tool

© Jens Gustedt, 2019

A semi-toy example that evaluates integer constant expressions that

are based on decimal values.

This directive spans the whole text that it amends for integer constant expresssion consisting of decimal integers and the operators +, -, *, /, %, <<, and >>.

To make this really useful, we would have to know how to handle ( and ), which we don’t, yet.

Coding and configuration

The following code is needed to enable the sh-module framework.

SRC="$_" . "${0%%/${0##*/}}/import.sh"

Imports

The following sh-modules are imported:

Details