Polly 20.0.0git
Classes | Functions
isl_stream.c File Reference
#include <ctype.h>
#include <string.h>
#include <isl_ctx_private.h>
#include <isl_stream_private.h>
#include <isl/map.h>
#include <isl/aff.h>
#include <isl_val_private.h>
#include <isl_options_private.h>

Go to the source code of this file.

Classes

struct  isl_keyword
 

Functions

static isl_bool same_name (const void *entry, const void *val)
 
enum isl_token_type isl_stream_register_keyword (__isl_keep isl_stream *s, const char *name)
 
struct isl_tokenisl_token_new (isl_ctx *ctx, int line, int col, unsigned on_new_line)
 
int isl_token_get_type (struct isl_token *tok)
 
__isl_give isl_valisl_token_get_val (isl_ctx *ctx, struct isl_token *tok)
 
isl_bool isl_token_has_str (struct isl_token *tok)
 
__isl_give char * isl_token_get_str (isl_ctx *ctx, struct isl_token *tok)
 
void isl_token_free (struct isl_token *tok)
 
void isl_stream_error (__isl_keep isl_stream *s, struct isl_token *tok, char *msg)
 
static __isl_give isl_streamisl_stream_new (struct isl_ctx *ctx)
 
__isl_give isl_streamisl_stream_new_file (struct isl_ctx *ctx, FILE *file)
 
__isl_give isl_streamisl_stream_new_str (struct isl_ctx *ctx, const char *str)
 
static int stream_getc (__isl_keep isl_stream *s)
 
static void isl_stream_ungetc (__isl_keep isl_stream *s, int c)
 
static int isl_stream_getc (__isl_keep isl_stream *s)
 
static int isl_stream_push_char (__isl_keep isl_stream *s, int c)
 
void isl_stream_push_token (__isl_keep isl_stream *s, struct isl_token *tok)
 
static enum isl_token_type check_keywords (__isl_keep isl_stream *s)
 
int isl_stream_skip_line (__isl_keep isl_stream *s)
 
static struct isl_tokennext_token (__isl_keep isl_stream *s, int same_line)
 
struct isl_tokenisl_stream_next_token (__isl_keep isl_stream *s)
 
struct isl_tokenisl_stream_next_token_on_same_line (__isl_keep isl_stream *s)
 
int isl_stream_eat_if_available (__isl_keep isl_stream *s, int type)
 
int isl_stream_next_token_is (__isl_keep isl_stream *s, int type)
 
char * isl_stream_read_ident_if_available (__isl_keep isl_stream *s)
 
int isl_stream_eat (__isl_keep isl_stream *s, int type)
 
int isl_stream_is_empty (__isl_keep isl_stream *s)
 
static isl_stat free_keyword (void **p, void *user)
 
void isl_stream_flush_tokens (__isl_keep isl_stream *s)
 
isl_ctxisl_stream_get_ctx (__isl_keep isl_stream *s)
 
void isl_stream_free (__isl_take isl_stream *s)
 
static int push_state (__isl_keep isl_stream *s, enum isl_yaml_state state)
 
static isl_stat pop_state (__isl_keep isl_stream *s)
 
static int update_state (__isl_keep isl_stream *s, enum isl_yaml_state state)
 
static enum isl_yaml_state current_state (__isl_keep isl_stream *s)
 
static isl_stat set_yaml_indent (__isl_keep isl_stream *s, int indent)
 
static int get_yaml_indent (__isl_keep isl_stream *s)
 
isl_bool isl_stream_yaml_next (__isl_keep isl_stream *s)
 
isl_stat isl_stream_yaml_read_start_mapping (__isl_keep isl_stream *s)
 
isl_stat isl_stream_yaml_read_end_mapping (__isl_keep isl_stream *s)
 
isl_stat isl_stream_yaml_read_start_sequence (__isl_keep isl_stream *s)
 
isl_stat isl_stream_yaml_read_end_sequence (__isl_keep isl_stream *s)
 

Function Documentation

◆ check_keywords()

static enum isl_token_type check_keywords ( __isl_keep isl_stream s)
static

◆ current_state()

static enum isl_yaml_state current_state ( __isl_keep isl_stream s)
static

Definition at line 891 of file isl_stream.c.

References isl_yaml_none, and isl_token::s.

Referenced by isl_stream_yaml_next().

◆ free_keyword()

static isl_stat free_keyword ( void **  p,
void *  user 
)
static

Definition at line 779 of file isl_stream.c.

References isl_stat_ok, isl_keyword::name, and p.

Referenced by isl_stream_free().

◆ get_yaml_indent()

static int get_yaml_indent ( __isl_keep isl_stream s)
static

◆ isl_stream_eat()

int isl_stream_eat ( __isl_keep isl_stream s,
int  type 
)

◆ isl_stream_eat_if_available()

int isl_stream_eat_if_available ( __isl_keep isl_stream s,
int  type 
)

◆ isl_stream_error()

void isl_stream_error ( __isl_keep isl_stream s,
struct isl_token tok,
char *  msg 
)

◆ isl_stream_flush_tokens()

void isl_stream_flush_tokens ( __isl_keep isl_stream s)

Definition at line 789 of file isl_stream.c.

References isl_token_free().

◆ isl_stream_free()

void isl_stream_free ( __isl_take isl_stream s)

◆ isl_stream_get_ctx()

isl_ctx * isl_stream_get_ctx ( __isl_keep isl_stream s)

◆ isl_stream_getc()

static int isl_stream_getc ( __isl_keep isl_stream s)
static

Definition at line 279 of file isl_stream.c.

References isl_stream_ungetc(), isl_token::s, and stream_getc().

Referenced by isl_stream_skip_line(), and next_token().

◆ isl_stream_is_empty()

int isl_stream_is_empty ( __isl_keep isl_stream s)

Definition at line 766 of file isl_stream.c.

References isl_stream_next_token(), isl_stream_push_token(), and isl_token::s.

◆ isl_stream_new()

static __isl_give isl_stream * isl_stream_new ( struct isl_ctx ctx)
static

◆ isl_stream_new_file()

__isl_give isl_stream * isl_stream_new_file ( struct isl_ctx ctx,
FILE *  file 
)

◆ isl_stream_new_str()

__isl_give isl_stream * isl_stream_new_str ( struct isl_ctx ctx,
const char *  str 
)

Definition at line 228 of file isl_stream.c.

References isl_stream_new(), isl_token::s, and str.

Referenced by FN().

◆ isl_stream_next_token()

struct isl_token * isl_stream_next_token ( __isl_keep isl_stream s)

◆ isl_stream_next_token_is()

int isl_stream_next_token_is ( __isl_keep isl_stream s,
int  type 
)

◆ isl_stream_next_token_on_same_line()

struct isl_token * isl_stream_next_token_on_same_line ( __isl_keep isl_stream s)

◆ isl_stream_push_char()

static int isl_stream_push_char ( __isl_keep isl_stream s,
int  c 
)
static

Definition at line 297 of file isl_stream.c.

References isl_realloc_array, and isl_token::s.

Referenced by next_token().

◆ isl_stream_push_token()

void isl_stream_push_token ( __isl_keep isl_stream s,
struct isl_token tok 
)

◆ isl_stream_read_ident_if_available()

char * isl_stream_read_ident_if_available ( __isl_keep isl_stream s)

◆ isl_stream_register_keyword()

enum isl_token_type isl_stream_register_keyword ( __isl_keep isl_stream s,
const char *  name 
)

◆ isl_stream_skip_line()

int isl_stream_skip_line ( __isl_keep isl_stream s)

Definition at line 376 of file isl_stream.c.

References isl_stream_getc().

Referenced by next_token().

◆ isl_stream_ungetc()

static void isl_stream_ungetc ( __isl_keep isl_stream s,
int  c 
)
static

Definition at line 268 of file isl_stream.c.

References isl_assert, and isl_token::s.

Referenced by isl_stream_getc(), and next_token().

◆ isl_stream_yaml_next()

isl_bool isl_stream_yaml_next ( __isl_keep isl_stream s)

◆ isl_stream_yaml_read_end_mapping()

isl_stat isl_stream_yaml_read_end_mapping ( __isl_keep isl_stream s)

◆ isl_stream_yaml_read_end_sequence()

isl_stat isl_stream_yaml_read_end_sequence ( __isl_keep isl_stream s)

◆ isl_stream_yaml_read_start_mapping()

isl_stat isl_stream_yaml_read_start_mapping ( __isl_keep isl_stream s)

◆ isl_stream_yaml_read_start_sequence()

isl_stat isl_stream_yaml_read_start_sequence ( __isl_keep isl_stream s)

◆ isl_token_free()

void isl_token_free ( struct isl_token tok)

◆ isl_token_get_str()

__isl_give char * isl_token_get_str ( isl_ctx ctx,
struct isl_token tok 
)

◆ isl_token_get_type()

int isl_token_get_type ( struct isl_token tok)

◆ isl_token_get_val()

__isl_give isl_val * isl_token_get_val ( isl_ctx ctx,
struct isl_token tok 
)

◆ isl_token_has_str()

isl_bool isl_token_has_str ( struct isl_token tok)

Definition at line 106 of file isl_stream.c.

References isl_bool_error, isl_bool_ok(), isl_token::s, and isl_token::u.

Referenced by KEY_EXTRACT().

◆ isl_token_new()

struct isl_token * isl_token_new ( isl_ctx ctx,
int  line,
int  col,
unsigned  on_new_line 
)

◆ next_token()

static struct isl_token * next_token ( __isl_keep isl_stream s,
int  same_line 
)
static

◆ pop_state()

static isl_stat pop_state ( __isl_keep isl_stream s)
static

◆ push_state()

static int push_state ( __isl_keep isl_stream s,
enum isl_yaml_state  state 
)
static

◆ same_name()

static isl_bool same_name ( const void *  entry,
const void *  val 
)
static

Definition at line 24 of file isl_stream.c.

References isl_bool_ok(), isl_keyword::name, and val.

Referenced by check_keywords(), and isl_stream_register_keyword().

◆ set_yaml_indent()

static isl_stat set_yaml_indent ( __isl_keep isl_stream s,
int  indent 
)
static

◆ stream_getc()

static int stream_getc ( __isl_keep isl_stream s)
static

Definition at line 243 of file isl_stream.c.

References isl_token::s.

Referenced by isl_stream_getc().

◆ update_state()

static int update_state ( __isl_keep isl_stream s,
enum isl_yaml_state  state 
)
static

Definition at line 875 of file isl_stream.c.

References isl_die, isl_error_invalid, isl_stream_get_ctx(), and isl_token::s.

Referenced by isl_stream_yaml_next().