Commit e44fa7b0 authored by Hanspeter Portner's avatar Hanspeter Portner

fix end-of-line handling in lexer.

parent 06e0a48d
Pipeline #17041865 passed with stages
in 6 minutes and 55 seconds
......@@ -51,14 +51,15 @@ enum {
TK_LONG_STRING_IN,
TK_LONG_STRING_OUT,
TK_WHITESPACE,
TK_RAW
TK_RAW,
TK_EOL
};
%}
%option reentrant noyywrap
w [ \v\a]+
w [ \v\a\t]+
name [_a-zA-Z@][_a-zA-Z0-9\.]*
n [0-9]+
exp [Ee][+-]?{n}
......@@ -72,7 +73,6 @@ eol [\n\r]
%%
{w} return TK_WHITESPACE;
"\t" return TK_WHITESPACE;
"<" BEGIN(XURI); return TK_URI_IN;
\"\"\" BEGIN(XLONG_STRING); return TK_LONG_STRING_IN;
\" BEGIN(XSTRING); return TK_STRING_IN;
......@@ -83,8 +83,8 @@ true return TK_BOOL;
false return TK_BOOL;
{name} return TK_PREDICATE;
{number} return TK_NUMBER;
. return TK_RAW;
{eol} return TK_RAW;
. return TK_RAW;
<XURI>
{
......@@ -95,8 +95,8 @@ false return TK_BOOL;
<XLONG_STRING>
{
\\\" return TK_RAW;
\"\"\" BEGIN(0); return TK_LONG_STRING_OUT;
{eol} return TK_EOL;
. return TK_RAW;
}
......@@ -176,6 +176,9 @@ ttl_lex(void *data, const char *utf8, int len)
col1 = cwhite;
break;
case TK_EOL:
continue;
case TK_RAW:
default:
// skip over
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment