TaPAS  0.2
Functions
armoise-input.h File Reference

Syntactical analyzer for the ARMOISE language. More...

#include <stdio.h>
#include <armoise/armoise-tree.h>

Go to the source code of this file.

Functions

armoise_treearmoise_read_file (const char *filename)
 read ARMOISE formulas or definitions from the file specified by filename. More...
 
armoise_treearmoise_read_stream (FILE *stream, const char *input_name)
 read ARMOISE formulas or definitions from stream. input_name is the name of a location used mainly for messaging purpose (e.g errors). More...
 
armoise_treearmoise_read_string (const char *input)
 read ARMOISE formulas or definitions from the string input. More...
 

Detailed Description

Syntactical analyzer for the ARMOISE language.

This module gathers functions that permit to analyze ARMOISE formulas read from a file, a stream or a string. All functions return a pointer to an armoise_tree or NULL if an error occurs.

Definition in file armoise-input.h.

Function Documentation

armoise_tree* armoise_read_file ( const char *  filename)

read ARMOISE formulas or definitions from the file specified by filename.

Parameters
filenamethe path to the file to read
Precondition
filename != NULL
Returns
a pointer to the syntactic tree of the file or NULL if the file can not be read.
armoise_tree* armoise_read_stream ( FILE *  stream,
const char *  input_name 
)

read ARMOISE formulas or definitions from stream. input_name is the name of a location used mainly for messaging purpose (e.g errors).

Parameters
streamthe input stream
input_namea location 'name' to indicate where errors occur.
Precondition
filename != NULL
input_name != NULL
Returns
a pointer to the syntactic tree of the file or NULL if the file can not be read.
armoise_tree* armoise_read_string ( const char *  input)

read ARMOISE formulas or definitions from the string input.

Parameters
inputthe string that contains the ARMOISE description.
Precondition
input != NULL
Returns
a pointer to the syntactic tree of the file or NULL if the file can not be read.