![]() |
GNU PROLOG with UTF8 support
|
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <setjmp.h>
#include "ma_parser.h"
#include "ma_protos.h"
Macros | |
#define | MA_PARSER_FILE |
#define | MAX_LINE_LEN 65536 |
#define | MAX_STR_LEN 32768 |
#define | MAX_ARGS 128 |
#define | MAX_SWITCH_CASES 65536 |
#define | Pre_Pass() (pass_no < nb_passes) |
#define | Stop_Previous_Code() |
Enumerations | |
enum | { PL_CODE, PL_JUMP, PREP_CP, HERE_CP, PL_CALL, PL_FAIL, PL_RET, JUMP, MOVE, CALL_C, JUMP_RET, FAIL_RET, MOVE_RET, SWITCH_RET, C_CODE, C_RET, LONG } |
Functions | |
static void | Parser (int pass_no, int nb_passes) |
static int | Read_If_Global (int initializer) |
static void | Read_Function (void) |
static void | Read_Switch (void) |
static int | Read_Index (void) |
static int | Read_Optional_Index (void) |
static int | Read_Token (int what) |
static int | Scanner (void) |
int | Parse_Ma_File (char *file_name_in, int comment) |
void | Syntax_Error (char *s) |
Variables | |
int | needs_pre_pass |
char * | inst [] |
int | reload_e |
int | inside_code |
char | fct_name [MAX_STR_LEN] |
int | fc |
int | nb_args |
int | nb_args_in_words |
ArgInf | arg [MAX_ARGS] |
int | nb_swt |
SwtInf | swt [MAX_SWITCH_CASES] |
jmp_buf | jumper |
int | keep_source_lines |
FILE * | file_in |
int | cur_line_no |
char | cur_line_str [MAX_LINE_LEN] |
char * | cur_line_p |
char * | beg_last_token |
char | str_val [MAX_STR_LEN] |
PlLong | int_val |
double | dbl_val |
#define MA_PARSER_FILE |
#define MAX_ARGS 128 |
#define MAX_LINE_LEN 65536 |
#define MAX_STR_LEN 32768 |
#define MAX_SWITCH_CASES 65536 |
#define Pre_Pass | ( | ) | (pass_no < nb_passes) |
#define Stop_Previous_Code | ( | ) |
anonymous enum |
int Parse_Ma_File | ( | char * | file_name_in, |
int | comment | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void Syntax_Error | ( | char * | s | ) |
char* beg_last_token |
int cur_line_no |
char* cur_line_p |
char cur_line_str[MAX_LINE_LEN] |
double dbl_val |
int fc |
char fct_name[MAX_STR_LEN] |
FILE* file_in |
int inside_code |
char* inst[] |
PlLong int_val |
jmp_buf jumper |
int keep_source_lines |
int nb_args |
int nb_args_in_words |
int nb_swt |
int needs_pre_pass |
int reload_e |
char str_val[MAX_STR_LEN] |
SwtInf swt[MAX_SWITCH_CASES] |