/[svn]/linuxsampler/trunk/src/network/lscp.y
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscp.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1727 by iliev, Tue Apr 29 15:44:09 2008 UTC revision 1765 by persson, Sat Sep 6 16:44:42 2008 UTC
# Line 35  Line 35 
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)
# Line 44  Line 46 
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
# Line 101  int octalsToNumber(char oct_digit0, char Line 100  int octalsToNumber(char oct_digit0, char
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
# Line 1057  void yyerror(const char* s) { Line 1063  void yyerror(const char* s) {
1063      sLastError = msg;      sLastError = msg;
1064  }  }
1065    
1066    namespace LinuxSampler {
1067    
1068  /**  /**
1069   * Clears input buffer.   * Clears input buffer.
1070   */   */
# Line 1065  void restart(yyparse_param_t* pparam, in Line 1073  void restart(yyparse_param_t* pparam, in
1073      ptr   = 0;      ptr   = 0;
1074      sLastError = "";      sLastError = "";
1075  }  }
1076    
1077    }

Legend:
Removed from v.1727  
changed lines
  Added in v.1765

  ViewVC Help
Powered by ViewVC