xine-lib 1.2.11
Data Structures | Macros | Functions
asmrp.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asmrp.h"
#include <xine/xineutils.h>

Data Structures

struct  asmrp_sym_t
 
struct  asmrp_t
 

Macros

#define LOG_MODULE   "asmrp"
 
#define LOG_VERBOSE
 
#define ASMRP_SYM_NONE   0
 
#define ASMRP_SYM_EOF   1
 
#define ASMRP_SYM_NUM   2
 
#define ASMRP_SYM_ID   3
 
#define ASMRP_SYM_STRING   4
 
#define ASMRP_SYM_HASH   10
 
#define ASMRP_SYM_SEMICOLON   11
 
#define ASMRP_SYM_COMMA   12
 
#define ASMRP_SYM_EQUALS   13
 
#define ASMRP_SYM_AND   14
 
#define ASMRP_SYM_OR   15
 
#define ASMRP_SYM_LESS   16
 
#define ASMRP_SYM_LEQ   17
 
#define ASMRP_SYM_GEQ   18
 
#define ASMRP_SYM_GREATER   19
 
#define ASMRP_SYM_DOLLAR   20
 
#define ASMRP_SYM_LPAREN   21
 
#define ASMRP_SYM_RPAREN   22
 
#define ASMRP_MAX_ID   1024
 
#define ASMRP_MAX_SYMTAB   10
 

Functions

static asmrp_tasmrp_new ()
 
static void asmrp_dispose (asmrp_t *p)
 
static void asmrp_getch (asmrp_t *p)
 
static void asmrp_init (asmrp_t *p, const char *str)
 
static void asmrp_number (asmrp_t *p)
 
static void asmrp_string (asmrp_t *p)
 
static void asmrp_identifier (asmrp_t *p)
 
static void asmrp_get_sym (asmrp_t *p)
 
static int asmrp_find_id (asmrp_t *p, const char *s)
 
static int asmrp_set_id (asmrp_t *p, const char *s, int v)
 
static int asmrp_condition (asmrp_t *p)
 
static int asmrp_operand (asmrp_t *p)
 
static int asmrp_comp_expression (asmrp_t *p)
 
static void asmrp_assignment (asmrp_t *p)
 
static int asmrp_rule (asmrp_t *p)
 
static int asmrp_eval (asmrp_t *p, int *matches, int matchsize)
 
int asmrp_match (const char *rules, int bandwidth, int *matches, int matchsize)
 

Macro Definition Documentation

◆ ASMRP_MAX_ID

#define ASMRP_MAX_ID   1024

◆ ASMRP_MAX_SYMTAB

#define ASMRP_MAX_SYMTAB   10

◆ ASMRP_SYM_AND

#define ASMRP_SYM_AND   14

◆ ASMRP_SYM_COMMA

#define ASMRP_SYM_COMMA   12

◆ ASMRP_SYM_DOLLAR

#define ASMRP_SYM_DOLLAR   20

◆ ASMRP_SYM_EOF

#define ASMRP_SYM_EOF   1

◆ ASMRP_SYM_EQUALS

#define ASMRP_SYM_EQUALS   13

◆ ASMRP_SYM_GEQ

#define ASMRP_SYM_GEQ   18

◆ ASMRP_SYM_GREATER

#define ASMRP_SYM_GREATER   19

◆ ASMRP_SYM_HASH

#define ASMRP_SYM_HASH   10

◆ ASMRP_SYM_ID

#define ASMRP_SYM_ID   3

◆ ASMRP_SYM_LEQ

#define ASMRP_SYM_LEQ   17

◆ ASMRP_SYM_LESS

#define ASMRP_SYM_LESS   16

◆ ASMRP_SYM_LPAREN

#define ASMRP_SYM_LPAREN   21

◆ ASMRP_SYM_NONE

#define ASMRP_SYM_NONE   0

◆ ASMRP_SYM_NUM

#define ASMRP_SYM_NUM   2

◆ ASMRP_SYM_OR

#define ASMRP_SYM_OR   15

◆ ASMRP_SYM_RPAREN

#define ASMRP_SYM_RPAREN   22

◆ ASMRP_SYM_SEMICOLON

#define ASMRP_SYM_SEMICOLON   11

◆ ASMRP_SYM_STRING

#define ASMRP_SYM_STRING   4

◆ LOG_MODULE

#define LOG_MODULE   "asmrp"

◆ LOG_VERBOSE

#define LOG_VERBOSE

Function Documentation

◆ asmrp_assignment()

static void asmrp_assignment ( asmrp_t p)
static

◆ asmrp_comp_expression()

static int asmrp_comp_expression ( asmrp_t p)
static

◆ asmrp_condition()

static int asmrp_condition ( asmrp_t p)
static

◆ asmrp_dispose()

static void asmrp_dispose ( asmrp_t p)
static

◆ asmrp_eval()

static int asmrp_eval ( asmrp_t p,
int *  matches,
int  matchsize 
)
static

◆ asmrp_find_id()

static int asmrp_find_id ( asmrp_t p,
const char *  s 
)
static

◆ asmrp_get_sym()

static void asmrp_get_sym ( asmrp_t p)
static

◆ asmrp_getch()

static void asmrp_getch ( asmrp_t p)
static

◆ asmrp_identifier()

static void asmrp_identifier ( asmrp_t p)
static

◆ asmrp_init()

static void asmrp_init ( asmrp_t p,
const char *  str 
)
static

References asmrp_getch(), asmrp_t::buf, and asmrp_t::pos.

Referenced by asmrp_match().

◆ asmrp_match()

int asmrp_match ( const char *  rules,
int  bandwidth,
int *  matches,
int  matchsize 
)

◆ asmrp_new()

static asmrp_t * asmrp_new ( )
static

◆ asmrp_number()

static void asmrp_number ( asmrp_t p)
static

◆ asmrp_operand()

static int asmrp_operand ( asmrp_t p)
static

◆ asmrp_rule()

static int asmrp_rule ( asmrp_t p)
static

◆ asmrp_set_id()

static int asmrp_set_id ( asmrp_t p,
const char *  s,
int  v 
)
static

◆ asmrp_string()

static void asmrp_string ( asmrp_t p)
static