Purple  0.1
Standard Language Specification
Macros | Variables
data.h File Reference

Project-wide variables. More...

#include "scan.h"
#include "translate/symbol_table.h"
#include "utils/arguments.h"
#include "utils/misc.h"
Include dependency graph for data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define extern_   extern
 
#define D_MAX_POINTER_DEPTH   256
 

Variables

extern_ int D_LINE_NUMBER
 
extern_ int D_CHAR_NUMBER
 
extern_ char D_PUT_BACK
 
extern_ FILE * D_INPUT_FILE
 
extern_ FILE * D_LLVM_FILE
 
extern_ FILE * D_LLVM_GLOBALS_FILE
 
extern_ char * D_INPUT_FN
 
extern_ char * D_LLVM_FN
 
extern_ char * D_LLVM_GLOBALS_FN
 
extern_ unsigned long long int D_LLVM_LOCAL_VIRTUAL_REGISTER_NUMBER
 
extern_ unsigned long long int D_LABEL_INDEX
 
extern_ char D_CURRENT_FUNCTION_BUFFER [MAX_IDENTIFIER_LENGTH+1]
 
extern_ bool D_CURRENT_FUNCTION_PREAMBLE_PRINTED
 
extern_ bool D_CURRENT_FUNCTION_HAS_RETURNED
 
extern_ bool D_SCANNING_TYPE
 
extern_ char D_IDENTIFIER_BUFFER [MAX_IDENTIFIER_LENGTH+1]
 
extern_ int D_DEBUG
 
extern_ PurpleArgsD_ARGS
 
extern_ struct Token D_GLOBAL_TOKEN
 
extern_ SymbolTableStackD_SYMBOL_TABLE_STACK
 
extern_ SymbolTableD_GLOBAL_SYMBOL_TABLE
 

Detailed Description

Project-wide variables.

Author
Charles Averill
Date
08-Sep-2022

Macro Definition Documentation

◆ D_MAX_POINTER_DEPTH

#define D_MAX_POINTER_DEPTH   256

Maximum parseable pointer depth

◆ extern_

#define extern_   extern

extern_ will be undefined in purple.c, causing purple.c to "own" these variables

Variable Documentation

◆ D_ARGS

Command line arguments

◆ D_CHAR_NUMBER

extern_ int D_CHAR_NUMBER

Current char number of the Scanner

◆ D_CURRENT_FUNCTION_BUFFER

extern_ char D_CURRENT_FUNCTION_BUFFER[MAX_IDENTIFIER_LENGTH+1]

The symbol name of the function currently being parsed

◆ D_CURRENT_FUNCTION_HAS_RETURNED

extern_ bool D_CURRENT_FUNCTION_HAS_RETURNED

Whether or not the current function has returned a value

◆ D_CURRENT_FUNCTION_PREAMBLE_PRINTED

extern_ bool D_CURRENT_FUNCTION_PREAMBLE_PRINTED

Whether or not the current function has printed its preamble to LLVM_FILE yet

◆ D_DEBUG

extern_ int D_DEBUG

Activates debug behavior

◆ D_GLOBAL_SYMBOL_TABLE

extern_ SymbolTable* D_GLOBAL_SYMBOL_TABLE

Global Symbol Table (pointer to bottom of D_SYMBOL_TABLE_STACK)

◆ D_GLOBAL_TOKEN

extern_ struct Token D_GLOBAL_TOKEN

Most recently-parsed token

◆ D_IDENTIFIER_BUFFER

extern_ char D_IDENTIFIER_BUFFER[MAX_IDENTIFIER_LENGTH+1]

Buffer to read identifiers into

◆ D_INPUT_FILE

extern_ FILE* D_INPUT_FILE

The file pointer to the open filestream for the Scanner

◆ D_INPUT_FN

extern_ char* D_INPUT_FN

Filename corresponding to D_INPUT_FILE

◆ D_LABEL_INDEX

extern_ unsigned long long int D_LABEL_INDEX

Current label index

◆ D_LINE_NUMBER

extern_ int D_LINE_NUMBER

Current line number of the Scanner

◆ D_LLVM_FILE

extern_ FILE* D_LLVM_FILE

The file pointer to the open filestream for the output LLVM-IR file

◆ D_LLVM_FN

extern_ char* D_LLVM_FN

Filename corresponding to D_LLVM_FILE

◆ D_LLVM_GLOBALS_FILE

extern_ FILE* D_LLVM_GLOBALS_FILE

The file pointer to the open filestream for the output LLVM-IR Global Variables file

◆ D_LLVM_GLOBALS_FN

extern_ char* D_LLVM_GLOBALS_FN

Filename corresponding to D_LLVM_GLOBALS_FILE

◆ D_LLVM_LOCAL_VIRTUAL_REGISTER_NUMBER

extern_ unsigned long long int D_LLVM_LOCAL_VIRTUAL_REGISTER_NUMBER

Current number of the latest-used LLVM virtual register within a function

◆ D_PUT_BACK

extern_ char D_PUT_BACK

If defined, this character will be put back into the input stream

◆ D_SCANNING_TYPE

extern_ bool D_SCANNING_TYPE

Whether or not a type is currently being scanned in

◆ D_SYMBOL_TABLE_STACK

extern_ SymbolTableStack* D_SYMBOL_TABLE_STACK

Symbol Table Stack with the Global Symbol Table as its bottom