GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sqlitebrowser/src/sql/parser/ParserDriver.h at continuous · sqlitebrowser/sqlitebrowser

Expand file tree

/

ParserDriver.h

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
65 lines (48 loc) · 1.54 KB
/

ParserDriver.h

Copy path

File metadata and controls

65 lines (48 loc) · 1.54 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef PARSER_DRIVER_H
#define PARSER_DRIVER_H
#include <string>
#include "sqlite3_parser.hpp"
#include "../sqlitetypes.h"
// Give Flex the prototype of yylex we want and declare it for the parser
typedef void* yyscan_t;
namespace sqlb { namespace parser { class ParserDriver; } }
#define YY_DECL sqlb::parser::parser::symbol_type yylex(yyscan_t yyscanner, sqlb::parser::ParserDriver& drv)
YY_DECL;
namespace sqlb
{
namespace parser
{
class ParserDriver
{
friend parser;
public:
ParserDriver();
void setScannerDebug(bool on) { trace_scanner = on; }
void setParserDebug(bool on) { trace_parser = on; }
// Run the parser on string s. Returns 0 on success
int parse(const std::string& s);
// Result returned by the parsing process
sqlb::ObjectPtr result;
// The token's location used by the scanner
sqlb::parser::location location;
private:
// The string to be parsed
std::string source;
// Handling the scanner
void begin_scan();
void end_scan();
// Debug flags for both scanner and parser
bool trace_scanner;
bool trace_parser;
// Scanner state
yyscan_t scanner;
// Scanner buffer
typedef struct yy_buffer_state* YY_BUFFER_STATE;
YY_BUFFER_STATE buffer;
// This is a purely internal variable used for parsing CREATE TABLE statements. It stores a pointer to the table column which
// is currently being parsed. This allows us to modify the column and add additional constraints when we see them.
std::shared_ptr<sqlb::Field> last_table_column;
};
}
}
#endif
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.