spacepaste

  1.  
  2. $ ls -l
  3. total 24
  4. -rwxrwxr-x 1 mobile_c mobile_c 13008 Jan 16 13:39 c
  5. -rw-rw-r-- 1 mobile_c mobile_c 3899 Jan 16 13:37 c.c
  6. -rw-rw-r-- 1 mobile_c mobile_c 227 Jan 16 13:36 quotes
  7. $ cat quotes
  8. "''\"'\
  9. // this should not match\
  10. /*\
  11. nor\
  12. should\
  13. this\
  14. "
  15. '\'\'"\'\
  16. // this should not match\
  17. /*\
  18. nor\
  19. should\
  20. this\
  21. '
  22. // test
  23. /*
  24. * multi line
  25. * // this should not match single line comment
  26. */ end
  27. h/*hello*/i // HIfujeg
  28. g
  29. $ cat c.c
  30. #include <stdio.h>
  31. #include <stdio.h>
  32. #include <unistd.h>
  33. #include <fcntl.h>
  34. #include <stdlib.h>
  35. #include <string.h>
  36. #include <stdbool.h>
  37. #define pp(x) printf("%s = %p\n", #x, x);
  38. #define pi(x) printf("%s = %d\n", #x, x);
  39. #define pc(x) printf("%s = %c\n", #x, x);
  40. #define ps(x) printf("%s = %s\n", #x, x);
  41. #define psize_t(x) printf("%s = %zu\n", #x, x);
  42. #define pb(x) printf("%s = %s\n", #x, x==true?"true":"false");
  43. // reads a entire file
  44. int read__(char *file, char **p, size_t *q) {
  45. int fd;
  46. size_t len = 0;
  47. char *o;
  48. if (!(fd = open(file, O_RDONLY)))
  49. {
  50. fprintf(stderr, "open() failure\n");
  51. return (1);
  52. }
  53. len = lseek(fd, 0, SEEK_END);
  54. lseek(fd, 0, 0);
  55. if (!(o = malloc(len))) {
  56. fprintf(stderr, "failure to malloc()\n");
  57. }
  58. if ((read(fd, o, len)) == -1) {
  59. fprintf(stderr, "failure to read()\n");
  60. }
  61. int cl = close(fd);
  62. if (cl < 0) {
  63. fprintf(stderr, "cannot close \"%s\", returned %i\n", file, cl);
  64. return -1;
  65. }
  66. *p = o;
  67. *q = len;
  68. return len;
  69. }
  70. int bcmpcq__2(void const *vp, size_t n, void const *vp2, size_t n2)
  71. {
  72. int string_match = 0;
  73. unsigned char const *p = vp;
  74. unsigned char const *p2 = vp2;
  75. int matches=0;
  76. int contains_matches=0;
  77. for (size_t i=0; i<n; i++) {
  78. if (p[i] == p2[i]) {
  79. matches++;
  80. } else {
  81. if (matches) contains_matches = 1;
  82. break;
  83. }
  84. }
  85. if (matches == 0) {
  86. return -1;
  87. } else if (matches == n) {
  88. return 0;
  89. } else {
  90. int ret = 0;
  91. if (contains_matches) ret = 1;
  92. return ret;
  93. }
  94. }
  95. int matches(char * buf, size_t index, char * x) {
  96. return bcmpcq__2(buf+index, strlen(x), x, strlen(x));
  97. }
  98. int main(int argc, char ** argv) {
  99. if (argc<2) return -1;
  100. char * file = argv[1];
  101. char * buf;
  102. size_t size;
  103. read__(file, &buf, &size);
  104. buf[size] = '\0';
  105. bool in_single_quotes = false;
  106. bool in_double_quotes = false;
  107. char * out = "OUTFILE.c";
  108. FILE * stream = NULL;
  109. stream = fopen(out, "w+");
  110. if (stream == NULL)
  111. {
  112. fprintf(stderr, "open() failure\n");
  113. return (-1);
  114. }
  115. for (size_t i = 0; i < size; i++) {
  116. psize_t(i)
  117. ps(buf+i)
  118. pc(*(buf+i))
  119. if (!matches(buf, i, "//")) {
  120. if (!in_single_quotes && !in_double_quotes) {
  121. puts("matching single line comment");
  122. while(matches(buf, i, "\n")) {
  123. // while is not matching \n
  124. pc(*(buf+i))
  125. i++;
  126. }
  127. // write the \n
  128. fwrite(buf+i, 1, 1, stream);
  129. }
  130. else {
  131. fwrite(buf+i, 2, 1, stream);
  132. i++;
  133. }
  134. }
  135. else if (!matches(buf, i, "/*")) {
  136. if (!in_single_quotes && !in_double_quotes) {
  137. puts("matching multi line comment");
  138. while(matches(buf, i, "*/")) {
  139. // while is not matching */
  140. pc(*(buf+i))
  141. i++;
  142. }
  143. i++;
  144. }
  145. else {
  146. fwrite(buf+i, 2, 1, stream);
  147. i++;
  148. }
  149. }
  150. else if (!matches(buf, i, "\\\\")) {
  151. // if "\\"
  152. puts("matched \\\\");
  153. fwrite(buf+i, 2, 1, stream);
  154. i++;
  155. continue;
  156. }
  157. else if (!matches(buf, i, "\\\"")) {
  158. // if \"
  159. puts("matched \\\"");
  160. fwrite(buf+i, 2, 1, stream);
  161. i++;
  162. }
  163. else if (!matches(buf, i, "\\\'")) {
  164. // if \"
  165. puts("matched \\\'");
  166. fwrite(buf+i, 2, 1, stream);
  167. i++;
  168. }
  169. else if (!matches(buf, i, "\"")) {
  170. // if we encounter a quote
  171. puts("matched \"");
  172. if (!in_single_quotes) in_double_quotes = !in_double_quotes;
  173. fwrite(buf+i, 1, 1, stream);
  174. }
  175. else if (!matches(buf, i, "'")) {
  176. // if we encounter a quote
  177. puts("matched '");
  178. if (!in_double_quotes) in_single_quotes = !in_single_quotes;
  179. fwrite(buf+i, 1, 1, stream);
  180. }
  181. else {
  182. fwrite(buf+i, 1, 1, stream);
  183. }
  184. pb(in_single_quotes)
  185. pb(in_double_quotes)
  186. }
  187. int cl = fclose(stream);
  188. if (cl < 0) {
  189. fprintf(stderr, "cannot close \"%s\", returned %i\n", out, cl);
  190. return -1;
  191. }
  192. }
  193. $ gcc c.c -o c
  194. $ ./c quotes
  195. i = 0
  196. buf+i = "''\"'\
  197. // this should not match\
  198. /*\
  199. nor\
  200. should\
  201. this\
  202. "
  203. '\'\'"\'\
  204. // this should not match\
  205. /*\
  206. nor\
  207. should\
  208. this\
  209. '
  210. // test
  211. /*
  212. * multi line
  213. * // this should not match single line comment
  214. */ end
  215. h/*hello*/i // HIfujeg
  216. g
  217. *(buf+i) = "
  218. matched "
  219. in_single_quotes = false
  220. in_double_quotes = true
  221. i = 1
  222. buf+i = ''\"'\
  223. // this should not match\
  224. /*\
  225. nor\
  226. should\
  227. this\
  228. "
  229. '\'\'"\'\
  230. // this should not match\
  231. /*\
  232. nor\
  233. should\
  234. this\
  235. '
  236. // test
  237. /*
  238. * multi line
  239. * // this should not match single line comment
  240. */ end
  241. h/*hello*/i // HIfujeg
  242. g
  243. *(buf+i) = '
  244. matched '
  245. in_single_quotes = false
  246. in_double_quotes = true
  247. i = 2
  248. buf+i = '\"'\
  249. // this should not match\
  250. /*\
  251. nor\
  252. should\
  253. this\
  254. "
  255. '\'\'"\'\
  256. // this should not match\
  257. /*\
  258. nor\
  259. should\
  260. this\
  261. '
  262. // test
  263. /*
  264. * multi line
  265. * // this should not match single line comment
  266. */ end
  267. h/*hello*/i // HIfujeg
  268. g
  269. *(buf+i) = '
  270. matched '
  271. in_single_quotes = false
  272. in_double_quotes = true
  273. i = 3
  274. buf+i = \"'\
  275. // this should not match\
  276. /*\
  277. nor\
  278. should\
  279. this\
  280. "
  281. '\'\'"\'\
  282. // this should not match\
  283. /*\
  284. nor\
  285. should\
  286. this\
  287. '
  288. // test
  289. /*
  290. * multi line
  291. * // this should not match single line comment
  292. */ end
  293. h/*hello*/i // HIfujeg
  294. g
  295. *(buf+i) = \
  296. matched \"
  297. in_single_quotes = false
  298. in_double_quotes = true
  299. i = 5
  300. buf+i = '\
  301. // this should not match\
  302. /*\
  303. nor\
  304. should\
  305. this\
  306. "
  307. '\'\'"\'\
  308. // this should not match\
  309. /*\
  310. nor\
  311. should\
  312. this\
  313. '
  314. // test
  315. /*
  316. * multi line
  317. * // this should not match single line comment
  318. */ end
  319. h/*hello*/i // HIfujeg
  320. g
  321. *(buf+i) = '
  322. matched '
  323. in_single_quotes = false
  324. in_double_quotes = true
  325. i = 6
  326. buf+i = \
  327. // this should not match\
  328. /*\
  329. nor\
  330. should\
  331. this\
  332. "
  333. '\'\'"\'\
  334. // this should not match\
  335. /*\
  336. nor\
  337. should\
  338. this\
  339. '
  340. // test
  341. /*
  342. * multi line
  343. * // this should not match single line comment
  344. */ end
  345. h/*hello*/i // HIfujeg
  346. g
  347. *(buf+i) = \
  348. in_single_quotes = false
  349. in_double_quotes = true
  350. i = 7
  351. buf+i =
  352. // this should not match\
  353. /*\
  354. nor\
  355. should\
  356. this\
  357. "
  358. '\'\'"\'\
  359. // this should not match\
  360. /*\
  361. nor\
  362. should\
  363. this\
  364. '
  365. // test
  366. /*
  367. * multi line
  368. * // this should not match single line comment
  369. */ end
  370. h/*hello*/i // HIfujeg
  371. g
  372. *(buf+i) =
  373. in_single_quotes = false
  374. in_double_quotes = true
  375. i = 8
  376. buf+i = // this should not match\
  377. /*\
  378. nor\
  379. should\
  380. this\
  381. "
  382. '\'\'"\'\
  383. // this should not match\
  384. /*\
  385. nor\
  386. should\
  387. this\
  388. '
  389. // test
  390. /*
  391. * multi line
  392. * // this should not match single line comment
  393. */ end
  394. h/*hello*/i // HIfujeg
  395. g
  396. *(buf+i) = /
  397. in_single_quotes = false
  398. in_double_quotes = true
  399. i = 10
  400. buf+i = this should not match\
  401. /*\
  402. nor\
  403. should\
  404. this\
  405. "
  406. '\'\'"\'\
  407. // this should not match\
  408. /*\
  409. nor\
  410. should\
  411. this\
  412. '
  413. // test
  414. /*
  415. * multi line
  416. * // this should not match single line comment
  417. */ end
  418. h/*hello*/i // HIfujeg
  419. g
  420. *(buf+i) =
  421. in_single_quotes = false
  422. in_double_quotes = true
  423. i = 11
  424. buf+i = this should not match\
  425. /*\
  426. nor\
  427. should\
  428. this\
  429. "
  430. '\'\'"\'\
  431. // this should not match\
  432. /*\
  433. nor\
  434. should\
  435. this\
  436. '
  437. // test
  438. /*
  439. * multi line
  440. * // this should not match single line comment
  441. */ end
  442. h/*hello*/i // HIfujeg
  443. g
  444. *(buf+i) = t
  445. in_single_quotes = false
  446. in_double_quotes = true
  447. i = 12
  448. buf+i = his should not match\
  449. /*\
  450. nor\
  451. should\
  452. this\
  453. "
  454. '\'\'"\'\
  455. // this should not match\
  456. /*\
  457. nor\
  458. should\
  459. this\
  460. '
  461. // test
  462. /*
  463. * multi line
  464. * // this should not match single line comment
  465. */ end
  466. h/*hello*/i // HIfujeg
  467. g
  468. *(buf+i) = h
  469. in_single_quotes = false
  470. in_double_quotes = true
  471. i = 13
  472. buf+i = is should not match\
  473. /*\
  474. nor\
  475. should\
  476. this\
  477. "
  478. '\'\'"\'\
  479. // this should not match\
  480. /*\
  481. nor\
  482. should\
  483. this\
  484. '
  485. // test
  486. /*
  487. * multi line
  488. * // this should not match single line comment
  489. */ end
  490. h/*hello*/i // HIfujeg
  491. g
  492. *(buf+i) = i
  493. in_single_quotes = false
  494. in_double_quotes = true
  495. i = 14
  496. buf+i = s should not match\
  497. /*\
  498. nor\
  499. should\
  500. this\
  501. "
  502. '\'\'"\'\
  503. // this should not match\
  504. /*\
  505. nor\
  506. should\
  507. this\
  508. '
  509. // test
  510. /*
  511. * multi line
  512. * // this should not match single line comment
  513. */ end
  514. h/*hello*/i // HIfujeg
  515. g
  516. *(buf+i) = s
  517. in_single_quotes = false
  518. in_double_quotes = true
  519. i = 15
  520. buf+i = should not match\
  521. /*\
  522. nor\
  523. should\
  524. this\
  525. "
  526. '\'\'"\'\
  527. // this should not match\
  528. /*\
  529. nor\
  530. should\
  531. this\
  532. '
  533. // test
  534. /*
  535. * multi line
  536. * // this should not match single line comment
  537. */ end
  538. h/*hello*/i // HIfujeg
  539. g
  540. *(buf+i) =
  541. in_single_quotes = false
  542. in_double_quotes = true
  543. i = 16
  544. buf+i = should not match\
  545. /*\
  546. nor\
  547. should\
  548. this\
  549. "
  550. '\'\'"\'\
  551. // this should not match\
  552. /*\
  553. nor\
  554. should\
  555. this\
  556. '
  557. // test
  558. /*
  559. * multi line
  560. * // this should not match single line comment
  561. */ end
  562. h/*hello*/i // HIfujeg
  563. g
  564. *(buf+i) = s
  565. in_single_quotes = false
  566. in_double_quotes = true
  567. i = 17
  568. buf+i = hould not match\
  569. /*\
  570. nor\
  571. should\
  572. this\
  573. "
  574. '\'\'"\'\
  575. // this should not match\
  576. /*\
  577. nor\
  578. should\
  579. this\
  580. '
  581. // test
  582. /*
  583. * multi line
  584. * // this should not match single line comment
  585. */ end
  586. h/*hello*/i // HIfujeg
  587. g
  588. *(buf+i) = h
  589. in_single_quotes = false
  590. in_double_quotes = true
  591. i = 18
  592. buf+i = ould not match\
  593. /*\
  594. nor\
  595. should\
  596. this\
  597. "
  598. '\'\'"\'\
  599. // this should not match\
  600. /*\
  601. nor\
  602. should\
  603. this\
  604. '
  605. // test
  606. /*
  607. * multi line
  608. * // this should not match single line comment
  609. */ end
  610. h/*hello*/i // HIfujeg
  611. g
  612. *(buf+i) = o
  613. in_single_quotes = false
  614. in_double_quotes = true
  615. i = 19
  616. buf+i = uld not match\
  617. /*\
  618. nor\
  619. should\
  620. this\
  621. "
  622. '\'\'"\'\
  623. // this should not match\
  624. /*\
  625. nor\
  626. should\
  627. this\
  628. '
  629. // test
  630. /*
  631. * multi line
  632. * // this should not match single line comment
  633. */ end
  634. h/*hello*/i // HIfujeg
  635. g
  636. *(buf+i) = u
  637. in_single_quotes = false
  638. in_double_quotes = true
  639. i = 20
  640. buf+i = ld not match\
  641. /*\
  642. nor\
  643. should\
  644. this\
  645. "
  646. '\'\'"\'\
  647. // this should not match\
  648. /*\
  649. nor\
  650. should\
  651. this\
  652. '
  653. // test
  654. /*
  655. * multi line
  656. * // this should not match single line comment
  657. */ end
  658. h/*hello*/i // HIfujeg
  659. g
  660. *(buf+i) = l
  661. in_single_quotes = false
  662. in_double_quotes = true
  663. i = 21
  664. buf+i = d not match\
  665. /*\
  666. nor\
  667. should\
  668. this\
  669. "
  670. '\'\'"\'\
  671. // this should not match\
  672. /*\
  673. nor\
  674. should\
  675. this\
  676. '
  677. // test
  678. /*
  679. * multi line
  680. * // this should not match single line comment
  681. */ end
  682. h/*hello*/i // HIfujeg
  683. g
  684. *(buf+i) = d
  685. in_single_quotes = false
  686. in_double_quotes = true
  687. i = 22
  688. buf+i = not match\
  689. /*\
  690. nor\
  691. should\
  692. this\
  693. "
  694. '\'\'"\'\
  695. // this should not match\
  696. /*\
  697. nor\
  698. should\
  699. this\
  700. '
  701. // test
  702. /*
  703. * multi line
  704. * // this should not match single line comment
  705. */ end
  706. h/*hello*/i // HIfujeg
  707. g
  708. *(buf+i) =
  709. in_single_quotes = false
  710. in_double_quotes = true
  711. i = 23
  712. buf+i = not match\
  713. /*\
  714. nor\
  715. should\
  716. this\
  717. "
  718. '\'\'"\'\
  719. // this should not match\
  720. /*\
  721. nor\
  722. should\
  723. this\
  724. '
  725. // test
  726. /*
  727. * multi line
  728. * // this should not match single line comment
  729. */ end
  730. h/*hello*/i // HIfujeg
  731. g
  732. *(buf+i) = n
  733. in_single_quotes = false
  734. in_double_quotes = true
  735. i = 24
  736. buf+i = ot match\
  737. /*\
  738. nor\
  739. should\
  740. this\
  741. "
  742. '\'\'"\'\
  743. // this should not match\
  744. /*\
  745. nor\
  746. should\
  747. this\
  748. '
  749. // test
  750. /*
  751. * multi line
  752. * // this should not match single line comment
  753. */ end
  754. h/*hello*/i // HIfujeg
  755. g
  756. *(buf+i) = o
  757. in_single_quotes = false
  758. in_double_quotes = true
  759. i = 25
  760. buf+i = t match\
  761. /*\
  762. nor\
  763. should\
  764. this\
  765. "
  766. '\'\'"\'\
  767. // this should not match\
  768. /*\
  769. nor\
  770. should\
  771. this\
  772. '
  773. // test
  774. /*
  775. * multi line
  776. * // this should not match single line comment
  777. */ end
  778. h/*hello*/i // HIfujeg
  779. g
  780. *(buf+i) = t
  781. in_single_quotes = false
  782. in_double_quotes = true
  783. i = 26
  784. buf+i = match\
  785. /*\
  786. nor\
  787. should\
  788. this\
  789. "
  790. '\'\'"\'\
  791. // this should not match\
  792. /*\
  793. nor\
  794. should\
  795. this\
  796. '
  797. // test
  798. /*
  799. * multi line
  800. * // this should not match single line comment
  801. */ end
  802. h/*hello*/i // HIfujeg
  803. g
  804. *(buf+i) =
  805. in_single_quotes = false
  806. in_double_quotes = true
  807. i = 27
  808. buf+i = match\
  809. /*\
  810. nor\
  811. should\
  812. this\
  813. "
  814. '\'\'"\'\
  815. // this should not match\
  816. /*\
  817. nor\
  818. should\
  819. this\
  820. '
  821. // test
  822. /*
  823. * multi line
  824. * // this should not match single line comment
  825. */ end
  826. h/*hello*/i // HIfujeg
  827. g
  828. *(buf+i) = m
  829. in_single_quotes = false
  830. in_double_quotes = true
  831. i = 28
  832. buf+i = atch\
  833. /*\
  834. nor\
  835. should\
  836. this\
  837. "
  838. '\'\'"\'\
  839. // this should not match\
  840. /*\
  841. nor\
  842. should\
  843. this\
  844. '
  845. // test
  846. /*
  847. * multi line
  848. * // this should not match single line comment
  849. */ end
  850. h/*hello*/i // HIfujeg
  851. g
  852. *(buf+i) = a
  853. in_single_quotes = false
  854. in_double_quotes = true
  855. i = 29
  856. buf+i = tch\
  857. /*\
  858. nor\
  859. should\
  860. this\
  861. "
  862. '\'\'"\'\
  863. // this should not match\
  864. /*\
  865. nor\
  866. should\
  867. this\
  868. '
  869. // test
  870. /*
  871. * multi line
  872. * // this should not match single line comment
  873. */ end
  874. h/*hello*/i // HIfujeg
  875. g
  876. *(buf+i) = t
  877. in_single_quotes = false
  878. in_double_quotes = true
  879. i = 30
  880. buf+i = ch\
  881. /*\
  882. nor\
  883. should\
  884. this\
  885. "
  886. '\'\'"\'\
  887. // this should not match\
  888. /*\
  889. nor\
  890. should\
  891. this\
  892. '
  893. // test
  894. /*
  895. * multi line
  896. * // this should not match single line comment
  897. */ end
  898. h/*hello*/i // HIfujeg
  899. g
  900. *(buf+i) = c
  901. in_single_quotes = false
  902. in_double_quotes = true
  903. i = 31
  904. buf+i = h\
  905. /*\
  906. nor\
  907. should\
  908. this\
  909. "
  910. '\'\'"\'\
  911. // this should not match\
  912. /*\
  913. nor\
  914. should\
  915. this\
  916. '
  917. // test
  918. /*
  919. * multi line
  920. * // this should not match single line comment
  921. */ end
  922. h/*hello*/i // HIfujeg
  923. g
  924. *(buf+i) = h
  925. in_single_quotes = false
  926. in_double_quotes = true
  927. i = 32
  928. buf+i = \
  929. /*\
  930. nor\
  931. should\
  932. this\
  933. "
  934. '\'\'"\'\
  935. // this should not match\
  936. /*\
  937. nor\
  938. should\
  939. this\
  940. '
  941. // test
  942. /*
  943. * multi line
  944. * // this should not match single line comment
  945. */ end
  946. h/*hello*/i // HIfujeg
  947. g
  948. *(buf+i) = \
  949. in_single_quotes = false
  950. in_double_quotes = true
  951. i = 33
  952. buf+i =
  953. /*\
  954. nor\
  955. should\
  956. this\
  957. "
  958. '\'\'"\'\
  959. // this should not match\
  960. /*\
  961. nor\
  962. should\
  963. this\
  964. '
  965. // test
  966. /*
  967. * multi line
  968. * // this should not match single line comment
  969. */ end
  970. h/*hello*/i // HIfujeg
  971. g
  972. *(buf+i) =
  973. in_single_quotes = false
  974. in_double_quotes = true
  975. i = 34
  976. buf+i = /*\
  977. nor\
  978. should\
  979. this\
  980. "
  981. '\'\'"\'\
  982. // this should not match\
  983. /*\
  984. nor\
  985. should\
  986. this\
  987. '
  988. // test
  989. /*
  990. * multi line
  991. * // this should not match single line comment
  992. */ end
  993. h/*hello*/i // HIfujeg
  994. g
  995. *(buf+i) = /
  996. in_single_quotes = false
  997. in_double_quotes = true
  998. i = 36
  999. buf+i = \
  1000. nor\
  1001. should\
  1002. this\
  1003. "
  1004. '\'\'"\'\
  1005. // this should not match\
  1006. /*\
  1007. nor\
  1008. should\
  1009. this\
  1010. '
  1011. // test
  1012. /*
  1013. * multi line
  1014. * // this should not match single line comment
  1015. */ end
  1016. h/*hello*/i // HIfujeg
  1017. g
  1018. *(buf+i) = \
  1019. in_single_quotes = false
  1020. in_double_quotes = true
  1021. i = 37
  1022. buf+i =
  1023. nor\
  1024. should\
  1025. this\
  1026. "
  1027. '\'\'"\'\
  1028. // this should not match\
  1029. /*\
  1030. nor\
  1031. should\
  1032. this\
  1033. '
  1034. // test
  1035. /*
  1036. * multi line
  1037. * // this should not match single line comment
  1038. */ end
  1039. h/*hello*/i // HIfujeg
  1040. g
  1041. *(buf+i) =
  1042. in_single_quotes = false
  1043. in_double_quotes = true
  1044. i = 38
  1045. buf+i = nor\
  1046. should\
  1047. this\
  1048. "
  1049. '\'\'"\'\
  1050. // this should not match\
  1051. /*\
  1052. nor\
  1053. should\
  1054. this\
  1055. '
  1056. // test
  1057. /*
  1058. * multi line
  1059. * // this should not match single line comment
  1060. */ end
  1061. h/*hello*/i // HIfujeg
  1062. g
  1063. *(buf+i) = n
  1064. in_single_quotes = false
  1065. in_double_quotes = true
  1066. i = 39
  1067. buf+i = or\
  1068. should\
  1069. this\
  1070. "
  1071. '\'\'"\'\
  1072. // this should not match\
  1073. /*\
  1074. nor\
  1075. should\
  1076. this\
  1077. '
  1078. // test
  1079. /*
  1080. * multi line
  1081. * // this should not match single line comment
  1082. */ end
  1083. h/*hello*/i // HIfujeg
  1084. g
  1085. *(buf+i) = o
  1086. in_single_quotes = false
  1087. in_double_quotes = true
  1088. i = 40
  1089. buf+i = r\
  1090. should\
  1091. this\
  1092. "
  1093. '\'\'"\'\
  1094. // this should not match\
  1095. /*\
  1096. nor\
  1097. should\
  1098. this\
  1099. '
  1100. // test
  1101. /*
  1102. * multi line
  1103. * // this should not match single line comment
  1104. */ end
  1105. h/*hello*/i // HIfujeg
  1106. g
  1107. *(buf+i) = r
  1108. in_single_quotes = false
  1109. in_double_quotes = true
  1110. i = 41
  1111. buf+i = \
  1112. should\
  1113. this\
  1114. "
  1115. '\'\'"\'\
  1116. // this should not match\
  1117. /*\
  1118. nor\
  1119. should\
  1120. this\
  1121. '
  1122. // test
  1123. /*
  1124. * multi line
  1125. * // this should not match single line comment
  1126. */ end
  1127. h/*hello*/i // HIfujeg
  1128. g
  1129. *(buf+i) = \
  1130. in_single_quotes = false
  1131. in_double_quotes = true
  1132. i = 42
  1133. buf+i =
  1134. should\
  1135. this\
  1136. "
  1137. '\'\'"\'\
  1138. // this should not match\
  1139. /*\
  1140. nor\
  1141. should\
  1142. this\
  1143. '
  1144. // test
  1145. /*
  1146. * multi line
  1147. * // this should not match single line comment
  1148. */ end
  1149. h/*hello*/i // HIfujeg
  1150. g
  1151. *(buf+i) =
  1152. in_single_quotes = false
  1153. in_double_quotes = true
  1154. i = 43
  1155. buf+i = should\
  1156. this\
  1157. "
  1158. '\'\'"\'\
  1159. // this should not match\
  1160. /*\
  1161. nor\
  1162. should\
  1163. this\
  1164. '
  1165. // test
  1166. /*
  1167. * multi line
  1168. * // this should not match single line comment
  1169. */ end
  1170. h/*hello*/i // HIfujeg
  1171. g
  1172. *(buf+i) = s
  1173. in_single_quotes = false
  1174. in_double_quotes = true
  1175. i = 44
  1176. buf+i = hould\
  1177. this\
  1178. "
  1179. '\'\'"\'\
  1180. // this should not match\
  1181. /*\
  1182. nor\
  1183. should\
  1184. this\
  1185. '
  1186. // test
  1187. /*
  1188. * multi line
  1189. * // this should not match single line comment
  1190. */ end
  1191. h/*hello*/i // HIfujeg
  1192. g
  1193. *(buf+i) = h
  1194. in_single_quotes = false
  1195. in_double_quotes = true
  1196. i = 45
  1197. buf+i = ould\
  1198. this\
  1199. "
  1200. '\'\'"\'\
  1201. // this should not match\
  1202. /*\
  1203. nor\
  1204. should\
  1205. this\
  1206. '
  1207. // test
  1208. /*
  1209. * multi line
  1210. * // this should not match single line comment
  1211. */ end
  1212. h/*hello*/i // HIfujeg
  1213. g
  1214. *(buf+i) = o
  1215. in_single_quotes = false
  1216. in_double_quotes = true
  1217. i = 46
  1218. buf+i = uld\
  1219. this\
  1220. "
  1221. '\'\'"\'\
  1222. // this should not match\
  1223. /*\
  1224. nor\
  1225. should\
  1226. this\
  1227. '
  1228. // test
  1229. /*
  1230. * multi line
  1231. * // this should not match single line comment
  1232. */ end
  1233. h/*hello*/i // HIfujeg
  1234. g
  1235. *(buf+i) = u
  1236. in_single_quotes = false
  1237. in_double_quotes = true
  1238. i = 47
  1239. buf+i = ld\
  1240. this\
  1241. "
  1242. '\'\'"\'\
  1243. // this should not match\
  1244. /*\
  1245. nor\
  1246. should\
  1247. this\
  1248. '
  1249. // test
  1250. /*
  1251. * multi line
  1252. * // this should not match single line comment
  1253. */ end
  1254. h/*hello*/i // HIfujeg
  1255. g
  1256. *(buf+i) = l
  1257. in_single_quotes = false
  1258. in_double_quotes = true
  1259. i = 48
  1260. buf+i = d\
  1261. this\
  1262. "
  1263. '\'\'"\'\
  1264. // this should not match\
  1265. /*\
  1266. nor\
  1267. should\
  1268. this\
  1269. '
  1270. // test
  1271. /*
  1272. * multi line
  1273. * // this should not match single line comment
  1274. */ end
  1275. h/*hello*/i // HIfujeg
  1276. g
  1277. *(buf+i) = d
  1278. in_single_quotes = false
  1279. in_double_quotes = true
  1280. i = 49
  1281. buf+i = \
  1282. this\
  1283. "
  1284. '\'\'"\'\
  1285. // this should not match\
  1286. /*\
  1287. nor\
  1288. should\
  1289. this\
  1290. '
  1291. // test
  1292. /*
  1293. * multi line
  1294. * // this should not match single line comment
  1295. */ end
  1296. h/*hello*/i // HIfujeg
  1297. g
  1298. *(buf+i) = \
  1299. in_single_quotes = false
  1300. in_double_quotes = true
  1301. i = 50
  1302. buf+i =
  1303. this\
  1304. "
  1305. '\'\'"\'\
  1306. // this should not match\
  1307. /*\
  1308. nor\
  1309. should\
  1310. this\
  1311. '
  1312. // test
  1313. /*
  1314. * multi line
  1315. * // this should not match single line comment
  1316. */ end
  1317. h/*hello*/i // HIfujeg
  1318. g
  1319. *(buf+i) =
  1320. in_single_quotes = false
  1321. in_double_quotes = true
  1322. i = 51
  1323. buf+i = this\
  1324. "
  1325. '\'\'"\'\
  1326. // this should not match\
  1327. /*\
  1328. nor\
  1329. should\
  1330. this\
  1331. '
  1332. // test
  1333. /*
  1334. * multi line
  1335. * // this should not match single line comment
  1336. */ end
  1337. h/*hello*/i // HIfujeg
  1338. g
  1339. *(buf+i) = t
  1340. in_single_quotes = false
  1341. in_double_quotes = true
  1342. i = 52
  1343. buf+i = his\
  1344. "
  1345. '\'\'"\'\
  1346. // this should not match\
  1347. /*\
  1348. nor\
  1349. should\
  1350. this\
  1351. '
  1352. // test
  1353. /*
  1354. * multi line
  1355. * // this should not match single line comment
  1356. */ end
  1357. h/*hello*/i // HIfujeg
  1358. g
  1359. *(buf+i) = h
  1360. in_single_quotes = false
  1361. in_double_quotes = true
  1362. i = 53
  1363. buf+i = is\
  1364. "
  1365. '\'\'"\'\
  1366. // this should not match\
  1367. /*\
  1368. nor\
  1369. should\
  1370. this\
  1371. '
  1372. // test
  1373. /*
  1374. * multi line
  1375. * // this should not match single line comment
  1376. */ end
  1377. h/*hello*/i // HIfujeg
  1378. g
  1379. *(buf+i) = i
  1380. in_single_quotes = false
  1381. in_double_quotes = true
  1382. i = 54
  1383. buf+i = s\
  1384. "
  1385. '\'\'"\'\
  1386. // this should not match\
  1387. /*\
  1388. nor\
  1389. should\
  1390. this\
  1391. '
  1392. // test
  1393. /*
  1394. * multi line
  1395. * // this should not match single line comment
  1396. */ end
  1397. h/*hello*/i // HIfujeg
  1398. g
  1399. *(buf+i) = s
  1400. in_single_quotes = false
  1401. in_double_quotes = true
  1402. i = 55
  1403. buf+i = \
  1404. "
  1405. '\'\'"\'\
  1406. // this should not match\
  1407. /*\
  1408. nor\
  1409. should\
  1410. this\
  1411. '
  1412. // test
  1413. /*
  1414. * multi line
  1415. * // this should not match single line comment
  1416. */ end
  1417. h/*hello*/i // HIfujeg
  1418. g
  1419. *(buf+i) = \
  1420. in_single_quotes = false
  1421. in_double_quotes = true
  1422. i = 56
  1423. buf+i =
  1424. "
  1425. '\'\'"\'\
  1426. // this should not match\
  1427. /*\
  1428. nor\
  1429. should\
  1430. this\
  1431. '
  1432. // test
  1433. /*
  1434. * multi line
  1435. * // this should not match single line comment
  1436. */ end
  1437. h/*hello*/i // HIfujeg
  1438. g
  1439. *(buf+i) =
  1440. in_single_quotes = false
  1441. in_double_quotes = true
  1442. i = 57
  1443. buf+i = "
  1444. '\'\'"\'\
  1445. // this should not match\
  1446. /*\
  1447. nor\
  1448. should\
  1449. this\
  1450. '
  1451. // test
  1452. /*
  1453. * multi line
  1454. * // this should not match single line comment
  1455. */ end
  1456. h/*hello*/i // HIfujeg
  1457. g
  1458. *(buf+i) = "
  1459. matched "
  1460. in_single_quotes = false
  1461. in_double_quotes = false
  1462. i = 58
  1463. buf+i =
  1464. '\'\'"\'\
  1465. // this should not match\
  1466. /*\
  1467. nor\
  1468. should\
  1469. this\
  1470. '
  1471. // test
  1472. /*
  1473. * multi line
  1474. * // this should not match single line comment
  1475. */ end
  1476. h/*hello*/i // HIfujeg
  1477. g
  1478. *(buf+i) =
  1479. in_single_quotes = false
  1480. in_double_quotes = false
  1481. i = 59
  1482. buf+i = '\'\'"\'\
  1483. // this should not match\
  1484. /*\
  1485. nor\
  1486. should\
  1487. this\
  1488. '
  1489. // test
  1490. /*
  1491. * multi line
  1492. * // this should not match single line comment
  1493. */ end
  1494. h/*hello*/i // HIfujeg
  1495. g
  1496. *(buf+i) = '
  1497. matched '
  1498. in_single_quotes = true
  1499. in_double_quotes = false
  1500. i = 60
  1501. buf+i = \'\'"\'\
  1502. // this should not match\
  1503. /*\
  1504. nor\
  1505. should\
  1506. this\
  1507. '
  1508. // test
  1509. /*
  1510. * multi line
  1511. * // this should not match single line comment
  1512. */ end
  1513. h/*hello*/i // HIfujeg
  1514. g
  1515. *(buf+i) = \
  1516. matched \'
  1517. in_single_quotes = true
  1518. in_double_quotes = false
  1519. i = 62
  1520. buf+i = \'"\'\
  1521. // this should not match\
  1522. /*\
  1523. nor\
  1524. should\
  1525. this\
  1526. '
  1527. // test
  1528. /*
  1529. * multi line
  1530. * // this should not match single line comment
  1531. */ end
  1532. h/*hello*/i // HIfujeg
  1533. g
  1534. *(buf+i) = \
  1535. matched \'
  1536. in_single_quotes = true
  1537. in_double_quotes = false
  1538. i = 64
  1539. buf+i = "\'\
  1540. // this should not match\
  1541. /*\
  1542. nor\
  1543. should\
  1544. this\
  1545. '
  1546. // test
  1547. /*
  1548. * multi line
  1549. * // this should not match single line comment
  1550. */ end
  1551. h/*hello*/i // HIfujeg
  1552. g
  1553. *(buf+i) = "
  1554. matched "
  1555. in_single_quotes = true
  1556. in_double_quotes = false
  1557. i = 65
  1558. buf+i = \'\
  1559. // this should not match\
  1560. /*\
  1561. nor\
  1562. should\
  1563. this\
  1564. '
  1565. // test
  1566. /*
  1567. * multi line
  1568. * // this should not match single line comment
  1569. */ end
  1570. h/*hello*/i // HIfujeg
  1571. g
  1572. *(buf+i) = \
  1573. matched \'
  1574. in_single_quotes = true
  1575. in_double_quotes = false
  1576. i = 67
  1577. buf+i = \
  1578. // this should not match\
  1579. /*\
  1580. nor\
  1581. should\
  1582. this\
  1583. '
  1584. // test
  1585. /*
  1586. * multi line
  1587. * // this should not match single line comment
  1588. */ end
  1589. h/*hello*/i // HIfujeg
  1590. g
  1591. *(buf+i) = \
  1592. in_single_quotes = true
  1593. in_double_quotes = false
  1594. i = 68
  1595. buf+i =
  1596. // this should not match\
  1597. /*\
  1598. nor\
  1599. should\
  1600. this\
  1601. '
  1602. // test
  1603. /*
  1604. * multi line
  1605. * // this should not match single line comment
  1606. */ end
  1607. h/*hello*/i // HIfujeg
  1608. g
  1609. *(buf+i) =
  1610. in_single_quotes = true
  1611. in_double_quotes = false
  1612. i = 69
  1613. buf+i = // this should not match\
  1614. /*\
  1615. nor\
  1616. should\
  1617. this\
  1618. '
  1619. // test
  1620. /*
  1621. * multi line
  1622. * // this should not match single line comment
  1623. */ end
  1624. h/*hello*/i // HIfujeg
  1625. g
  1626. *(buf+i) = /
  1627. in_single_quotes = true
  1628. in_double_quotes = false
  1629. i = 71
  1630. buf+i = this should not match\
  1631. /*\
  1632. nor\
  1633. should\
  1634. this\
  1635. '
  1636. // test
  1637. /*
  1638. * multi line
  1639. * // this should not match single line comment
  1640. */ end
  1641. h/*hello*/i // HIfujeg
  1642. g
  1643. *(buf+i) =
  1644. in_single_quotes = true
  1645. in_double_quotes = false
  1646. i = 72
  1647. buf+i = this should not match\
  1648. /*\
  1649. nor\
  1650. should\
  1651. this\
  1652. '
  1653. // test
  1654. /*
  1655. * multi line
  1656. * // this should not match single line comment
  1657. */ end
  1658. h/*hello*/i // HIfujeg
  1659. g
  1660. *(buf+i) = t
  1661. in_single_quotes = true
  1662. in_double_quotes = false
  1663. i = 73
  1664. buf+i = his should not match\
  1665. /*\
  1666. nor\
  1667. should\
  1668. this\
  1669. '
  1670. // test
  1671. /*
  1672. * multi line
  1673. * // this should not match single line comment
  1674. */ end
  1675. h/*hello*/i // HIfujeg
  1676. g
  1677. *(buf+i) = h
  1678. in_single_quotes = true
  1679. in_double_quotes = false
  1680. i = 74
  1681. buf+i = is should not match\
  1682. /*\
  1683. nor\
  1684. should\
  1685. this\
  1686. '
  1687. // test
  1688. /*
  1689. * multi line
  1690. * // this should not match single line comment
  1691. */ end
  1692. h/*hello*/i // HIfujeg
  1693. g
  1694. *(buf+i) = i
  1695. in_single_quotes = true
  1696. in_double_quotes = false
  1697. i = 75
  1698. buf+i = s should not match\
  1699. /*\
  1700. nor\
  1701. should\
  1702. this\
  1703. '
  1704. // test
  1705. /*
  1706. * multi line
  1707. * // this should not match single line comment
  1708. */ end
  1709. h/*hello*/i // HIfujeg
  1710. g
  1711. *(buf+i) = s
  1712. in_single_quotes = true
  1713. in_double_quotes = false
  1714. i = 76
  1715. buf+i = should not match\
  1716. /*\
  1717. nor\
  1718. should\
  1719. this\
  1720. '
  1721. // test
  1722. /*
  1723. * multi line
  1724. * // this should not match single line comment
  1725. */ end
  1726. h/*hello*/i // HIfujeg
  1727. g
  1728. *(buf+i) =
  1729. in_single_quotes = true
  1730. in_double_quotes = false
  1731. i = 77
  1732. buf+i = should not match\
  1733. /*\
  1734. nor\
  1735. should\
  1736. this\
  1737. '
  1738. // test
  1739. /*
  1740. * multi line
  1741. * // this should not match single line comment
  1742. */ end
  1743. h/*hello*/i // HIfujeg
  1744. g
  1745. *(buf+i) = s
  1746. in_single_quotes = true
  1747. in_double_quotes = false
  1748. i = 78
  1749. buf+i = hould not match\
  1750. /*\
  1751. nor\
  1752. should\
  1753. this\
  1754. '
  1755. // test
  1756. /*
  1757. * multi line
  1758. * // this should not match single line comment
  1759. */ end
  1760. h/*hello*/i // HIfujeg
  1761. g
  1762. *(buf+i) = h
  1763. in_single_quotes = true
  1764. in_double_quotes = false
  1765. i = 79
  1766. buf+i = ould not match\
  1767. /*\
  1768. nor\
  1769. should\
  1770. this\
  1771. '
  1772. // test
  1773. /*
  1774. * multi line
  1775. * // this should not match single line comment
  1776. */ end
  1777. h/*hello*/i // HIfujeg
  1778. g
  1779. *(buf+i) = o
  1780. in_single_quotes = true
  1781. in_double_quotes = false
  1782. i = 80
  1783. buf+i = uld not match\
  1784. /*\
  1785. nor\
  1786. should\
  1787. this\
  1788. '
  1789. // test
  1790. /*
  1791. * multi line
  1792. * // this should not match single line comment
  1793. */ end
  1794. h/*hello*/i // HIfujeg
  1795. g
  1796. *(buf+i) = u
  1797. in_single_quotes = true
  1798. in_double_quotes = false
  1799. i = 81
  1800. buf+i = ld not match\
  1801. /*\
  1802. nor\
  1803. should\
  1804. this\
  1805. '
  1806. // test
  1807. /*
  1808. * multi line
  1809. * // this should not match single line comment
  1810. */ end
  1811. h/*hello*/i // HIfujeg
  1812. g
  1813. *(buf+i) = l
  1814. in_single_quotes = true
  1815. in_double_quotes = false
  1816. i = 82
  1817. buf+i = d not match\
  1818. /*\
  1819. nor\
  1820. should\
  1821. this\
  1822. '
  1823. // test
  1824. /*
  1825. * multi line
  1826. * // this should not match single line comment
  1827. */ end
  1828. h/*hello*/i // HIfujeg
  1829. g
  1830. *(buf+i) = d
  1831. in_single_quotes = true
  1832. in_double_quotes = false
  1833. i = 83
  1834. buf+i = not match\
  1835. /*\
  1836. nor\
  1837. should\
  1838. this\
  1839. '
  1840. // test
  1841. /*
  1842. * multi line
  1843. * // this should not match single line comment
  1844. */ end
  1845. h/*hello*/i // HIfujeg
  1846. g
  1847. *(buf+i) =
  1848. in_single_quotes = true
  1849. in_double_quotes = false
  1850. i = 84
  1851. buf+i = not match\
  1852. /*\
  1853. nor\
  1854. should\
  1855. this\
  1856. '
  1857. // test
  1858. /*
  1859. * multi line
  1860. * // this should not match single line comment
  1861. */ end
  1862. h/*hello*/i // HIfujeg
  1863. g
  1864. *(buf+i) = n
  1865. in_single_quotes = true
  1866. in_double_quotes = false
  1867. i = 85
  1868. buf+i = ot match\
  1869. /*\
  1870. nor\
  1871. should\
  1872. this\
  1873. '
  1874. // test
  1875. /*
  1876. * multi line
  1877. * // this should not match single line comment
  1878. */ end
  1879. h/*hello*/i // HIfujeg
  1880. g
  1881. *(buf+i) = o
  1882. in_single_quotes = true
  1883. in_double_quotes = false
  1884. i = 86
  1885. buf+i = t match\
  1886. /*\
  1887. nor\
  1888. should\
  1889. this\
  1890. '
  1891. // test
  1892. /*
  1893. * multi line
  1894. * // this should not match single line comment
  1895. */ end
  1896. h/*hello*/i // HIfujeg
  1897. g
  1898. *(buf+i) = t
  1899. in_single_quotes = true
  1900. in_double_quotes = false
  1901. i = 87
  1902. buf+i = match\
  1903. /*\
  1904. nor\
  1905. should\
  1906. this\
  1907. '
  1908. // test
  1909. /*
  1910. * multi line
  1911. * // this should not match single line comment
  1912. */ end
  1913. h/*hello*/i // HIfujeg
  1914. g
  1915. *(buf+i) =
  1916. in_single_quotes = true
  1917. in_double_quotes = false
  1918. i = 88
  1919. buf+i = match\
  1920. /*\
  1921. nor\
  1922. should\
  1923. this\
  1924. '
  1925. // test
  1926. /*
  1927. * multi line
  1928. * // this should not match single line comment
  1929. */ end
  1930. h/*hello*/i // HIfujeg
  1931. g
  1932. *(buf+i) = m
  1933. in_single_quotes = true
  1934. in_double_quotes = false
  1935. i = 89
  1936. buf+i = atch\
  1937. /*\
  1938. nor\
  1939. should\
  1940. this\
  1941. '
  1942. // test
  1943. /*
  1944. * multi line
  1945. * // this should not match single line comment
  1946. */ end
  1947. h/*hello*/i // HIfujeg
  1948. g
  1949. *(buf+i) = a
  1950. in_single_quotes = true
  1951. in_double_quotes = false
  1952. i = 90
  1953. buf+i = tch\
  1954. /*\
  1955. nor\
  1956. should\
  1957. this\
  1958. '
  1959. // test
  1960. /*
  1961. * multi line
  1962. * // this should not match single line comment
  1963. */ end
  1964. h/*hello*/i // HIfujeg
  1965. g
  1966. *(buf+i) = t
  1967. in_single_quotes = true
  1968. in_double_quotes = false
  1969. i = 91
  1970. buf+i = ch\
  1971. /*\
  1972. nor\
  1973. should\
  1974. this\
  1975. '
  1976. // test
  1977. /*
  1978. * multi line
  1979. * // this should not match single line comment
  1980. */ end
  1981. h/*hello*/i // HIfujeg
  1982. g
  1983. *(buf+i) = c
  1984. in_single_quotes = true
  1985. in_double_quotes = false
  1986. i = 92
  1987. buf+i = h\
  1988. /*\
  1989. nor\
  1990. should\
  1991. this\
  1992. '
  1993. // test
  1994. /*
  1995. * multi line
  1996. * // this should not match single line comment
  1997. */ end
  1998. h/*hello*/i // HIfujeg
  1999. g
  2000. *(buf+i) = h
  2001. in_single_quotes = true
  2002. in_double_quotes = false
  2003. i = 93
  2004. buf+i = \
  2005. /*\
  2006. nor\
  2007. should\
  2008. this\
  2009. '
  2010. // test
  2011. /*
  2012. * multi line
  2013. * // this should not match single line comment
  2014. */ end
  2015. h/*hello*/i // HIfujeg
  2016. g
  2017. *(buf+i) = \
  2018. in_single_quotes = true
  2019. in_double_quotes = false
  2020. i = 94
  2021. buf+i =
  2022. /*\
  2023. nor\
  2024. should\
  2025. this\
  2026. '
  2027. // test
  2028. /*
  2029. * multi line
  2030. * // this should not match single line comment
  2031. */ end
  2032. h/*hello*/i // HIfujeg
  2033. g
  2034. *(buf+i) =
  2035. in_single_quotes = true
  2036. in_double_quotes = false
  2037. i = 95
  2038. buf+i = /*\
  2039. nor\
  2040. should\
  2041. this\
  2042. '
  2043. // test
  2044. /*
  2045. * multi line
  2046. * // this should not match single line comment
  2047. */ end
  2048. h/*hello*/i // HIfujeg
  2049. g
  2050. *(buf+i) = /
  2051. in_single_quotes = true
  2052. in_double_quotes = false
  2053. i = 97
  2054. buf+i = \
  2055. nor\
  2056. should\
  2057. this\
  2058. '
  2059. // test
  2060. /*
  2061. * multi line
  2062. * // this should not match single line comment
  2063. */ end
  2064. h/*hello*/i // HIfujeg
  2065. g
  2066. *(buf+i) = \
  2067. in_single_quotes = true
  2068. in_double_quotes = false
  2069. i = 98
  2070. buf+i =
  2071. nor\
  2072. should\
  2073. this\
  2074. '
  2075. // test
  2076. /*
  2077. * multi line
  2078. * // this should not match single line comment
  2079. */ end
  2080. h/*hello*/i // HIfujeg
  2081. g
  2082. *(buf+i) =
  2083. in_single_quotes = true
  2084. in_double_quotes = false
  2085. i = 99
  2086. buf+i = nor\
  2087. should\
  2088. this\
  2089. '
  2090. // test
  2091. /*
  2092. * multi line
  2093. * // this should not match single line comment
  2094. */ end
  2095. h/*hello*/i // HIfujeg
  2096. g
  2097. *(buf+i) = n
  2098. in_single_quotes = true
  2099. in_double_quotes = false
  2100. i = 100
  2101. buf+i = or\
  2102. should\
  2103. this\
  2104. '
  2105. // test
  2106. /*
  2107. * multi line
  2108. * // this should not match single line comment
  2109. */ end
  2110. h/*hello*/i // HIfujeg
  2111. g
  2112. *(buf+i) = o
  2113. in_single_quotes = true
  2114. in_double_quotes = false
  2115. i = 101
  2116. buf+i = r\
  2117. should\
  2118. this\
  2119. '
  2120. // test
  2121. /*
  2122. * multi line
  2123. * // this should not match single line comment
  2124. */ end
  2125. h/*hello*/i // HIfujeg
  2126. g
  2127. *(buf+i) = r
  2128. in_single_quotes = true
  2129. in_double_quotes = false
  2130. i = 102
  2131. buf+i = \
  2132. should\
  2133. this\
  2134. '
  2135. // test
  2136. /*
  2137. * multi line
  2138. * // this should not match single line comment
  2139. */ end
  2140. h/*hello*/i // HIfujeg
  2141. g
  2142. *(buf+i) = \
  2143. in_single_quotes = true
  2144. in_double_quotes = false
  2145. i = 103
  2146. buf+i =
  2147. should\
  2148. this\
  2149. '
  2150. // test
  2151. /*
  2152. * multi line
  2153. * // this should not match single line comment
  2154. */ end
  2155. h/*hello*/i // HIfujeg
  2156. g
  2157. *(buf+i) =
  2158. in_single_quotes = true
  2159. in_double_quotes = false
  2160. i = 104
  2161. buf+i = should\
  2162. this\
  2163. '
  2164. // test
  2165. /*
  2166. * multi line
  2167. * // this should not match single line comment
  2168. */ end
  2169. h/*hello*/i // HIfujeg
  2170. g
  2171. *(buf+i) = s
  2172. in_single_quotes = true
  2173. in_double_quotes = false
  2174. i = 105
  2175. buf+i = hould\
  2176. this\
  2177. '
  2178. // test
  2179. /*
  2180. * multi line
  2181. * // this should not match single line comment
  2182. */ end
  2183. h/*hello*/i // HIfujeg
  2184. g
  2185. *(buf+i) = h
  2186. in_single_quotes = true
  2187. in_double_quotes = false
  2188. i = 106
  2189. buf+i = ould\
  2190. this\
  2191. '
  2192. // test
  2193. /*
  2194. * multi line
  2195. * // this should not match single line comment
  2196. */ end
  2197. h/*hello*/i // HIfujeg
  2198. g
  2199. *(buf+i) = o
  2200. in_single_quotes = true
  2201. in_double_quotes = false
  2202. i = 107
  2203. buf+i = uld\
  2204. this\
  2205. '
  2206. // test
  2207. /*
  2208. * multi line
  2209. * // this should not match single line comment
  2210. */ end
  2211. h/*hello*/i // HIfujeg
  2212. g
  2213. *(buf+i) = u
  2214. in_single_quotes = true
  2215. in_double_quotes = false
  2216. i = 108
  2217. buf+i = ld\
  2218. this\
  2219. '
  2220. // test
  2221. /*
  2222. * multi line
  2223. * // this should not match single line comment
  2224. */ end
  2225. h/*hello*/i // HIfujeg
  2226. g
  2227. *(buf+i) = l
  2228. in_single_quotes = true
  2229. in_double_quotes = false
  2230. i = 109
  2231. buf+i = d\
  2232. this\
  2233. '
  2234. // test
  2235. /*
  2236. * multi line
  2237. * // this should not match single line comment
  2238. */ end
  2239. h/*hello*/i // HIfujeg
  2240. g
  2241. *(buf+i) = d
  2242. in_single_quotes = true
  2243. in_double_quotes = false
  2244. i = 110
  2245. buf+i = \
  2246. this\
  2247. '
  2248. // test
  2249. /*
  2250. * multi line
  2251. * // this should not match single line comment
  2252. */ end
  2253. h/*hello*/i // HIfujeg
  2254. g
  2255. *(buf+i) = \
  2256. in_single_quotes = true
  2257. in_double_quotes = false
  2258. i = 111
  2259. buf+i =
  2260. this\
  2261. '
  2262. // test
  2263. /*
  2264. * multi line
  2265. * // this should not match single line comment
  2266. */ end
  2267. h/*hello*/i // HIfujeg
  2268. g
  2269. *(buf+i) =
  2270. in_single_quotes = true
  2271. in_double_quotes = false
  2272. i = 112
  2273. buf+i = this\
  2274. '
  2275. // test
  2276. /*
  2277. * multi line
  2278. * // this should not match single line comment
  2279. */ end
  2280. h/*hello*/i // HIfujeg
  2281. g
  2282. *(buf+i) = t
  2283. in_single_quotes = true
  2284. in_double_quotes = false
  2285. i = 113
  2286. buf+i = his\
  2287. '
  2288. // test
  2289. /*
  2290. * multi line
  2291. * // this should not match single line comment
  2292. */ end
  2293. h/*hello*/i // HIfujeg
  2294. g
  2295. *(buf+i) = h
  2296. in_single_quotes = true
  2297. in_double_quotes = false
  2298. i = 114
  2299. buf+i = is\
  2300. '
  2301. // test
  2302. /*
  2303. * multi line
  2304. * // this should not match single line comment
  2305. */ end
  2306. h/*hello*/i // HIfujeg
  2307. g
  2308. *(buf+i) = i
  2309. in_single_quotes = true
  2310. in_double_quotes = false
  2311. i = 115
  2312. buf+i = s\
  2313. '
  2314. // test
  2315. /*
  2316. * multi line
  2317. * // this should not match single line comment
  2318. */ end
  2319. h/*hello*/i // HIfujeg
  2320. g
  2321. *(buf+i) = s
  2322. in_single_quotes = true
  2323. in_double_quotes = false
  2324. i = 116
  2325. buf+i = \
  2326. '
  2327. // test
  2328. /*
  2329. * multi line
  2330. * // this should not match single line comment
  2331. */ end
  2332. h/*hello*/i // HIfujeg
  2333. g
  2334. *(buf+i) = \
  2335. in_single_quotes = true
  2336. in_double_quotes = false
  2337. i = 117
  2338. buf+i =
  2339. '
  2340. // test
  2341. /*
  2342. * multi line
  2343. * // this should not match single line comment
  2344. */ end
  2345. h/*hello*/i // HIfujeg
  2346. g
  2347. *(buf+i) =
  2348. in_single_quotes = true
  2349. in_double_quotes = false
  2350. i = 118
  2351. buf+i = '
  2352. // test
  2353. /*
  2354. * multi line
  2355. * // this should not match single line comment
  2356. */ end
  2357. h/*hello*/i // HIfujeg
  2358. g
  2359. *(buf+i) = '
  2360. matched '
  2361. in_single_quotes = false
  2362. in_double_quotes = false
  2363. i = 119
  2364. buf+i =
  2365. // test
  2366. /*
  2367. * multi line
  2368. * // this should not match single line comment
  2369. */ end
  2370. h/*hello*/i // HIfujeg
  2371. g
  2372. *(buf+i) =
  2373. in_single_quotes = false
  2374. in_double_quotes = false
  2375. i = 120
  2376. buf+i =
  2377. // test
  2378. /*
  2379. * multi line
  2380. * // this should not match single line comment
  2381. */ end
  2382. h/*hello*/i // HIfujeg
  2383. g
  2384. *(buf+i) =
  2385. in_single_quotes = false
  2386. in_double_quotes = false
  2387. i = 121
  2388. buf+i = // test
  2389. /*
  2390. * multi line
  2391. * // this should not match single line comment
  2392. */ end
  2393. h/*hello*/i // HIfujeg
  2394. g
  2395. *(buf+i) = /
  2396. matching single line comment
  2397. *(buf+i) = /
  2398. *(buf+i) = /
  2399. *(buf+i) =
  2400. *(buf+i) = t
  2401. *(buf+i) = e
  2402. *(buf+i) = s
  2403. *(buf+i) = t
  2404. in_single_quotes = false
  2405. in_double_quotes = false
  2406. i = 129
  2407. buf+i =
  2408. /*
  2409. * multi line
  2410. * // this should not match single line comment
  2411. */ end
  2412. h/*hello*/i // HIfujeg
  2413. g
  2414. *(buf+i) =
  2415. in_single_quotes = false
  2416. in_double_quotes = false
  2417. i = 130
  2418. buf+i = /*
  2419. * multi line
  2420. * // this should not match single line comment
  2421. */ end
  2422. h/*hello*/i // HIfujeg
  2423. g
  2424. *(buf+i) = /
  2425. matching multi line comment
  2426. *(buf+i) = /
  2427. *(buf+i) = *
  2428. *(buf+i) =
  2429. *(buf+i) =
  2430. *(buf+i) = *
  2431. *(buf+i) =
  2432. *(buf+i) = m
  2433. *(buf+i) = u
  2434. *(buf+i) = l
  2435. *(buf+i) = t
  2436. *(buf+i) = i
  2437. *(buf+i) =
  2438. *(buf+i) = l
  2439. *(buf+i) = i
  2440. *(buf+i) = n
  2441. *(buf+i) = e
  2442. *(buf+i) =
  2443. *(buf+i) =
  2444. *(buf+i) = *
  2445. *(buf+i) =
  2446. *(buf+i) = /
  2447. *(buf+i) = /
  2448. *(buf+i) =
  2449. *(buf+i) = t
  2450. *(buf+i) = h
  2451. *(buf+i) = i
  2452. *(buf+i) = s
  2453. *(buf+i) =
  2454. *(buf+i) = s
  2455. *(buf+i) = h
  2456. *(buf+i) = o
  2457. *(buf+i) = u
  2458. *(buf+i) = l
  2459. *(buf+i) = d
  2460. *(buf+i) =
  2461. *(buf+i) = n
  2462. *(buf+i) = o
  2463. *(buf+i) = t
  2464. *(buf+i) =
  2465. *(buf+i) = m
  2466. *(buf+i) = a
  2467. *(buf+i) = t
  2468. *(buf+i) = c
  2469. *(buf+i) = h
  2470. *(buf+i) =
  2471. *(buf+i) = s
  2472. *(buf+i) = i
  2473. *(buf+i) = n
  2474. *(buf+i) = g
  2475. *(buf+i) = l
  2476. *(buf+i) = e
  2477. *(buf+i) =
  2478. *(buf+i) = l
  2479. *(buf+i) = i
  2480. *(buf+i) = n
  2481. *(buf+i) = e
  2482. *(buf+i) =
  2483. *(buf+i) = c
  2484. *(buf+i) = o
  2485. *(buf+i) = m
  2486. *(buf+i) = m
  2487. *(buf+i) = e
  2488. *(buf+i) = n
  2489. *(buf+i) = t
  2490. *(buf+i) =
  2491. in_single_quotes = false
  2492. in_double_quotes = false
  2493. i = 197
  2494. buf+i = end
  2495. h/*hello*/i // HIfujeg
  2496. g
  2497. *(buf+i) =
  2498. in_single_quotes = false
  2499. in_double_quotes = false
  2500. i = 198
  2501. buf+i = end
  2502. h/*hello*/i // HIfujeg
  2503. g
  2504. *(buf+i) = e
  2505. in_single_quotes = false
  2506. in_double_quotes = false
  2507. i = 199
  2508. buf+i = nd
  2509. h/*hello*/i // HIfujeg
  2510. g
  2511. *(buf+i) = n
  2512. in_single_quotes = false
  2513. in_double_quotes = false
  2514. i = 200
  2515. buf+i = d
  2516. h/*hello*/i // HIfujeg
  2517. g
  2518. *(buf+i) = d
  2519. in_single_quotes = false
  2520. in_double_quotes = false
  2521. i = 201
  2522. buf+i =
  2523. h/*hello*/i // HIfujeg
  2524. g
  2525. *(buf+i) =
  2526. in_single_quotes = false
  2527. in_double_quotes = false
  2528. i = 202
  2529. buf+i = h/*hello*/i // HIfujeg
  2530. g
  2531. *(buf+i) = h
  2532. in_single_quotes = false
  2533. in_double_quotes = false
  2534. i = 203
  2535. buf+i = /*hello*/i // HIfujeg
  2536. g
  2537. *(buf+i) = /
  2538. matching multi line comment
  2539. *(buf+i) = /
  2540. *(buf+i) = *
  2541. *(buf+i) = h
  2542. *(buf+i) = e
  2543. *(buf+i) = l
  2544. *(buf+i) = l
  2545. *(buf+i) = o
  2546. in_single_quotes = false
  2547. in_double_quotes = false
  2548. i = 212
  2549. buf+i = i // HIfujeg
  2550. g
  2551. *(buf+i) = i
  2552. in_single_quotes = false
  2553. in_double_quotes = false
  2554. i = 213
  2555. buf+i = // HIfujeg
  2556. g
  2557. *(buf+i) =
  2558. in_single_quotes = false
  2559. in_double_quotes = false
  2560. i = 214
  2561. buf+i = // HIfujeg
  2562. g
  2563. *(buf+i) = /
  2564. matching single line comment
  2565. *(buf+i) = /
  2566. *(buf+i) = /
  2567. *(buf+i) =
  2568. *(buf+i) = H
  2569. *(buf+i) = I
  2570. *(buf+i) = f
  2571. *(buf+i) = u
  2572. *(buf+i) = j
  2573. *(buf+i) = e
  2574. *(buf+i) = g
  2575. in_single_quotes = false
  2576. in_double_quotes = false
  2577. i = 225
  2578. buf+i = g
  2579. *(buf+i) = g
  2580. in_single_quotes = false
  2581. in_double_quotes = false
  2582. i = 226
  2583. buf+i =
  2584. *(buf+i) =
  2585. in_single_quotes = false
  2586. in_double_quotes = false
  2587. $ ls -l
  2588. total 28
  2589. -rwxrwxr-x 1 mobile_c mobile_c 13008 Jan 16 13:39 c
  2590. -rw-rw-r-- 1 mobile_c mobile_c 3899 Jan 16 13:37 c.c
  2591. -rw-rw-r-- 1 mobile_c mobile_c 134 Jan 16 13:39 OUTFILE.c
  2592. -rw-rw-r-- 1 mobile_c mobile_c 227 Jan 16 13:36 quotes
  2593. $ cat OUTFILE.c
  2594. "''\"'\
  2595. // this should not match\
  2596. /*\
  2597. nor\
  2598. should\
  2599. this\
  2600. "
  2601. '\'\'"\'\
  2602. // this should not match\
  2603. /*\
  2604. nor\
  2605. should\
  2606. this\
  2607. '
  2608. end
  2609. hi
  2610. g
  2611.