X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.c;h=802540d1e44e99d6e7dee038ee8a055a4bd4c102;hp=862c9ad1511f3aa7d1525498d2a3bc05002f5ce4;hb=77d63a537de5430f5f8f177c842fa99d65f685bf;hpb=4926283fa0589f3f9c25616304672018dba77429 diff --git a/src/parser.c b/src/parser.c index 862c9ad..802540d 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.16 on Thu Mar 30 16:01:25 2017 */ +/* Generated by re2c 0.16 on Tue Jul 25 09:17:30 2017 */ #line 1 "src/parser.re" /******************************************************************************* Copyright (c) 2016, Michael Wallner . @@ -10347,30 +10347,41 @@ yy596: } yy600: ++cur; -#line 461 "src/parser.re" - { goto character; } +#line 471 "src/parser.re" + { escaped = false; goto character; } #line 10353 "src/parser.c" yy602: ++cur; -#line 459 "src/parser.re" +#line 458 "src/parser.re" { NEWLINE(); goto character; } #line 10358 "src/parser.c" yy604: ++cur; -#line 458 "src/parser.re" - { if (escaped) goto character; cur -= 1; NEWTOKEN(PSI_T_QUOTED_CHAR); cur += 1; token->flags = char_width; goto start; } -#line 10363 "src/parser.c" +#line 460 "src/parser.re" + { + if (escaped) { + escaped = false; + goto character; + } + cur -= 1; + NEWTOKEN(PSI_T_QUOTED_CHAR); + cur += 1; + token->flags = char_width; + goto start; + } +#line 10373 "src/parser.c" yy606: ++cur; -#line 460 "src/parser.re" - { escaped = !escaped; } -#line 10368 "src/parser.c" +#line 459 "src/parser.re" + { escaped = !escaped; goto character; } +#line 10378 "src/parser.c" } -#line 463 "src/parser.re" +#line 473 "src/parser.re" + string: ; -#line 10374 "src/parser.c" +#line 10385 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10384,31 +10395,41 @@ yy606: } yy610: ++cur; -#line 470 "src/parser.re" - { goto string; } -#line 10390 "src/parser.c" +#line 491 "src/parser.re" + { escaped = false; goto string; } +#line 10401 "src/parser.c" yy612: ++cur; -#line 468 "src/parser.re" +#line 478 "src/parser.re" { NEWLINE(); goto string; } -#line 10395 "src/parser.c" +#line 10406 "src/parser.c" yy614: ++cur; -#line 467 "src/parser.re" - { if (escaped) goto string; cur -= 1; NEWTOKEN(PSI_T_QUOTED_STRING); cur += 1; token->flags = char_width; goto start; } -#line 10400 "src/parser.c" +#line 480 "src/parser.re" + { + if (escaped) { + escaped = false; + goto string; + } + cur -= 1; + NEWTOKEN(PSI_T_QUOTED_STRING); + cur += 1; + token->flags = char_width; + goto start; + } +#line 10421 "src/parser.c" yy616: ++cur; -#line 469 "src/parser.re" +#line 479 "src/parser.re" { escaped = !escaped; goto string; } -#line 10405 "src/parser.c" +#line 10426 "src/parser.c" } -#line 472 "src/parser.re" +#line 493 "src/parser.re" comment: ; -#line 10412 "src/parser.c" +#line 10433 "src/parser.c" { unsigned char yych; if ((lim - cur) < 2) if (cur >= lim) goto done;; @@ -10422,14 +10443,14 @@ yy616: yy620: ++cur; yy621: -#line 479 "src/parser.re" +#line 500 "src/parser.re" { goto comment; } -#line 10428 "src/parser.c" +#line 10449 "src/parser.c" yy622: ++cur; -#line 477 "src/parser.re" +#line 498 "src/parser.re" { NEWLINE(); goto comment; } -#line 10433 "src/parser.c" +#line 10454 "src/parser.c" yy624: yych = *++cur; switch (yych) { @@ -10438,16 +10459,16 @@ yy624: } yy625: ++cur; -#line 478 "src/parser.re" +#line 499 "src/parser.re" { NEWTOKEN(PSI_T_COMMENT); goto start; } -#line 10444 "src/parser.c" +#line 10465 "src/parser.c" } -#line 481 "src/parser.re" +#line 502 "src/parser.re" comment_sl: ; -#line 10451 "src/parser.c" +#line 10472 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10459,22 +10480,22 @@ yy625: } yy629: ++cur; -#line 487 "src/parser.re" +#line 508 "src/parser.re" { goto comment_sl; } -#line 10465 "src/parser.c" +#line 10486 "src/parser.c" yy631: ++cur; -#line 486 "src/parser.re" +#line 507 "src/parser.re" { NEWTOKEN(PSI_T_COMMENT); NEWLINE(); goto start; } -#line 10470 "src/parser.c" +#line 10491 "src/parser.c" } -#line 489 "src/parser.re" +#line 510 "src/parser.re" cpp_attribute: ; -#line 10478 "src/parser.c" +#line 10499 "src/parser.c" { unsigned char yych; if (lim <= cur) if (cur >= lim) goto done;; @@ -10488,26 +10509,26 @@ yy631: } yy635: ++cur; -#line 498 "src/parser.re" +#line 519 "src/parser.re" { goto cpp_attribute; } -#line 10494 "src/parser.c" +#line 10515 "src/parser.c" yy637: ++cur; -#line 497 "src/parser.re" +#line 518 "src/parser.re" { NEWLINE(); goto cpp_attribute; } -#line 10499 "src/parser.c" +#line 10520 "src/parser.c" yy639: ++cur; -#line 495 "src/parser.re" +#line 516 "src/parser.re" { ++parens; goto cpp_attribute; } -#line 10504 "src/parser.c" +#line 10525 "src/parser.c" yy641: ++cur; -#line 496 "src/parser.re" +#line 517 "src/parser.re" { if (parens == 1) { NEWTOKEN(PSI_T_CPP_ATTRIBUTE); goto start; } else { --parens; goto cpp_attribute; } } -#line 10509 "src/parser.c" +#line 10530 "src/parser.c" } -#line 500 "src/parser.re" +#line 521 "src/parser.re" error: ;