lok: add character parameter to renderFont
[LibreOffice.git] / l10ntools / source / gLexXcu.l
blob5eb55a047e02dd676ea9fb5c8ad4829e49cbe556
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 %top{
20 #include <string>
21 #include <vector>
22 using namespace std;
24 #include "gL10nMem.hxx"
25 #include "gConvXcu.hxx"
27 #define LOCptr ((convert_xcu *)convert_gen::mcImpl)
28 #define YYLMAX 64000
29 #define YY_INPUT(buf,result,max_size) LOCptr->lexRead(buf, &result, max_size)
30 #define YY_NO_UNISTD_H 1
31 #define yytext_ptr xcutext_ptr
32 #define yy_flex_strncpy convert_gen::lexStrncpy 
37 %option prefix="xcu" 8bit noyywrap never-interactive
38 %array
39 %p 24000
40 %e 1200
41 %n 500
43 SPACE [ \t]*
44 NAME  .*"oor:name="\"[^\"]+\"{SPACE}
45 FIN   [^/>]*">"
50 "component-data" {
51     LOCptr->addLevel();
52     LOCptr->pushKey("");
53     LOCptr->copySource(yytext, false);
58 "<oor:component-data"{NAME} {
59     LOCptr->addLevel();
60     LOCptr->pushKey("");
61     LOCptr->pushKey(yytext);
66 "<prop"{NAME}{FIN} |
67 "<node"{NAME}{FIN} {
68     LOCptr->pushKey(yytext);
73 "</oor:component-data" |
74 "</prop"               |
75 "</node"               {
76     LOCptr->popKey(yytext);
80 "<value xml:lang="\"[^\"]+\"[^>]*">" {
81     LOCptr->startCollectData(yytext);
86 "</value>" {
87     LOCptr->stopCollectData(yytext);
92 "&amp;"  |
93 "&apos;" |
94 "&gt;"   |
95 "&lt;"   |
96 "&quot;" {
97     LOCptr->copySpecial(yytext);
102 ({SPACE}\n{SPACE})+ {
103     LOCptr->copyNL(yytext);
108 . {
109     LOCptr->copySource(yytext, LOCptr->mbNoCollectingData);
111     // Just to please compiler.
112     if (false)
113         REJECT;
122 void xcu_dummyJustForCompiler()
124     char *txt = NULL;
125     //  yy_flex_strlen(txt);
126     yyunput(0, txt);