CTPL overview

Introduction
Advantages and disadvantages
Working design
The lexer
The parser
Templates syntax
Raw data
Template blocks
Examples
Environment description syntax
Symbol
Value
Blanks
Comments
Input and output encoding

Introduction

CTPL is a template library written in C. It allows fast and easy parsing of templates from many sources (including in-memory data and local and remote streaming, thanks to GIO) and fine control over template parsing environment.

CTPL depends on the following libraries:

GLib

General purpose C utility library

GIO

GLib's I/O abstraction library

Advantages and disadvantages

Advantages

Disadvantages

  • Since the input is first completely loaded as a token tree in memory -- which is also one of the advantages -- , it may consume a little more memory than the input template size.