/[svn]/linuxsampler/trunk/src/network/lscpparser.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpparser.h

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

revision 1047 by schoenebeck, Mon Feb 19 19:38:04 2007 UTC revision 1765 by persson, Sat Sep 6 16:44:42 2008 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2007 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2008 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 25  Line 25 
25  #define __LSCPPARSER_H__  #define __LSCPPARSER_H__
26    
27  #include <sys/types.h>  #include <sys/types.h>
28    #if defined(WIN32)
29    #include <windows.h>
30    #else
31  #include <sys/socket.h>  #include <sys/socket.h>
32    #endif
33    
34  #include <stdlib.h>  #include <stdlib.h>
35  #include <iostream>  #include <iostream>
36  #include <sstream>  #include <sstream>
37  #include <string>  #include <string>
38    
39  #include "../common/global.h"  #include "../common/global_private.h"
40    #include "../common/Path.h"
41  #include "lscpevent.h"  #include "lscpevent.h"
42  #include "../Sampler.h"  #include "../Sampler.h"
43  #include "../drivers/midi/MidiInstrumentMapper.h"  #include "../drivers/midi/MidiInstrumentMapper.h"
44    
45    namespace LinuxSampler {
46    
47  /// Will be returned by the parser in case of syntax errors.  /// Will be returned by the parser in case of syntax errors.
48  #define LSCP_SYNTAX_ERROR       -69  #define LSCP_SYNTAX_ERROR       -69
49  #define LSCP_QUIT               -1  #define LSCP_QUIT               -1
50  #define LSCP_DONE               0  #define LSCP_DONE               0
51    
 using namespace LinuxSampler;  
   
52  // just symbol prototyping  // just symbol prototyping
53  class LSCPServer;  class LSCPServer;
54    
# Line 63  enum fill_response_t { Line 68  enum fill_response_t {
68   * recognized number strings in the input text and the parser might return a   * recognized number strings in the input text and the parser might return a
69   * value for each of it's rules.   * value for each of it's rules.
70   */   */
71  struct YYSTYPE {  struct _YYSTYPE {
72      union {      union {
73          char                         Char;          char                         Char;
74          unsigned int                 Number;          unsigned int                 Number;
# Line 75  struct YYSTYPE { Line 80  struct YYSTYPE {
80      };      };
81      std::string                       String;      std::string                       String;
82      std::map<std::string,std::string> KeyValList;      std::map<std::string,std::string> KeyValList;
83        Path                              UniversalPath;
84  };  };
85    #define YYSTYPE _YYSTYPE
86  #define yystype YYSTYPE         ///< For backward compatibility.  #define yystype YYSTYPE         ///< For backward compatibility.
87  #define YYSTYPE_IS_DECLARED     ///< We tell the lexer / parser that we use our own data structure as defined above.  #define YYSTYPE_IS_DECLARED     ///< We tell the lexer / parser that we use our own data structure as defined above.
88    
# Line 86  struct yyparse_param_t { Line 93  struct yyparse_param_t {
93      LSCPServer* pServer;      LSCPServer* pServer;
94      int         hSession;      int         hSession;
95      bool        bVerbose; ///< if true then all commands will immediately sent back (echo)      bool        bVerbose; ///< if true then all commands will immediately sent back (echo)
96        int         iLine;    ///< Current line (just for verbosity / messages)
97        int         iColumn;  ///< Current column (just for verbosity / messages)
98    
99      yyparse_param_t() {      yyparse_param_t() {
100          pServer  = NULL;          pServer  = NULL;
101          hSession = -1;          hSession = -1;
102          bVerbose = false;          bVerbose = false;
103            iLine = iColumn = 0;
104      }      }
105  };  };
106  #define YYPARSE_PARAM yyparse_param  #define YYPARSE_PARAM yyparse_param
# Line 100  struct yyparse_param_t { Line 110  struct yyparse_param_t {
110   */   */
111  #define YY_DECL int yylex(YYSTYPE* yylval)  #define YY_DECL int yylex(YYSTYPE* yylval)
112    
113    }
114    
115  #endif // __LSCPPARSER_H__  #endif // __LSCPPARSER_H__

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

  ViewVC Help
Powered by ViewVC