CtplParser

CtplParser — Token tree parser

Functions

Types and Values

Includes

#include <ctpl/ctpl.h>

Description

Parses a CtplToken tree against a CtplEnviron.

To parse a token tree, use ctpl_parser_parse().

Functions

CTPL_PARSER_ERROR

#define CTPL_PARSER_ERROR  (ctpl_parser_error_quark ())

Error domain of CtplParser.


ctpl_parser_parse ()

gboolean
ctpl_parser_parse (const CtplToken *tree,
                   CtplEnviron *env,
                   CtplOutputStream *output,
                   GError **error);

Parses a token tree against an environment and outputs the result to output .

Parameters

tree

A CtplToken from which start parsing

 

env

A CtplEnviron representing the parsing environment

 

output

A CtplInputStream in which write parsing output

 

error

Location where return a GError or NULL to ignore errors

 

Returns

TRUE on success, FALSE otherwise, in which case error shall be set to the error that occurred.

Types and Values

enum CtplParserError

Error codes that parsing functions can throw, from the CTPL_PARSER_ERROR domain.

Members

CTPL_PARSER_ERROR_INCOMPATIBLE_SYMBOL

A symbol is incompatible with is usage.

 

CTPL_PARSER_ERROR_SYMBOL_NOT_FOUND

A symbol cannot be found in the environment.

 

CTPL_PARSER_ERROR_FAILED

An error occurred without any precision on what failed.