Metalang99 1.13.3
Full-blown preprocessor metaprogramming
metalang99.h
1#ifndef ML99_H
2#define ML99_H
3
4#if defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL
5#error Please, specify /Zc:preprocessor to enable a standard-compliant C99/C++11 preprocessor.
6#endif
7
8#include <metalang99/assert.h>
9#include <metalang99/bool.h>
10#include <metalang99/choice.h>
11#include <metalang99/either.h>
12#include <metalang99/gen.h>
13#include <metalang99/ident.h>
14#include <metalang99/lang.h>
15#include <metalang99/list.h>
16#include <metalang99/maybe.h>
17#include <metalang99/nat.h>
18#include <metalang99/seq.h>
19#include <metalang99/stmt.h>
20#include <metalang99/tuple.h>
21#include <metalang99/util.h>
23
24#define ML99_MAJOR 1
25#define ML99_MINOR 13
26#define ML99_PATCH 3
27
28#define ML99_VERSION_COMPATIBLE(x, y, z) \
29 (ML99_MAJOR == (x) && ((ML99_MINOR == (y) && ML99_PATCH >= (z)) || (ML99_MINOR > (y))))
30
31#define ML99_VERSION_EQ(x, y, z) (ML99_MAJOR == (x) && ML99_MINOR == (y) && ML99_PATCH == (z))
32
33#endif // ML99_H
Static assertions.
Boolean algebra.
Choice types: (tag, ...).
A choice type with two cases.
Support for C language constructions.
Identifiers: [a-zA-Z0-9_]+.
The core metalanguage.
Cons-lists.
An optional value.
Natural numbers: [0; 255].
Sequences: (x)(y)(z).
Statement chaining.
Tuples: (x, y, z).
Utilitary stuff.
Variadic arguments: x, y, z.