35 |
#include "lscpserver.h" |
#include "lscpserver.h" |
36 |
#include "lscpevent.h" |
#include "lscpevent.h" |
37 |
|
|
38 |
|
namespace LinuxSampler { |
39 |
|
|
40 |
// to save us typing work in the rules action definitions |
// to save us typing work in the rules action definitions |
41 |
#define LSCPSERVER ((yyparse_param_t*) yyparse_param)->pServer |
#define LSCPSERVER ((yyparse_param_t*) yyparse_param)->pServer |
42 |
#define SESSION_PARAM ((yyparse_param_t*) yyparse_param) |
#define SESSION_PARAM ((yyparse_param_t*) yyparse_param) |
46 |
void restart(yyparse_param_t* pparam, int& yychar); |
void restart(yyparse_param_t* pparam, int& yychar); |
47 |
#define RESTART restart((yyparse_param_t*) YYPARSE_PARAM, yychar) |
#define RESTART restart((yyparse_param_t*) YYPARSE_PARAM, yychar) |
48 |
|
|
|
// we provide our own version of yyerror() so we don't have to link against the yacc library |
|
|
void yyerror(const char* s); |
|
|
|
|
49 |
static char buf[1024]; // input buffer to feed the parser with new characters |
static char buf[1024]; // input buffer to feed the parser with new characters |
50 |
static int bytes = 0; // current number of characters in the input buffer |
static int bytes = 0; // current number of characters in the input buffer |
51 |
static int ptr = 0; // current position in the input buffer |
static int ptr = 0; // current position in the input buffer |
100 |
return atoi(d2)*8*8 + atoi(d1)*8 + atoi(d0); |
return atoi(d2)*8*8 + atoi(d1)*8 + atoi(d0); |
101 |
} |
} |
102 |
|
|
103 |
|
} |
104 |
|
|
105 |
|
// we provide our own version of yyerror() so we don't have to link against the yacc library |
106 |
|
void yyerror(const char* s); |
107 |
|
|
108 |
|
using namespace LinuxSampler; |
109 |
|
|
110 |
%} |
%} |
111 |
|
|
112 |
// reentrant parser |
// reentrant parser |
1063 |
sLastError = msg; |
sLastError = msg; |
1064 |
} |
} |
1065 |
|
|
1066 |
|
namespace LinuxSampler { |
1067 |
|
|
1068 |
/** |
/** |
1069 |
* Clears input buffer. |
* Clears input buffer. |
1070 |
*/ |
*/ |
1073 |
ptr = 0; |
ptr = 0; |
1074 |
sLastError = ""; |
sLastError = ""; |
1075 |
} |
} |
1076 |
|
|
1077 |
|
} |