1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <connectivity/IParseContext.hxx>
23 namespace connectivity
32 const IParseContext
* m_pContext
; // context for parse, knows all international stuff
33 OString m_sStatement
; // statement to parse
34 OUString m_sErrorMessage
;
36 sal_Int32 m_nCurrentPos
; // next position to read from the statement
37 bool m_bInternational
; // do we have a statement which may uses
38 sal_Int32 m_nRule
; // rule to be set
44 sal_Int32
SQLyygetc();
45 void SQLyyerror(char const *fmt
);
46 IParseContext::InternationalKeyCode
getInternationalTokenID(const char* sToken
) const;
48 // setting the new information before scanning
49 void prepareScan(const OUString
& rNewStatement
, const IParseContext
* pContext
, bool bInternational
);
50 const OUString
& getErrorMessage() const {return m_sErrorMessage
;}
51 const OString
& getStatement() const { return m_sStatement
; }
53 static sal_Int32
SQLlex();
54 // set this as scanner for flex
55 void setScanner(bool _bNull
=false);
57 void SetRule(sal_Int32 nRule
) {m_nRule
= nRule
;}
58 static sal_Int32
GetGERRule();
59 static sal_Int32
GetENGRule();
60 static sal_Int32
GetSQLRule();
61 static sal_Int32
GetDATERule();
62 static sal_Int32
GetSTRINGRule();
63 sal_Int32
GetCurrentPos() const { return m_nCurrentPos
; }
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */