IDZEBRA  2.2.7
Macros | Functions | Variables
readfile.c File Reference
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <idzebra/util.h>
#include <dfa.h>
#include "lexer.h"

Go to the source code of this file.

Macros

#define MAXLINE   512
 

Functions

static void prep (char **s)
 
static void read_defs (void)
 
static void read_rules (struct DFA *dfap)
 
static void read_tail (void)
 
static char * read_line (void)
 
int read_file (const char *s, struct DFA *dfa)
 

Variables

static FILE * inf
 
static FILE * outf
 
static const char * inf_name
 
static int line_no
 
static int err_no
 

Macro Definition Documentation

◆ MAXLINE

#define MAXLINE   512

Definition at line 35 of file readfile.c.

Function Documentation

◆ prep()

static void prep ( char **  s)
static

Definition at line 52 of file readfile.c.

References MAXLINE.

Referenced by read_rules().

◆ read_defs()

static void read_defs ( void  )

Definition at line 73 of file readfile.c.

References error(), outf, and read_line().

Referenced by read_file().

◆ read_file()

int read_file ( const char *  s,
struct DFA dfa 
)

Definition at line 141 of file readfile.c.

References err_no, error(), inf, inf_name, line_no, outf, read_defs(), read_rules(), and read_tail().

Referenced by main().

◆ read_line()

static char * read_line ( void  )
static

Definition at line 66 of file readfile.c.

References inf, line_no, and MAXLINE.

Referenced by read_defs(), read_rules(), and read_tail().

◆ read_rules()

static void read_rules ( struct DFA dfap)

Definition at line 86 of file readfile.c.

References dfa_parse(), err_no, error(), inf_name, line_no, outf, prep(), and read_line().

Referenced by read_file().

◆ read_tail()

static void read_tail ( void  )

Definition at line 134 of file readfile.c.

References outf, and read_line().

Referenced by read_file().

Variable Documentation

◆ err_no

int err_no
static

Definition at line 41 of file readfile.c.

Referenced by read_file(), and read_rules().

◆ inf

FILE* inf
static

◆ inf_name

const char* inf_name
static

Definition at line 39 of file readfile.c.

Referenced by read_file(), and read_rules().

◆ line_no

int line_no
static

Definition at line 40 of file readfile.c.

Referenced by read_file(), read_line(), and read_rules().

◆ outf

FILE* outf
static