Verilog Parser
verilog_preprocessor.h File Reference

Contains function and data structures to support source code preprocessing. More...

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "verilog_ast.h"
#include "verilog_ast_common.h"

Go to the source code of this file.

Data Structures

struct  verilog_default_net_type
 Keeps track of the points at which default net type directives are encountered. More...
 
struct  verilog_include_directive
 Stores information on an include directive. More...
 
struct  verilog_line_directive
 Describes a line directive. More...
 
struct  verilog_macro_directive
 A simple container for macro directives. More...
 
struct  verilog_preprocessor_conditional_context
 Stores information regarding a particular level of conditional compilation. More...
 
struct  verilog_preprocessor_context
 
struct  verilog_timescale_directive
 Describes a simulation timescale directive. More...
 

Functions

void verilog_free_preprocessor_context (verilog_preprocessor_context *tofree)
 Frees a preprocessor context and all child constructs.
 
verilog_default_net_typeverilog_new_default_net_type (unsigned int token_number, unsigned int line_number, ast_net_type type)
 Creates and returns a new default net type directive. More...
 
verilog_preprocessor_contextverilog_new_preprocessor_context ()
 Creates a new pre-processor context. More...
 
void verilog_preproc_default_net (unsigned int token_number, unsigned int line_number, ast_net_type type)
 Registers a new default net type directive. More...
 
void verilog_preproc_enter_cell_define ()
 Tells the preprocessor we are now defining PLI modules and to tag them as such.
 
void verilog_preproc_exit_cell_define ()
 Tells the preprocessor we are no longer defining PLI modules.
 
char * verilog_preprocessor_current_file (verilog_preprocessor_context *preproc)
 Returns the file currently being parsed by the context, or NULL. More...
 
void verilog_preprocessor_else (unsigned int lineno)
 Handles an else statement being encountered. More...
 
void verilog_preprocessor_elseif (char *macro_name, unsigned int lineno)
 Handles an elseif statement being encountered. More...
 
void verilog_preprocessor_endif (unsigned int lineno)
 Handles an else statement being encountered. More...
 
void verilog_preprocessor_ifdef (char *macro_name, unsigned int lineno, ast_boolean is_ndef)
 Handles an ifdef statement being encountered. More...
 
verilog_include_directiveverilog_preprocessor_include (char *filename, unsigned int lineNumber)
 Handles the encounter of an include directive. More...
 
void verilog_preprocessor_macro_define (unsigned int line, char *macro_name, char *macro_text, size_t text_len)
 Instructs the preprocessor to register a new macro definition. More...
 
void verilog_preprocessor_macro_undefine (char *macro_name)
 Removes a macro definition from the preprocessors lookup table. More...
 
verilog_preprocessor_conditional_contextverilog_preprocessor_new_conditional_context (char *condition, int line_number)
 Creates and returns a new conditional context. More...
 
void verilog_preprocessor_nounconnected_drive (ast_primitive_strength direction;)
 Handles the entering of a no-unconnected drive directive. More...
 
void verilog_preprocessor_resetall ()
 Handles the encounter of a `resetall directive as described in annex 19.6 of the spec.
 
void verilog_preprocessor_set_file (verilog_preprocessor_context *preproc, char *file)
 Clears the stack of files being parsed, and sets the current file to the supplied string. More...
 

Variables

verilog_preprocessor_contextyy_preproc
 Stores all information needed for the preprocessor. More...
 

Detailed Description

Contains function and data structures to support source code preprocessing.