/******************************************************************************
- * Copyright (c) 2000-2014 Ericsson Telecom AB
+ * Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Baji, Laszlo
+ * Balasko, Jeno
+ * Baranyi, Botond
+ * Cserveni, Akos
+ * Delic, Adam
+ * Feher, Csaba
+ * Forstner, Matyas
+ * Kovacs, Ferenc
+ * Kremer, Peter
+ * Raduly, Csaba
+ * Szabados, Kristof
+ * Szabo, Bence Janos
+ * Szabo, Janos Zoltan – initial implementation
+ * Zalanyi, Balazs Andor
+ *
******************************************************************************/
%option noyywrap
%option never-interactive
LINEMARKER {NUMBER}{WHITESPACE}+\"([^\\\"\r\n]|\\[^\r\n])*\"
+UID [uU][+]?[0-9A-Fa-f]{1,8}
+
TITAN "$#&&&(#TITANERRONEOUS$#&&^#% "
%x SC_blockcomment SC_cstring
%x SC_binstring SC_binstring_bad
+%s SC_charkeyword
%%
/* local variables of yylex() */
}
{LINECOMMENT} {
- Location loc(infile, current_line, current_column, current_line,
- current_column + yyleng);
- loc.error("Unterminated line comment (missing newline character at the end "
- "of file)");
current_column += yyleng;
}
call RETURN_DOT(CallOpKeyword);
case RETURN(CaseKeyword);
catch RETURN_DOT(CatchOpKeyword);
-char RETURN(CharKeyword);
+char { BEGIN(SC_charkeyword); RETURN(CharKeyword); }
charstring RETURN(CharStringKeyword);
+checkstate RETURN_DOT(CheckStateKeyword);
check RETURN_DOT(CheckOpKeyword);
clear RETURN_DOT(ClearOpKeyword);
complement RETURN(ComplementKeyword);
continue RETURN(ContinueKeyword);
control RETURN(ControlKeyword);
create RETURN_DOT(CreateKeyword);
+decmatch RETURN(DecodedMatchKeyword);
deactivate RETURN(DeactivateKeyword);
default RETURN(DefaultKeyword);
derefers RETURN(DerefersKeyword);
xor RETURN(XorKeyword);
xor4b RETURN(Xor4bKeyword);
+ /* modifier keywords */
+
+"@nocase" RETURN(NocaseKeyword);
+"@lazy" RETURN(LazyKeyword);
+
/* special TITAN specific keywords */
"@try" RETURN(TitanSpecificTryKeyword);
"@catch" RETURN(TitanSpecificCatchKeyword);
-"@lazy" RETURN(TitanSpecificLazyKeyword);
"@profiler" RETURN(TitanSpecificProfilerKeyword);
+
/* Predefined function identifiers */
bit2hex RETURN(bit2hexKeyword);
hex2str RETURN(hex2strKeyword);
int2bit RETURN(int2bitKeyword);
int2char RETURN(int2charKeyword);
+int2enum RETURN(int2enumKeyword);
int2float RETURN(int2floatKeyword);
int2hex RETURN(int2hexKeyword);
int2oct RETURN(int2octKeyword);
get_stringencoding RETURN(get_stringencodingKeyWord);
encode_base64 RETURN(encode_base64KeyWord);
decode_base64 RETURN(decode_base64KeyWord);
+encvalue_unichar RETURN(encvalue_unicharKeyWord);
+decvalue_unichar RETURN(decvalue_unicharKeyWord);
+any2unistr RETURN(any2unistrKeyWord);
+hostid RETURN(hostidKeyWord);
/* Values */
current_column++;
MD5_Update(&md5_ctx, yytext, yyleng);
BEGIN(SC_cstring);
+}
+
+<SC_charkeyword>
+{
+ {UID} {
+ yylval.str = mcopystrn(yytext, yyleng);
+ RETURN_LVAL(Cstring);
+ }
+
+ [,] { RETURN(*yytext); }
+
+ [)] { BEGIN(INITIAL); RETURN(*yytext); }
}
<SC_binstring> /* -------- SC_binstring scope -------------- */