|
@@ -1,14 +1,14 @@
|
|
|
-/* Generated by re2c 4.1 on Fri Aug 22 14:38:40 2025 */
|
|
|
+/* Generated by re2c 4.1 on Mon Sep 29 14:11:25 2025 */
|
|
|
#line 1 "lexer_ttl.re"
|
|
|
#include "volksdata/codec/parser_ttl.h"
|
|
|
#include "volksdata/codec/tokens_ttl.h"
|
|
|
-//#include "volksdata/codec/parser_common.h"
|
|
|
|
|
|
-/** BEGIN duplicate section
|
|
|
- * This section is bit-by-bit identical in NT and TTL lexers. The copy in
|
|
|
- * include/volksdata/codec/parser_common.h should be used, but some re2c tags
|
|
|
- * are not being parsed in that location.
|
|
|
- */
|
|
|
+#line 1 "../../include/volksdata/codec/parser_common.h"
|
|
|
+#ifndef _VOLK_PARSER_COMMON_H
|
|
|
+#define _VOLK_PARSER_COMMON_H
|
|
|
+
|
|
|
+#include "volksdata/codec.h"
|
|
|
+
|
|
|
|
|
|
/** @brief TTL is UTF-8 encoded.
|
|
|
*
|
|
@@ -42,7 +42,7 @@ typedef struct {
|
|
|
|
|
|
#line 44 "parser_ttl.c"
|
|
|
YYCTYPE *yyt1;
|
|
|
-#line 40 "lexer_ttl.re"
|
|
|
+#line 36 "../../include/volksdata/codec/parser_common.h"
|
|
|
|
|
|
} ParseIterator;
|
|
|
|
|
@@ -88,7 +88,7 @@ static void parse_init (ParseIterator *it, FILE *fh, const char *sh)
|
|
|
|
|
|
#line 90 "parser_ttl.c"
|
|
|
it->yyt1 = NULL;
|
|
|
-#line 82 "lexer_ttl.re"
|
|
|
+#line 78 "../../include/volksdata/codec/parser_common.h"
|
|
|
|
|
|
}
|
|
|
|
|
@@ -100,35 +100,50 @@ fill(ParseIterator *it)
|
|
|
if (it->eof) return 1;
|
|
|
|
|
|
size_t shift = it->tok - it->buf;
|
|
|
+ size_t used = it->lim - it->tok;
|
|
|
|
|
|
// If buffer is too small for the lexeme, double the capacity.
|
|
|
- while (shift < 1) {
|
|
|
- it->buf_size = 2 * it->buf_size;
|
|
|
+ if (shift < 1) {
|
|
|
+ YYCTYPE *old_buf = it->buf;
|
|
|
+ shift += it->buf_size;
|
|
|
+ it->buf_size *= 2;
|
|
|
+ LOG_DEBUG ("Reallocating buffer to %zu bytes.", it->buf_size);
|
|
|
it->buf = realloc (it->buf, it->buf_size);
|
|
|
if (!it->buf) {
|
|
|
log_error ("Memory allocation error.");
|
|
|
return -1;
|
|
|
}
|
|
|
- shift = it->tok - it->buf;
|
|
|
+ // Move all relative points if address changed.
|
|
|
+ size_t reloc_off = it->buf - old_buf;
|
|
|
+ it->cur += reloc_off;
|
|
|
+ it->tok += reloc_off;
|
|
|
+ it->lim += reloc_off;
|
|
|
+ it->mar += reloc_off;
|
|
|
+ } else {
|
|
|
+ LOG_DEBUG("Shifting bytes: %zu", shift);
|
|
|
+ memmove (it->buf, it->tok, used);
|
|
|
+ LOG_TRACE ("Limit offset before reading data: %zu", it->lim - it->tok);
|
|
|
+ it->lim -= shift;
|
|
|
+ it->cur -= shift;
|
|
|
+ it->mar -= shift;
|
|
|
+ it->tok -= shift;
|
|
|
}
|
|
|
- LOG_DEBUG("Shifting bytes: %zu", shift);
|
|
|
- memmove (it->buf, it->tok, it->lim - it->tok);
|
|
|
- it->lim -= shift;
|
|
|
- it->cur -= shift;
|
|
|
- it->mar -= shift;
|
|
|
- it->tok -= shift;
|
|
|
- it->lim += fread (it->lim, 1, shift, it->fh);
|
|
|
+ it->lim += fread (it->lim, 1, it->buf_size - used - 1, it->fh);
|
|
|
|
|
|
-#line 123 "parser_ttl.c"
|
|
|
+#line 134 "parser_ttl.c"
|
|
|
if (it->yyt1) it->yyt1 -= shift;
|
|
|
-#line 111 "lexer_ttl.re"
|
|
|
+#line 118 "../../include/volksdata/codec/parser_common.h"
|
|
|
|
|
|
+ LOG_TRACE ("Cursor offset from last token: %zu", it->cur - it->tok);
|
|
|
+ LOG_TRACE ("Limit offset from last token: %zu", it->lim - it->tok);
|
|
|
it->lim[0] = 0;
|
|
|
- it->eof |= it->lim < it->buf + CHUNK_SIZE - 1;
|
|
|
+ it->eof = it->lim < it->buf + it->buf_size - 1;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-/** END duplicate section */
|
|
|
+
|
|
|
+#endif // _VOLK_PARSER_COMMON_H
|
|
|
+#line 4 "lexer_ttl.re"
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
@@ -158,7 +173,7 @@ static int lex (ParseIterator *it, YYCTYPE **token_p)
|
|
|
{
|
|
|
const YYCTYPE *pfx;
|
|
|
|
|
|
- #line 187 "lexer_ttl.re"
|
|
|
+ #line 73 "lexer_ttl.re"
|
|
|
|
|
|
|
|
|
loop: // Start new token.
|
|
@@ -167,7 +182,7 @@ loop: // Start new token.
|
|
|
*token_p = NULL;
|
|
|
|
|
|
|
|
|
-#line 171 "parser_ttl.c"
|
|
|
+#line 186 "parser_ttl.c"
|
|
|
{
|
|
|
YYCTYPE yych;
|
|
|
unsigned int yyaccept = 0;
|
|
@@ -226,7 +241,7 @@ yyFillLabel0:
|
|
|
yy1:
|
|
|
++YYCURSOR;
|
|
|
yy2:
|
|
|
-#line 196 "lexer_ttl.re"
|
|
|
+#line 82 "lexer_ttl.re"
|
|
|
{
|
|
|
log_warn (
|
|
|
"Invalid token @ %lu: %s (\\x%x)",
|
|
@@ -234,7 +249,7 @@ yy2:
|
|
|
|
|
|
return -1;
|
|
|
}
|
|
|
-#line 238 "parser_ttl.c"
|
|
|
+#line 253 "parser_ttl.c"
|
|
|
yy3:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel1:
|
|
@@ -256,7 +271,7 @@ yyFillLabel1:
|
|
|
goto yy4;
|
|
|
}
|
|
|
yy4:
|
|
|
-#line 264 "lexer_ttl.re"
|
|
|
+#line 150 "lexer_ttl.re"
|
|
|
{
|
|
|
uint8_t *ws = uint8_ndup (it->tok, YYCURSOR - it->tok);
|
|
|
LOG_TRACE("Whitespace: '%s'", ws);
|
|
@@ -269,7 +284,7 @@ yy4:
|
|
|
|
|
|
return T_WS;
|
|
|
}
|
|
|
-#line 273 "parser_ttl.c"
|
|
|
+#line 288 "parser_ttl.c"
|
|
|
yy5:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel2:
|
|
@@ -291,12 +306,12 @@ yyFillLabel2:
|
|
|
goto yy6;
|
|
|
}
|
|
|
yy6:
|
|
|
-#line 209 "lexer_ttl.re"
|
|
|
+#line 95 "lexer_ttl.re"
|
|
|
{
|
|
|
newline (it);
|
|
|
goto loop;
|
|
|
}
|
|
|
-#line 300 "parser_ttl.c"
|
|
|
+#line 315 "parser_ttl.c"
|
|
|
yy7:
|
|
|
yyaccept = 0;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -311,9 +326,9 @@ yyFillLabel3:
|
|
|
goto yy8;
|
|
|
}
|
|
|
yy8:
|
|
|
-#line 216 "lexer_ttl.re"
|
|
|
+#line 102 "lexer_ttl.re"
|
|
|
{ goto schar; }
|
|
|
-#line 317 "parser_ttl.c"
|
|
|
+#line 332 "parser_ttl.c"
|
|
|
yy9:
|
|
|
yyaccept = 1;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -340,12 +355,12 @@ yyFillLabel4:
|
|
|
default: goto yy10;
|
|
|
}
|
|
|
yy10:
|
|
|
-#line 259 "lexer_ttl.re"
|
|
|
+#line 145 "lexer_ttl.re"
|
|
|
{
|
|
|
LOG_TRACE("Comment: `%s`", it->tok);
|
|
|
goto loop;
|
|
|
}
|
|
|
-#line 349 "parser_ttl.c"
|
|
|
+#line 364 "parser_ttl.c"
|
|
|
yy11:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel5:
|
|
@@ -362,14 +377,14 @@ yyFillLabel5:
|
|
|
goto yy12;
|
|
|
}
|
|
|
yy12:
|
|
|
-#line 319 "lexer_ttl.re"
|
|
|
+#line 205 "lexer_ttl.re"
|
|
|
{ return T_LPAREN; }
|
|
|
-#line 368 "parser_ttl.c"
|
|
|
+#line 383 "parser_ttl.c"
|
|
|
yy13:
|
|
|
++YYCURSOR;
|
|
|
-#line 321 "lexer_ttl.re"
|
|
|
+#line 207 "lexer_ttl.re"
|
|
|
{ return T_RPAREN; }
|
|
|
-#line 373 "parser_ttl.c"
|
|
|
+#line 388 "parser_ttl.c"
|
|
|
yy14:
|
|
|
yyaccept = 2;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -400,9 +415,9 @@ yyFillLabel7:
|
|
|
goto yy16;
|
|
|
}
|
|
|
yy16:
|
|
|
-#line 337 "lexer_ttl.re"
|
|
|
+#line 223 "lexer_ttl.re"
|
|
|
{ return T_COMMA; }
|
|
|
-#line 406 "parser_ttl.c"
|
|
|
+#line 421 "parser_ttl.c"
|
|
|
yy17:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel8:
|
|
@@ -416,13 +431,13 @@ yyFillLabel8:
|
|
|
goto yy18;
|
|
|
}
|
|
|
yy18:
|
|
|
-#line 339 "lexer_ttl.re"
|
|
|
+#line 225 "lexer_ttl.re"
|
|
|
{
|
|
|
LOG_TRACE("End of statement #%u.", it->ct);
|
|
|
it->ct++;
|
|
|
return T_PERIOD;
|
|
|
}
|
|
|
-#line 426 "parser_ttl.c"
|
|
|
+#line 441 "parser_ttl.c"
|
|
|
yy19:
|
|
|
yyaccept = 3;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -440,7 +455,7 @@ yyFillLabel9:
|
|
|
goto yy20;
|
|
|
}
|
|
|
yy20:
|
|
|
-#line 284 "lexer_ttl.re"
|
|
|
+#line 170 "lexer_ttl.re"
|
|
|
{
|
|
|
// Normalize sign.
|
|
|
size_t offset = *it->tok == '+' ? 1 : 0;
|
|
@@ -450,7 +465,7 @@ yy20:
|
|
|
|
|
|
return T_INTEGER;
|
|
|
}
|
|
|
-#line 454 "parser_ttl.c"
|
|
|
+#line 469 "parser_ttl.c"
|
|
|
yy21:
|
|
|
yyaccept = 4;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -471,14 +486,14 @@ yyFillLabel10:
|
|
|
default: goto yy66;
|
|
|
}
|
|
|
yy22:
|
|
|
-#line 245 "lexer_ttl.re"
|
|
|
+#line 131 "lexer_ttl.re"
|
|
|
{
|
|
|
*token_p = uint8_ndup (it->tok, YYCURSOR - it->tok);
|
|
|
LOG_TRACE("ID name: %s", *token_p);
|
|
|
|
|
|
return T_QNAME;
|
|
|
}
|
|
|
-#line 482 "parser_ttl.c"
|
|
|
+#line 497 "parser_ttl.c"
|
|
|
yy23:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel11:
|
|
@@ -495,13 +510,13 @@ yyFillLabel11:
|
|
|
goto yy24;
|
|
|
}
|
|
|
yy24:
|
|
|
-#line 331 "lexer_ttl.re"
|
|
|
+#line 217 "lexer_ttl.re"
|
|
|
{
|
|
|
LOG_TRACE("End of object list.");
|
|
|
|
|
|
return T_SEMICOLON;
|
|
|
}
|
|
|
-#line 505 "parser_ttl.c"
|
|
|
+#line 520 "parser_ttl.c"
|
|
|
yy25:
|
|
|
yyaccept = 2;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -571,14 +586,14 @@ yyFillLabel15:
|
|
|
goto yy29;
|
|
|
}
|
|
|
yy29:
|
|
|
-#line 325 "lexer_ttl.re"
|
|
|
+#line 211 "lexer_ttl.re"
|
|
|
{ return T_LBRACKET; }
|
|
|
-#line 577 "parser_ttl.c"
|
|
|
+#line 592 "parser_ttl.c"
|
|
|
yy30:
|
|
|
++YYCURSOR;
|
|
|
-#line 327 "lexer_ttl.re"
|
|
|
+#line 213 "lexer_ttl.re"
|
|
|
{ return T_RBRACKET; }
|
|
|
-#line 582 "parser_ttl.c"
|
|
|
+#line 597 "parser_ttl.c"
|
|
|
yy31:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel16:
|
|
@@ -624,12 +639,12 @@ yyFillLabel18:
|
|
|
goto yy34;
|
|
|
}
|
|
|
yy34:
|
|
|
-#line 347 "lexer_ttl.re"
|
|
|
+#line 233 "lexer_ttl.re"
|
|
|
{
|
|
|
LOG_TRACE("RDF type shorthand 'a'.");
|
|
|
return T_RDF_TYPE;
|
|
|
}
|
|
|
-#line 633 "parser_ttl.c"
|
|
|
+#line 648 "parser_ttl.c"
|
|
|
yy35:
|
|
|
yyaccept = 2;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -1052,7 +1067,7 @@ yyFillLabel44:
|
|
|
goto yy63;
|
|
|
}
|
|
|
yy63:
|
|
|
-#line 304 "lexer_ttl.re"
|
|
|
+#line 190 "lexer_ttl.re"
|
|
|
{
|
|
|
// Normalize sign.
|
|
|
YYCTYPE offset = *it->tok == '+' ? 1 : 0;
|
|
@@ -1067,7 +1082,7 @@ yy63:
|
|
|
|
|
|
return T_DECIMAL;
|
|
|
}
|
|
|
-#line 1071 "parser_ttl.c"
|
|
|
+#line 1086 "parser_ttl.c"
|
|
|
yy64:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel45:
|
|
@@ -1322,14 +1337,14 @@ yy81:
|
|
|
yy82:
|
|
|
++YYCURSOR;
|
|
|
yy83:
|
|
|
-#line 225 "lexer_ttl.re"
|
|
|
+#line 111 "lexer_ttl.re"
|
|
|
{
|
|
|
*token_p = uint8_ndup (it->tok + 1, YYCURSOR - it->tok - 2);
|
|
|
LOG_TRACE("URI data: %s", *token_p);
|
|
|
|
|
|
return T_IRIREF;
|
|
|
}
|
|
|
-#line 1333 "parser_ttl.c"
|
|
|
+#line 1348 "parser_ttl.c"
|
|
|
yy84:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel61:
|
|
@@ -1466,14 +1481,14 @@ yy94:
|
|
|
goto yy95;
|
|
|
}
|
|
|
yy95:
|
|
|
-#line 277 "lexer_ttl.re"
|
|
|
+#line 163 "lexer_ttl.re"
|
|
|
{
|
|
|
*token_p = uint8_ndup (it->tok + 1, YYCURSOR - it->tok - 1);
|
|
|
LOG_TRACE("Lang tag: '%s'", *token_p);
|
|
|
|
|
|
return T_LANGTAG;
|
|
|
}
|
|
|
-#line 1477 "parser_ttl.c"
|
|
|
+#line 1492 "parser_ttl.c"
|
|
|
yy96:
|
|
|
yyaccept = 11;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -1735,14 +1750,14 @@ yyFillLabel87:
|
|
|
yy114:
|
|
|
++YYCURSOR;
|
|
|
yy115:
|
|
|
-#line 323 "lexer_ttl.re"
|
|
|
+#line 209 "lexer_ttl.re"
|
|
|
{ return T_ANON; }
|
|
|
-#line 1741 "parser_ttl.c"
|
|
|
+#line 1756 "parser_ttl.c"
|
|
|
yy116:
|
|
|
++YYCURSOR;
|
|
|
-#line 345 "lexer_ttl.re"
|
|
|
+#line 231 "lexer_ttl.re"
|
|
|
{ return T_DTYPE_MARKER; }
|
|
|
-#line 1746 "parser_ttl.c"
|
|
|
+#line 1761 "parser_ttl.c"
|
|
|
yy117:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel88:
|
|
@@ -1948,9 +1963,9 @@ yyFillLabel103:
|
|
|
}
|
|
|
yy133:
|
|
|
++YYCURSOR;
|
|
|
-#line 214 "lexer_ttl.re"
|
|
|
+#line 100 "lexer_ttl.re"
|
|
|
{ goto lchar; }
|
|
|
-#line 1954 "parser_ttl.c"
|
|
|
+#line 1969 "parser_ttl.c"
|
|
|
yy134:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel104:
|
|
@@ -2120,7 +2135,7 @@ yyFillLabel117:
|
|
|
goto yy148;
|
|
|
}
|
|
|
yy148:
|
|
|
-#line 294 "lexer_ttl.re"
|
|
|
+#line 180 "lexer_ttl.re"
|
|
|
{
|
|
|
// Normalize sign.
|
|
|
size_t offset = *it->tok == '+' ? 1 : 0;
|
|
@@ -2130,7 +2145,7 @@ yy148:
|
|
|
|
|
|
return T_DOUBLE;
|
|
|
}
|
|
|
-#line 2134 "parser_ttl.c"
|
|
|
+#line 2149 "parser_ttl.c"
|
|
|
yy149:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel118:
|
|
@@ -2582,14 +2597,14 @@ yy181:
|
|
|
goto yy182;
|
|
|
}
|
|
|
yy182:
|
|
|
-#line 252 "lexer_ttl.re"
|
|
|
+#line 138 "lexer_ttl.re"
|
|
|
{
|
|
|
*token_p = uint8_ndup (it->tok + 2, YYCURSOR - it->tok - 2);
|
|
|
LOG_TRACE("BNode name: %s", *token_p);
|
|
|
|
|
|
return T_BNODE_ID;
|
|
|
}
|
|
|
-#line 2593 "parser_ttl.c"
|
|
|
+#line 2608 "parser_ttl.c"
|
|
|
yy183:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel150:
|
|
@@ -3017,24 +3032,24 @@ yyFillLabel181:
|
|
|
goto yy215;
|
|
|
}
|
|
|
yy215:
|
|
|
-#line 218 "lexer_ttl.re"
|
|
|
+#line 104 "lexer_ttl.re"
|
|
|
{
|
|
|
*token_p = uint8_ndup (it->tok, YYCURSOR - it->tok);
|
|
|
LOG_TRACE("Boolean: %s", *token_p);
|
|
|
|
|
|
return T_BOOLEAN;
|
|
|
}
|
|
|
-#line 3028 "parser_ttl.c"
|
|
|
+#line 3043 "parser_ttl.c"
|
|
|
yy216:
|
|
|
++YYCURSOR;
|
|
|
yy217:
|
|
|
-#line 239 "lexer_ttl.re"
|
|
|
+#line 125 "lexer_ttl.re"
|
|
|
{
|
|
|
LOG_TRACE("'@base' keyword.");
|
|
|
|
|
|
return T_BASE;
|
|
|
}
|
|
|
-#line 3038 "parser_ttl.c"
|
|
|
+#line 3053 "parser_ttl.c"
|
|
|
yy218:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel182:
|
|
@@ -3255,14 +3270,14 @@ yy229:
|
|
|
++YYCURSOR;
|
|
|
yy230:
|
|
|
pfx = it->yyt1;
|
|
|
-#line 232 "lexer_ttl.re"
|
|
|
+#line 118 "lexer_ttl.re"
|
|
|
{
|
|
|
*token_p = uint8_ndup (pfx, YYCURSOR - pfx - 1);
|
|
|
LOG_TRACE("Prefix declaration: '%s'", *token_p);
|
|
|
|
|
|
return T_PREFIX;
|
|
|
}
|
|
|
-#line 3266 "parser_ttl.c"
|
|
|
+#line 3281 "parser_ttl.c"
|
|
|
yy231:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel193:
|
|
@@ -3706,19 +3721,19 @@ yyFillLabel224:
|
|
|
goto yy52;
|
|
|
}
|
|
|
yy263:
|
|
|
-#line 204 "lexer_ttl.re"
|
|
|
+#line 90 "lexer_ttl.re"
|
|
|
{
|
|
|
LOG_TRACE("End of document.");
|
|
|
return T_EOF;
|
|
|
}
|
|
|
-#line 3715 "parser_ttl.c"
|
|
|
+#line 3730 "parser_ttl.c"
|
|
|
}
|
|
|
-#line 352 "lexer_ttl.re"
|
|
|
+#line 238 "lexer_ttl.re"
|
|
|
|
|
|
|
|
|
schar:
|
|
|
|
|
|
-#line 3722 "parser_ttl.c"
|
|
|
+#line 3737 "parser_ttl.c"
|
|
|
{
|
|
|
YYCTYPE yych;
|
|
|
unsigned int yyaccept = 0;
|
|
@@ -3746,7 +3761,7 @@ yyFillLabel225:
|
|
|
yy265:
|
|
|
++YYCURSOR;
|
|
|
yy266:
|
|
|
-#line 357 "lexer_ttl.re"
|
|
|
+#line 243 "lexer_ttl.re"
|
|
|
{
|
|
|
log_warn (
|
|
|
"Invalid token in string @ %lu: %s (\\x%x)",
|
|
@@ -3754,23 +3769,23 @@ yy266:
|
|
|
|
|
|
return -1;
|
|
|
}
|
|
|
-#line 3758 "parser_ttl.c"
|
|
|
+#line 3773 "parser_ttl.c"
|
|
|
yy267:
|
|
|
++YYCURSOR;
|
|
|
yy268:
|
|
|
-#line 371 "lexer_ttl.re"
|
|
|
+#line 257 "lexer_ttl.re"
|
|
|
{ goto schar; }
|
|
|
-#line 3764 "parser_ttl.c"
|
|
|
+#line 3779 "parser_ttl.c"
|
|
|
yy269:
|
|
|
++YYCURSOR;
|
|
|
-#line 373 "lexer_ttl.re"
|
|
|
+#line 259 "lexer_ttl.re"
|
|
|
{
|
|
|
*token_p = unescape_unicode (it->tok + 1, YYCURSOR - it->tok - 2);
|
|
|
LOG_TRACE("String: %s", *token_p);
|
|
|
|
|
|
return T_STRING;
|
|
|
}
|
|
|
-#line 3774 "parser_ttl.c"
|
|
|
+#line 3789 "parser_ttl.c"
|
|
|
yy270:
|
|
|
yyaccept = 0;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -3996,20 +4011,20 @@ yyFillLabel242:
|
|
|
goto yy278;
|
|
|
}
|
|
|
yy288:
|
|
|
-#line 365 "lexer_ttl.re"
|
|
|
+#line 251 "lexer_ttl.re"
|
|
|
{
|
|
|
log_warn ("Unterminated string!");
|
|
|
|
|
|
return -1;
|
|
|
}
|
|
|
-#line 4006 "parser_ttl.c"
|
|
|
+#line 4021 "parser_ttl.c"
|
|
|
}
|
|
|
-#line 380 "lexer_ttl.re"
|
|
|
+#line 266 "lexer_ttl.re"
|
|
|
|
|
|
|
|
|
lchar:
|
|
|
|
|
|
-#line 4013 "parser_ttl.c"
|
|
|
+#line 4028 "parser_ttl.c"
|
|
|
{
|
|
|
YYCTYPE yych;
|
|
|
unsigned int yyaccept = 0;
|
|
@@ -4039,7 +4054,7 @@ yyFillLabel243:
|
|
|
yy290:
|
|
|
++YYCURSOR;
|
|
|
yy291:
|
|
|
-#line 400 "lexer_ttl.re"
|
|
|
+#line 286 "lexer_ttl.re"
|
|
|
{
|
|
|
log_warn (
|
|
|
"Invalid token in long string @ %lu: %s (\\x%x)",
|
|
@@ -4047,13 +4062,13 @@ yy291:
|
|
|
|
|
|
return -1;
|
|
|
}
|
|
|
-#line 4051 "parser_ttl.c"
|
|
|
+#line 4066 "parser_ttl.c"
|
|
|
yy292:
|
|
|
++YYCURSOR;
|
|
|
yy293:
|
|
|
-#line 391 "lexer_ttl.re"
|
|
|
+#line 277 "lexer_ttl.re"
|
|
|
{ goto lchar; }
|
|
|
-#line 4057 "parser_ttl.c"
|
|
|
+#line 4072 "parser_ttl.c"
|
|
|
yy294:
|
|
|
yyaccept = 0;
|
|
|
YYMARKER = ++YYCURSOR;
|
|
@@ -4230,14 +4245,14 @@ yyFillLabel256:
|
|
|
}
|
|
|
yy308:
|
|
|
++YYCURSOR;
|
|
|
-#line 393 "lexer_ttl.re"
|
|
|
+#line 279 "lexer_ttl.re"
|
|
|
{
|
|
|
*token_p = unescape_unicode (it->tok + 3, YYCURSOR - it->tok - 6);
|
|
|
LOG_TRACE("Long string: %s", it->tok);
|
|
|
|
|
|
return T_STRING;
|
|
|
}
|
|
|
-#line 4241 "parser_ttl.c"
|
|
|
+#line 4256 "parser_ttl.c"
|
|
|
yy309:
|
|
|
++YYCURSOR;
|
|
|
yyFillLabel257:
|
|
@@ -4317,15 +4332,15 @@ yyFillLabel262:
|
|
|
goto yy303;
|
|
|
}
|
|
|
yy315:
|
|
|
-#line 385 "lexer_ttl.re"
|
|
|
+#line 271 "lexer_ttl.re"
|
|
|
{
|
|
|
log_warn ("Unterminated long string!");
|
|
|
|
|
|
return -1;
|
|
|
}
|
|
|
-#line 4327 "parser_ttl.c"
|
|
|
+#line 4342 "parser_ttl.c"
|
|
|
}
|
|
|
-#line 408 "lexer_ttl.re"
|
|
|
+#line 294 "lexer_ttl.re"
|
|
|
|
|
|
}
|
|
|
|