%{ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ /* * lexer for parsing xml-property source files (*.xml) */ #include "sal/config.h" /* enlarge token buffer to tokenize whole strings */ #undef YYLMAX #define YYLMAX 64000 /* to enable debug output define LEXDEBUG */ #define LEXDEBUG 1 #ifdef LEXDEBUG #define OUTPUT fprintf #else #define OUTPUT(Par1,Par2); #endif /* table of possible token ids */ #include "tokens.h" #include #include #include "sal/main.h" #if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif #elif defined _MSC_VER #pragma warning(push, 1) #endif #define YY_NO_UNISTD_H /* external functions (C++ code, declared as extern "C" */ extern "C" int WorkOnTokenSet( int, char* ); extern "C" int Argument( char * ); extern "C" int InitXrmExport( char * , char * ); extern "C" int EndXrmExport(); extern "C" int GetError(); extern "C" int SetError(); extern "C" char *GetOutputFile( int argc, char* argv[]); extern "C" FILE *GetXrmFile(); extern "C" int isQuiet(); extern "C" char* getFilename(); /* forwards */ void YYWarning(); int bText=0; %} %option yylineno %option never-interactive %p 24000 %e 1200 %n 500 %% "

]*xml:lang[^\>]*\> { WorkOnTokenSet( XRM_TEXT_START , yytext ); } "

" { WorkOnTokenSet( XRM_TEXT_END, yytext ); } "

]*xml:lang[^\>]*\> { WorkOnTokenSet( XRM_TEXT_START , yytext ); } "

" { WorkOnTokenSet( XRM_TEXT_END, yytext ); } "

]*xml:lang[^\>]*\> { WorkOnTokenSet( XRM_TEXT_START , yytext ); } "

" { WorkOnTokenSet( XRM_TEXT_END, yytext ); } "

]*xml:lang[^\>]*\> { WorkOnTokenSet( XRM_TEXT_START , yytext ); } "

" { WorkOnTokenSet( XRM_TEXT_END, yytext ); } "

]*xml:lang[^\>]*\> { WorkOnTokenSet( XRM_TEXT_START , yytext ); } "

" { WorkOnTokenSet( XRM_TEXT_END, yytext ); } "
]*xml:lang[^\>]*\> { WorkOnTokenSet( XRM_TEXT_START , yytext ); } "
" { WorkOnTokenSet( XRM_TEXT_END, yytext ); } "" { WorkOnTokenSet( DESC_DISPLAY_NAME_START , yytext ); } "" { WorkOnTokenSet( DESC_DISPLAY_NAME_END, yytext ); } "]*lang[^\>]*\> { WorkOnTokenSet( DESC_TEXT_START , yytext ); } "" { WorkOnTokenSet( DESC_TEXT_END, yytext ); } "" { WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_START , yytext ); } "" { WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_END , yytext ); } "]*lang[^\>]*\> { WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_SRC , yytext ); } "