ReactOS 0.4.16-dev-1948-gd260c1d
parser.h File Reference
#include "widltypes.h"
Include dependency graph for parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int parser_parse (void)
 
void parser_warning (const struct location *where, const char *message)
 
void parser_error (const struct location *where, const char *message)
 
void init_location (struct location *copy, const struct location *begin, const struct location *end)
 
int is_type (const char *name)
 
int do_warning (const char *toggle, warning_list_t *wnum)
 
int is_warning_enabled (int warning)
 
charfind_input_file (const char *name, const char *parent)
 
FILEopen_input_file (const char *path)
 
void close_all_inputs (void)
 

Variables

FILEparser_in
 
int parser_debug
 
int yy_flex_debug
 
int parse_only
 

Function Documentation

◆ close_all_inputs()

void close_all_inputs ( void  )

Referenced by main().

◆ do_warning()

int do_warning ( const char toggle,
warning_list_t wnum 
)

◆ find_input_file()

char * find_input_file ( const char name,
const char parent 
)

Definition at line 888 of file widl.c.

889{
890 char *path;
891
892 /* don't search for a file name with a path in the include directories, for compatibility with MIDL */
893 if (strchr( name, '/' ) || strchr( name, '\\' )) path = xstrdup( name );
894 else if (!(path = wpp_find_include( name, parent ))) error_loc( "Unable to open include file %s\n", name );
895
896 return path;
897}
char * strchr(const char *String, int ch)
Definition: utclib.c:501
char * xstrdup(const char *s)
Definition: uimain.c:768
r parent
Definition: btrfs.c:3010
#define error_loc(...)
Definition: utils.h:29
Definition: name.c:39
char * wpp_find_include(const char *name, const char *parent_name)
Definition: wpp.c:315

◆ init_location()

void init_location ( struct location copy,
const struct location begin,
const struct location end 
)

Referenced by make_type(), and type_new_alias().

◆ is_type()

int is_type ( const char name)

◆ is_warning_enabled()

int is_warning_enabled ( int  warning)

Referenced by ctl2_alloc_guid().

◆ open_input_file()

FILE * open_input_file ( const char path)

Definition at line 899 of file widl.c.

900{
901 FILE *file;
902 char *name;
903 int ret;
904
905 if (no_preprocess)
906 {
907 if (!(file = fopen( path, "r" ))) error_loc( "Unable to open %s\n", path );
908 return file;
909 }
910
911 name = make_temp_file( "widl", NULL );
912 if (!(file = fopen( name, "wt" ))) error_loc( "Could not open %s for writing\n", name );
913 ret = wpp_parse( path, file );
914 fclose( file );
915 if (ret) exit( 1 );
916
917 if (!(file = fopen( name, "r" ))) error_loc( "Unable to open %s\n", name );
918 return file;
919}
int wpp_parse(const char *input, FILE *output)
Definition: compiler.c:437
#define NULL
Definition: types.h:112
return ret
Definition: mutex.c:146
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define exit(n)
Definition: config.h:202
static char * make_temp_file(const char *prefix, const char *suffix)
Definition: tools.h:407
Definition: fci.c:127
static int no_preprocess
Definition: widl.c:108

Referenced by main().

◆ parser_error()

void parser_error ( const struct location where,
const char message 
)

Referenced by error_at().

◆ parser_parse()

int parser_parse ( void  )

Referenced by main().

◆ parser_warning()

void parser_warning ( const struct location where,
const char message 
)

Referenced by warning_at().

Variable Documentation

◆ parse_only

int parse_only
extern

Referenced by define_type(), and make_type().

◆ parser_debug

int parser_debug
extern

Definition at line 95 of file widl.c.

Referenced by main(), and wpp_set_debug().

◆ parser_in

FILE* parser_in
extern

Referenced by main().

◆ yy_flex_debug

int yy_flex_debug
extern

Definition at line 95 of file widl.c.

Referenced by main().