xref: /trunk/main/offapi/com/sun/star/i18n/KParseType.idl (revision d1766043)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_i18n_KParseType_idl__
24#define __com_sun_star_i18n_KParseType_idl__
25
26//============================================================================
27
28module com {  module sun {  module star {  module i18n {
29
30//============================================================================
31
32/**
33    Constants to specify the type of a parsed token.
34
35    <p> Set by
36    <member>XCharacterClassification::parseAnyToken()</member> and
37    <member>XCharacterClassification::parsePredefinedToken()</member> in
38    <member>ParseResult::TokenType</member>. </p>
39 */
40
41published constants KParseType
42{
43    /// One single character like ! # ; : $ et al.
44    const long ONE_SINGLE_CHAR      = 0x00000001;
45
46    // For human .idl readers: <, >, <>, =, <=, >=
47    /// A Boolean operator like &lt;, &gt;, &lt;&gt;, =, &lt;=, &gt;=
48    const long BOOLEAN              = 0x00000002;
49
50    /// A name matching the conditions passed.
51    const long IDENTNAME            = 0x00000004;
52
53
54    // Hint for human .idl readers: do not get confused about the double
55    // quotation marks, they are needed for the unoidl compiler which otherwise
56    // gets confused about the single quotation marks.
57    /** "A single-quoted name matching the conditions passed ( 'na\'me' )."
58        "Dequoted name in <member>ParseResult::DequotedNameOrString</member> ( na'me )." */
59    const long SINGLE_QUOTE_NAME    = 0x00000008;
60
61    /** A double-quoted string ( "str\"i""ng" ). Dequoted string in
62        <member>ParseResult::DequotedNameOrString</member> ( str"i"ng ). */
63    const long DOUBLE_QUOTE_STRING  = 0x00000010;
64
65    /** A number where all digits are ASCII characters.
66        Numerical value in <member>ParseResult::Value</member>. */
67    const long ASC_NUMBER           = 0x00000020;
68
69    /** A number where at least some digits are Unicode (and maybe
70        ASCII) characters. Numerical value inKParseType
71        <member>ParseResult::Value</member>. */
72    const long UNI_NUMBER           = 0x00000040;
73
74    /** Set (ored) if SINGLE_QUOTE_NAME or DOUBLE_QUOTE_STRING has no
75        closing quote. */
76    const long MISSING_QUOTE        = 0x40000000;
77
78
79    // useful combinations
80
81    /// Any ASCII or Unicode number
82    const long ANY_NUMBER           = ASC_NUMBER | UNI_NUMBER;
83};
84
85//============================================================================
86}; }; }; };
87
88#endif
89