--- linuxsampler/trunk/src/network/lscp.y 2008/09/06 14:55:18 1764 +++ linuxsampler/trunk/src/network/lscp.y 2008/09/06 16:44:42 1765 @@ -35,6 +35,8 @@ #include "lscpserver.h" #include "lscpevent.h" +namespace LinuxSampler { + // to save us typing work in the rules action definitions #define LSCPSERVER ((yyparse_param_t*) yyparse_param)->pServer #define SESSION_PARAM ((yyparse_param_t*) yyparse_param) @@ -44,9 +46,6 @@ void restart(yyparse_param_t* pparam, int& yychar); #define RESTART restart((yyparse_param_t*) YYPARSE_PARAM, yychar) -// we provide our own version of yyerror() so we don't have to link against the yacc library -void yyerror(const char* s); - static char buf[1024]; // input buffer to feed the parser with new characters static int bytes = 0; // current number of characters in the input buffer static int ptr = 0; // current position in the input buffer @@ -101,6 +100,13 @@ return atoi(d2)*8*8 + atoi(d1)*8 + atoi(d0); } +} + +// we provide our own version of yyerror() so we don't have to link against the yacc library +void yyerror(const char* s); + +using namespace LinuxSampler; + %} // reentrant parser @@ -1057,6 +1063,8 @@ sLastError = msg; } +namespace LinuxSampler { + /** * Clears input buffer. */ @@ -1065,3 +1073,5 @@ ptr = 0; sLastError = ""; } + +}