1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -31,90 +31,90 @@
namespace dmlpackage
{
typedef std::vector<char*> valbuf_t;
typedef std::vector<char*> valbuf_t;
typedef SqlStatementList ParseTree;
// instance data for the parser
typedef std::vector<char*> valbuf_t;
typedef SqlStatementList ParseTree;
struct scan_data
{
/* Handles to the buffer that the lexer uses internally */
char* scanbuf;
void* scanbufhandle; // This is a YY_BUFFER_STATE defined in ddl-scan.cpp
valbuf_t valbuf;
};
// instance data for the parser
typedef std::vector<char*> valbuf_t;
/** @brief BISON parser wrapper class
*/
class DMLParser
{
public:
/** @brief ctor
*/
DMLParser();
struct scan_data
{
/* Handles to the buffer that the lexer uses internally */
char* scanbuf;
void* scanbufhandle; // This is a YY_BUFFER_STATE defined in ddl-scan.cpp
valbuf_t valbuf;
};
/** @brief dtor
*/
virtual ~DMLParser();
/** @brief parse the supplied dml statement
*
* @param dmltext the dml statement to parse
*/
int parse(const char* dmltext);
/** @brief get the parse tree
*/
const ParseTree& getParseTree();
void setDefaultSchema(std::string schema);
/** @brief was the parse successful
*/
bool good();
/** @brief put the parser in debug mode so as to dump
* diagnostic information
*/
void setDebug(bool debug);
protected:
ParseTree fParseTree;
int fStatus;
bool fDebug;
void* scanner; // yyscan_t * needed for re-entrant flex scanner
scan_data scanData;
private:
};
/** @brief specialization of the DMLParser class
* specifically for reading the dml statement
* from a file
/** @brief BISON parser wrapper class
*/
class DMLParser
{
public:
/** @brief ctor
*/
class DMLFileParser : public DMLParser
{
public:
/** @brief ctor
*/
DMLFileParser();
DMLParser();
/** @brief parse the dml statement contained in the
* supplied file
*
* @param fileName the fully qualified file name to open
* and parse the contents of
*/
int parse(const std::string& fileName);
/** @brief dtor
*/
virtual ~DMLParser();
protected:
/** @brief parse the supplied dml statement
*
* @param dmltext the dml statement to parse
*/
int parse(const char* dmltext);
private:
};
/** @brief get the parse tree
*/
const ParseTree& getParseTree();
void setDefaultSchema(std::string schema);
/** @brief was the parse successful
*/
bool good();
/** @brief put the parser in debug mode so as to dump
* diagnostic information
*/
void setDebug(bool debug);
protected:
ParseTree fParseTree;
int fStatus;
bool fDebug;
void* scanner; // yyscan_t * needed for re-entrant flex scanner
scan_data scanData;
private:
};
/** @brief specialization of the DMLParser class
* specifically for reading the dml statement
* from a file
*/
class DMLFileParser : public DMLParser
{
public:
/** @brief ctor
*/
DMLFileParser();
/** @brief parse the dml statement contained in the
* supplied file
*
* @param fileName the fully qualified file name to open
* and parse the contents of
*/
int parse(const std::string& fileName);
protected:
private:
};
}
#endif // DMLPARSER_H