xref: /trunk/main/offapi/com/sun/star/i18n/KParseType.idl (revision cdf0e10c)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_i18n_KParseType_idl__
28#define __com_sun_star_i18n_KParseType_idl__
29
30//============================================================================
31
32module com {  module sun {  module star {  module i18n {
33
34//============================================================================
35
36/**
37    Constants to specify the type of a parsed token.
38
39    <p> Set by
40    <member>XCharacterClassification::parseAnyToken()</member> and
41    <member>XCharacterClassification::parsePredefinedToken()</member> in
42    <member>ParseResult::TokenType</member>. </p>
43 */
44
45published constants KParseType
46{
47    /// One single character like ! # ; : $ et al.
48    const long ONE_SINGLE_CHAR      = 0x00000001;
49
50    // For human .idl readers: <, >, <>, =, <=, >=
51    /// A Boolean operator like &lt;, &gt;, &lt;&gt;, =, &lt;=, &gt;=
52    const long BOOLEAN              = 0x00000002;
53
54    /// A name matching the conditions passed.
55    const long IDENTNAME            = 0x00000004;
56
57
58    // Hint for human .idl readers: do not get confused about the double
59    // quotation marks, they are needed for the unoidl compiler which otherwise
60    // gets confused about the single quotation marks.
61    /** "A single-quoted name matching the conditions passed ( 'na\'me' )."
62        "Dequoted name in <member>ParseResult::DequotedNameOrString</member> ( na'me )." */
63    const long SINGLE_QUOTE_NAME    = 0x00000008;
64
65    /** A double-quoted string ( "str\"i""ng" ). Dequoted string in
66        <member>ParseResult::DequotedNameOrString</member> ( str"i"ng ). */
67    const long DOUBLE_QUOTE_STRING  = 0x00000010;
68
69    /** A number where all digits are ASCII characters.
70        Numerical value in <member>ParseResult::Value</member>. */
71    const long ASC_NUMBER           = 0x00000020;
72
73    /** A number where at least some digits are Unicode (and maybe
74        ASCII) characters. Numerical value inKParseType
75        <member>ParseResult::Value</member>. */
76    const long UNI_NUMBER           = 0x00000040;
77
78    /** Set (ored) if SINGLE_QUOTE_NAME or DOUBLE_QUOTE_STRING has no
79        closing quote. */
80    const long MISSING_QUOTE        = 0x40000000;
81
82
83    // useful combinations
84
85    /// Any ASCII or Unicode number
86    const long ANY_NUMBER           = ASC_NUMBER | UNI_NUMBER;
87};
88
89//============================================================================
90}; }; }; };
91
92#endif
93