~ubuntu-branches/ubuntu/utopic/pgadmin3/utopic-proposed

« back to all changes in this revision

Viewing changes to pgadmin/include/pgscript/utilities/pgsDriver.h

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2011-06-07 23:03:54 UTC
  • mfrom: (1.3.1 upstream) (13 sid)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20110607230354-3td4j9y71u4ahcvj
Tags: 1.14.0~beta1-1
* New upstream development release, adding Build-Depends on
  postgresql-server-dev-all >= 117~.
* Add Build-Depends on quilt, (un)patch to debian/rules and patch for fixing
  the include for kwlist.h in pgadmin/db/keywords.c.
* Add pg_config --includedir-server output to CPPFLAGS.
* Remove unrecognized configure options: --with-wx-config,
  --with-pgsql-include, --enable-gtk2, --enable-unicode.
* Clean up manually the files that are left behind after the broken
  distclean.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//////////////////////////////////////////////////////////////////////////
2
2
//
3
3
// pgScript - PostgreSQL Tools
4
 
// 
5
 
// Copyright (C) 2002 - 2010, The pgAdmin Development Team
 
4
//
 
5
// Copyright (C) 2002 - 2011, The pgAdmin Development Team
6
6
// This software is released under the PostgreSQL Licence
7
7
//
8
8
//////////////////////////////////////////////////////////////////////////
36
36
 * a parameter. Therefore the driver class contains a reference to the
37
37
 * structure into which the parsed data is saved. */
38
38
class pgsDriver
39
 
{       
 
39
{
40
40
public:
41
41
        /// Construct a new parser driver context
42
 
        pgsDriver(class pgsContext & _context, class pgsProgram & _program,
43
 
                        class pgsThread & _thread);
44
 
        
 
42
        pgsDriver(class pgsContext &_context, class pgsProgram &_program,
 
43
                  class pgsThread &_thread);
 
44
 
45
45
        /// Destroy parser
46
46
        ~pgsDriver();
47
47
 
55
55
         * @param in    input stream
56
56
         * @return              true if successfully parsed
57
57
         */
58
 
        bool parse_stream(std::istream & in);
 
58
        bool parse_stream(std::istream &in);
59
59
 
60
60
        /** Invoke the scanner and parser on an input string.
61
61
         * @param input input string
62
62
         * @return              true if successfully parsed
63
63
         */
64
 
        bool parse_string(const wxString & input);
 
64
        bool parse_string(const wxString &input);
65
65
 
66
66
        /** Invoke the scanner and parser on a file. Use parse_stream with a
67
67
         * std::ifstream if detection of file reading errors is required.
69
69
         * @param conv  multi-byte string converter
70
70
         * @return              true if successfully parsed
71
71
         */
72
 
        bool parse_file(const wxString & filename, wxMBConv & conv = wxConvLocal);
 
72
        bool parse_file(const wxString &filename, wxMBConv &conv = wxConvLocal);
73
73
 
74
74
        // To demonstrate pure handling of parse errors, instead of
75
75
        // simply dumping them on the standard error output, we will pass
77
77
 
78
78
        /** Error handling with associated line number. This can be modified to
79
79
         * output the error e.g. to a dialog box. */
80
 
        void error(const class location & l, const wxString & m);
 
80
        void error(const class location &l, const wxString &m);
81
81
 
82
82
        /** Pointer to the current lexer instance, this is used to connect the
83
83
         * parser to the scanner. It is used in the yylex macro. */
84
 
        class pgsScanner * lexer;
 
84
        class pgsScanner *lexer;
85
85
 
86
86
        /** Reference to the context filled during parsing of the expressions. */
87
 
        class pgsContext & context;
88
 
        
 
87
        class pgsContext &context;
 
88
 
89
89
        /** Contains the list of statements to execute. */
90
 
        class pgsProgram & program;
91
 
        
 
90
        class pgsProgram &program;
 
91
 
92
92
        /** The thread in which this driver is included. */
93
 
        class pgsThread & thread;
 
93
        class pgsThread &thread;
94
94
};
95
95
 
96
96
} // namespace pgscript