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