Lexer.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2006 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenApi
5 // Author: Margret Albrecht
6 // $Header$
7 //
8 // License: Derived from Kirill Zaborski's MathParser library (http://kirya.narod.ru/mathparser.html ).
9 // This library comes under LGPL license (see http://www.gnu.org/licenses/lgpl.html).
10 // Kirill's implementation is a C++ port of the CCalc library from Walery Studennikov (http://www.sama.ru/~despair/ccalc/)
11 // which also comes under the LGPL.
12 //-----------------------------------------------------------------------------
18 #ifndef _LEXER_H_
19 #define _LEXER_H_
20 
21 #include <cstdlib>
22 
23 #ifdef __APPLE__
24 #include <xlocale.h>
25 #endif
26 
27 #include "GenApi/Types.h"
28 #include "GenApi/impl/Internal_Compatibility.h"
29 #include "SymTable.h"
30 
31 typedef unsigned char uchar;
32 
33 typedef enum
34 {
35  CH_LETTER = 0x01, CH_DIGIT = 0x02, CH_SEPARAT = 0x04,
36  CH_SYMBOL = 0x08, CH_QUOTE = 0x10,
37  CH_UNKNOWN = 0x7E, CH_FINAL = 0x7F
38 } hqCharType;
39 
40 typedef enum
41 {
44 } hqTokenType;
45 
46 class CLexer
47 {
48  char* m_pSS;
49  char* SS;
50 #ifdef _WIN32
51  _locale_t CLocale;
52 #else
53 #ifndef VXWORKS
54  locale_t CLocale;
55 #endif
56 #endif
57 public:
58  void SetParams( int cssn, const char ComEnd[], const CSymTable* SymTable, const hqCharType* CharTypeTable );
59 private:
60  // input params
61  int cssn; // Comment Start Symbol Number. -1 if none
62  char* ComEnd; // End of comment
65 public:
66  // output params
67  char* Name;
68  size_t NameLen;
69  double ExtValue;
70  int IntValue;
74 public:
75  int SetParseString( const char* str );
77  CLexer();
78  ~CLexer();
79  char* GetCurrentPos();
80 };
81 
82 
83 #endif //_LEXER_H_
Common types used in the public GenApi interface.
char * SS
Definition: Lexer.h:49
locale_t CLocale
Definition: Lexer.h:54
char * Name
Definition: Lexer.h:67
char * m_pSS
Definition: Lexer.h:48
Definition: Lexer.h:43
int SetParseString(const char *str)
hqTokenType
Definition: Lexer.h:40
Definition: Lexer.h:42
Implementation of CSymTable.
size_t NameLen
Definition: Lexer.h:68
hqTokenType PrevTokenType
Definition: Lexer.h:71
Definition: Lexer.h:37
const CSymTable * SymTable
Definition: Lexer.h:63
hqCharType
Definition: Lexer.h:33
int NoIntegers
Definition: Lexer.h:73
Definition: Lexer.h:42
char * ComEnd
Definition: Lexer.h:62
unsigned char uchar
Definition: Lexer.h:31
const hqCharType * CharTypeTable
Definition: Lexer.h:64
hqTokenType GetNextToken()
void SetParams(int cssn, const char ComEnd[], const CSymTable *SymTable, const hqCharType *CharTypeTable)
char * GetCurrentPos()
int cssn
Definition: Lexer.h:61
hqCharType CharType
Definition: Lexer.h:72
double ExtValue
Definition: Lexer.h:69
int IntValue
Definition: Lexer.h:70
Definition: Lexer.h:35
Definition: Lexer.h:46
Definition: Lexer.h:36


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:54