201 {TopStart} {
204 yyextra->lastContext = YY_START;
205 yyextra->startCCodeLine=yyextra->yyLineNr;
206 BEGIN (TopSection);
207 }
static void handleCCode(yyscan_t yyscanner)
208<DefSection>^{LiteralStart} {
211 yyextra->lastContext = YY_START;
212 yyextra->startCCodeLine=yyextra->yyLineNr;
213 BEGIN (LiteralSection);
214 }
215<TopSection>^{TopEnd} {
218 BEGIN( yyextra->lastContext ) ;
219 }
220<TopSection>.*{nl} {
221 yyextra->CCodeBuffer += yytext;
222 yyextra->yyLineNr++;
223 }
224<LiteralSection>^{LiteralEnd} {
227 BEGIN( yyextra->lastContext ) ;
228 }
229<LiteralSection>.*{nl} {
230 yyextra->CCodeBuffer += yytext;
231 yyextra->yyLineNr++;
232 }
233<DefSection>{CPPC}.*{nl} {
234 yyextra->CCodeBuffer += yytext;
235 yyextra->yyLineNr++;
236 }
237<DefSection>^{ws}*{CCS} {
238 yyextra->CCodeBuffer += yytext;
239 yyextra->lastContext = YY_START;
240 BEGIN(COMMENT);
241 }
242<COMMENT>{CCE}{ws}*{nl} {
243 yyextra->CCodeBuffer+=yytext;
244 yyextra->yyLineNr++;
246 BEGIN(yyextra->lastContext);
247 }
248<COMMENT>{CCE} {
249 yyextra->CCodeBuffer+=yytext;
251 BEGIN(yyextra->lastContext);
252 }
253<COMMENT>[^*\n]+ {
254 yyextra->CCodeBuffer += yytext;
255 }
256<COMMENT>{CPPC}|{CCS} {
257 yyextra->CCodeBuffer += yytext;
258 }
259<COMMENT>{nl} {
260 yyextra->CCodeBuffer += yytext;
261 yyextra->yyLineNr++;
262 }
263<COMMENT>. {
264 yyextra->CCodeBuffer += yytext;
265 }
266<DefSection>^{nl} {
269 yyextra->startCCodeLine=yyextra->yyLineNr;
270 }
271<DefSection>^{ws}.*{nl} {
272 yyextra->CCodeBuffer += yytext;
273 yyextra->yyLineNr++;
274 }
275<DefSection>^{RulesStart} {
278 yyextra->startCCodeLine=yyextra->yyLineNr;
279 BEGIN (RulesSectionInit);
280 }
281<DefSection>^{nws} {
284 BEGIN(DefSectionLine);
285 }
286<DefSectionLine>.*{nl} {
288 yyextra->startCCodeLine=yyextra->yyLineNr;
289 BEGIN(DefSection);
290 }
291<RulesSectionInit,RulesPattern>^{RulesEnd} {
294 yyextra->startCCodeLine=yyextra->yyLineNr;
295 BEGIN (UserSection);
296 }
297<RulesSectionInit>^{nws} {
299 unput(*yytext);
300 BEGIN(RulesPattern);
301 }
302<RulesSectionInit>{nl} {
303 yyextra->CCodeBuffer += yytext;
304 yyextra->yyLineNr++;
305 }
306<RulesSectionInit>^{ws}.*{nl} {
307 yyextra->CCodeBuffer += yytext;
308 yyextra->yyLineNr++;
309 }
310<RulesPattern>"<<EOF>>" {
311 yyextra->rulesPatternBuffer += yytext;
312 }
313<RulesPattern>{EscapeRulesChar} {
314 yyextra->rulesPatternBuffer += yytext;
315 }
316<RulesPattern>{RulesSharp} {
317 yyextra->rulesPatternBuffer += yytext;
318 }
319<RulesPattern>{RulesCurly} {
320 yyextra->rulesPatternBuffer += yytext;
321 }
322<RulesPattern>{StartDouble} {
323 yyextra->rulesPatternBuffer += yytext;
324 yyextra->lastContext = YY_START;
325 BEGIN(RulesDouble);
326 }
327<RulesDouble,RulesRoundDouble>"\\\\" {
328 yyextra->rulesPatternBuffer += yytext;
329 }
330<RulesDouble,RulesRoundDouble>"\\\"" {
331 yyextra->rulesPatternBuffer += yytext;
332 }
333<RulesDouble>"\"" {
334 yyextra->rulesPatternBuffer += yytext;
335 BEGIN( yyextra->lastContext ) ;
336 }
337<RulesRoundDouble>"\"" {
338 yyextra->rulesPatternBuffer += yytext;
339 BEGIN(RulesRound) ;
340 }
341<RulesDouble,RulesRoundDouble>. {
342 yyextra->rulesPatternBuffer += yytext;
343 }
344<RulesPattern>{StartSquare} {
345 yyextra->rulesPatternBuffer += yytext;
346 yyextra->lastContext = YY_START;
347 BEGIN(RulesSquare);
348 }
349<RulesSquare,RulesRoundSquare>{CHARCE} {
350 yyextra->rulesPatternBuffer += yytext;
351 }
352<RulesSquare,RulesRoundSquare>"\\[" |
353<RulesSquare,RulesRoundSquare>"\\]" {
354 yyextra->rulesPatternBuffer += yytext;
355 }
356<RulesSquare>"]" {
357 yyextra->rulesPatternBuffer += yytext;
358 BEGIN(RulesPattern) ;
359 }
360<RulesRoundSquare>"]" {
361 yyextra->rulesPatternBuffer += yytext;
362 BEGIN(RulesRound) ;
363 }
364<RulesSquare,RulesRoundSquare>"\\\\" {
365 yyextra->rulesPatternBuffer += yytext;
366 }
367<RulesSquare,RulesRoundSquare>. {
368 yyextra->rulesPatternBuffer += yytext;
369 }
370<RulesPattern>{StartRoundQuest} {
371 yyextra->rulesPatternBuffer += yytext;
372 yyextra->lastContext = YY_START;
373 BEGIN(RulesRoundQuest);
374 }
375<RulesRoundQuest>{nl} {
376 yyextra->rulesPatternBuffer += yytext;
377 if (!yyextra->rulesPatternBuffer.empty())
378 {
380 codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
381 yyextra->rulesPatternBuffer.clear();
383 }
384 }
static void startFontClass(yyscan_t yyscanner, const char *s)
385<RulesRoundQuest>[^)] {
386 yyextra->rulesPatternBuffer += yytext;
387 }
388<RulesRoundQuest>")" {
389 yyextra->rulesPatternBuffer += yytext;
390 BEGIN(yyextra->lastContext);
391 }
392<RulesPattern>{StartRound} {
393 yyextra->roundCount++;
394 yyextra->rulesPatternBuffer += yytext;
395 yyextra->lastContext = YY_START;
396 BEGIN(RulesRound);
397 }
398<RulesRound>{RulesCurly} {
399 yyextra->rulesPatternBuffer += yytext;
400 }
401<RulesRound>{StartSquare} {
402 yyextra->rulesPatternBuffer += yytext;
403 BEGIN(RulesRoundSquare);
404 }
405<RulesRound>{StartDouble} {
406 yyextra->rulesPatternBuffer += yytext;
407 BEGIN(RulesRoundDouble);
408 }
409<RulesRound>{EscapeRulesChar} {
410 yyextra->rulesPatternBuffer += yytext;
411 }
412<RulesRound>"(" {
413 yyextra->roundCount++;
414 yyextra->rulesPatternBuffer += yytext;
415 }
416<RulesRound>")" {
417 yyextra->roundCount--;
418 yyextra->rulesPatternBuffer += yytext;
419 if (!yyextra->roundCount) BEGIN( yyextra->lastContext ) ;
420 }
421<RulesRound>{nl} {
422 yyextra->rulesPatternBuffer += yytext;
423 yyextra->yyLineNr++;
424 }
425<RulesRound>{ws} {
426 yyextra->rulesPatternBuffer += yytext;
427 }
428<RulesRound>. {
429 yyextra->rulesPatternBuffer += yytext;
430 }
431<RulesPattern>{ws}+"|" {
432 if (!yyextra->rulesPatternBuffer.empty())
433 {
435 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
436 yyextra->rulesPatternBuffer.clear();
438 }
440 yyextra->startCCodeLine=yyextra->yyLineNr;
441 yyextra->curlyCount = 0;
442 BEGIN(SkipCurly);
443 }
444<RulesPattern>^{ws}*{nl} {
446 }
447<RulesPattern>^{ws}+ {
449 }
450<RulesPattern>({ws}|{nl}) {
451 unput(*yytext);
452 if (!yyextra->rulesPatternBuffer.empty())
453 {
455 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
456 yyextra->rulesPatternBuffer.clear();
458 }
459 yyextra->startCCodeLine=yyextra->yyLineNr;
460 yyextra->curlyCount = 0;
461 BEGIN(SkipCurly);
462 }
463<RulesPattern>"\\\\" {
464 yyextra->rulesPatternBuffer += yytext;
465 }
466<RulesPattern>{CCS} {
467 if (!yyextra->rulesPatternBuffer.empty())
468 {
470 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
471 yyextra->rulesPatternBuffer.clear();
473 }
474 yyextra->CCodeBuffer += yytext;
475 yyextra->lastContext = YY_START;
476 BEGIN(COMMENT);
477 }
478<RulesPattern>. {
479 yyextra->rulesPatternBuffer += yytext;
480 }
481<SkipCurly>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
482 yyextra->CCodeBuffer += yytext;
483 yyextra->lastPreLineCtrlContext = YY_START;
484 BEGIN( PreLineCtrl );
485 }
486<PreLineCtrl>"\""[^\n\"]*"\"" {
487 yyextra->CCodeBuffer += yytext;
488 }
489<PreLineCtrl>. {
490 yyextra->CCodeBuffer += yytext;
491 }
492<PreLineCtrl>\n {
493 yyextra->CCodeBuffer += yytext;
494 yyextra->yyLineNr++;
495 BEGIN( yyextra->lastPreLineCtrlContext );
496 }
497<SkipCurly>"{" {
498 yyextra->CCodeBuffer += yytext;
499 ++yyextra->curlyCount ;
500 }
501<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | /* see bug710917 */
502<SkipCurly>"}" {
503 yyextra->CCodeBuffer += yytext;
505 if( yyextra->curlyCount )
506 {
507 --yyextra->curlyCount ;
508 }
509 }
#define lineCount(s, len)
510<SkipCurly>"}"{BN}*{DCOMM}"<" {
511 yyextra->CCodeBuffer += yytext;
513 if ( yyextra->curlyCount )
514 {
515 --yyextra->curlyCount ;
516 }
517 else
518 {
519 yyextra->docBlockContext = SkipCurlyEndDoc;
520 if (yytext[yyleng-3]=='/')
521 {
522 BEGIN( DocLine );
523 }
524 else
525 {
526 BEGIN( DocBlock );
527 }
528 }
529 }
530<SkipCurly>\" {
531 yyextra->CCodeBuffer += yytext;
532 yyextra->lastStringContext=SkipCurly;
533 BEGIN( SkipString );
534 }
535<SkipCurly>^{B}*"#" {
536 yyextra->CCodeBuffer += yytext;
537 yyextra->lastPreLineCtrlContext = YY_START;
538 BEGIN( PreLineCtrl );
539 }
540<SkipCurly>{B}*{RAWBEGIN} {
541 char *p = yytext;
544 yyextra->lastRawStringContext = YY_START;
545 yyextra->CCodeBuffer += yytext;
546 BEGIN(RawString);
547 }
DString extractBeginRawStringDelimiter(const char *rawStart)
548<SkipCurly>[^\n#"'@\\/{}<]+ {
549 yyextra->CCodeBuffer += yytext;
550 }
551<SkipCurly>{CCS} {
552 yyextra->CCodeBuffer += yytext;
553 yyextra->lastCContext = YY_START;
554 BEGIN(SkipComment);
555 }
556<SkipCurly>{CPPC} {
557 yyextra->CCodeBuffer += yytext;
558 yyextra->lastCContext = YY_START;
559 BEGIN(SkipCxxComment);
560 }
561<SkipCurly>{CHARLIT} {
562 yyextra->CCodeBuffer += yytext;
563 }
564<SkipCurly>\' {
565 yyextra->CCodeBuffer += yytext;
566 }
567<SkipCurly>. {
568 yyextra->CCodeBuffer += yytext;
569 }
570<SkipCurly>({CPPC}{B}*)?{CCS}"!" {
571 yyextra->CCodeBuffer += yytext;
572 yyextra->docBlockContext = YY_START;
573 BEGIN( DocBlock );
574 }
575<SkipCurly>{CCS}"*"[*]+{BL} {
577 yyextra->CCodeBuffer += yytext;
578 yyextra->yyLineNr++;
579 if( javadocBanner )
580 {
581 yyextra->docBlockContext = YY_START;
582 BEGIN( DocBlock );
583 }
584 else
585 {
586 BEGIN( Comment ) ;
587 }
588 }
#define Config_getBool(name)
589<SkipCurly>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
590 yyextra->CCodeBuffer += yytext;
591 yyextra->docBlockContext = YY_START;
592 BEGIN( DocBlock );
593 }
594<SkipCurly>{CPPC}"!" {
595 yyextra->CCodeBuffer += yytext;
596 yyextra->docBlockContext = YY_START;
597 BEGIN( DocLine );
598 }
599<SkipCurly>{CPPC}"/"/[^/] {
600 yyextra->CCodeBuffer += yytext;
601 yyextra->docBlockContext = YY_START;
602 BEGIN( DocLine );
603 }
604
605<SkipCurly>\n {
606 yyextra->CCodeBuffer += yytext;
607 yyextra->yyLineNr++;
608 if (yyextra->curlyCount<=0)
609 {
611 BEGIN(RulesPattern);
612 }
613 }
614<SkipString>\\. {
615 yyextra->CCodeBuffer += yytext;
616 }
617<SkipString>\" {
618 yyextra->CCodeBuffer += yytext;
619 BEGIN( yyextra->lastStringContext );
620 }
621<SkipString>{CCS}|{CCE}|{CPPC} {
622 yyextra->CCodeBuffer += yytext;
623 }
624<SkipString>\n {
625 yyextra->CCodeBuffer += yytext;
626 yyextra->yyLineNr++;
627 }
628<SkipString>. {
629 yyextra->CCodeBuffer += yytext;
630 }
631<SkipCxxComment>.*"\\\n" { // line continuation
632 yyextra->CCodeBuffer += yytext;
633 yyextra->yyLineNr++;
634 }
635<SkipCxxComment>{ANYopt}/\n {
636 yyextra->CCodeBuffer += yytext;
637 BEGIN( yyextra->lastCContext ) ;
638 }
639<Comment>{BN}+ {
640 yyextra->CCodeBuffer += yytext ;
642 }
643<Comment>{CCS} { yyextra->CCodeBuffer += yytext ; }
644<Comment>{CPPC} { yyextra->CCodeBuffer += yytext ; }
645<Comment>{CMD}("code"|"verbatim"|"iliteral") {
646 yyextra->insideCode=true;
647 yyextra->CCodeBuffer += yytext ;
648 }
649<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
650 yyextra->insideCode=false;
651 yyextra->CCodeBuffer += yytext ;
652 }
653<Comment>[^ \.\t\r\n\/\*]+ { yyextra->CCodeBuffer += yytext ; }
654<Comment>{CCE} {
655 yyextra->CCodeBuffer += yytext ;
656 if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
657 }
658<Comment>. { yyextra->CCodeBuffer += *yytext ; }
659
660<SkipComment>{CPPC}|{CCS} {
661 yyextra->CCodeBuffer += yytext;
662 }
663<SkipComment>[^\*\n]+ {
664 yyextra->CCodeBuffer += yytext;
665 }
666<SkipComment>\n {
667 yyextra->CCodeBuffer += yytext;
668 yyextra->yyLineNr++;
669 }
670<SkipComment>{B}*{CCE} {
671 yyextra->CCodeBuffer += yytext;
672 BEGIN( yyextra->lastCContext );
673 }
674<SkipComment>"*" {
675 yyextra->CCodeBuffer += yytext;
676 }
677<RawString>{RAWEND} {
678 yyextra->CCodeBuffer += yytext;
680 {
681 BEGIN(yyextra->lastRawStringContext);
682 }
683 }
DString extractEndRawStringDelimiter(const char *rawEnd)
684<RawString>[^)\n]+ {
685 yyextra->CCodeBuffer += yytext;
686 }
687<RawString>. {
688 yyextra->CCodeBuffer += yytext;
689 }
690<RawString>\n {
691 yyextra->CCodeBuffer += yytext;
692 yyextra->yyLineNr++;
693 }
694
695
696
697<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? { // continuation of multiline C++-style comment
698 yyextra->CCodeBuffer += yytext;
700 }
701<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" { // ignore marker line (see bug700345)
702 yyextra->CCodeBuffer += yytext;
703 BEGIN( yyextra->docBlockContext );
704 }
705<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" { // next line is an end group marker, see bug 752712
706 yyextra->CCodeBuffer += yytext;
707 BEGIN( yyextra->docBlockContext );
708 }
709<DocLine>{NONLopt}/"\n" { // whole line
710 yyextra->CCodeBuffer += yytext;
711 BEGIN( yyextra->docBlockContext );
712 }
713
714
715
716<DocBlock>"*"*{CCE} { // end of comment block
717 yyextra->CCodeBuffer += yytext;
718 BEGIN(yyextra->docBlockContext);
719 }
720<DocBlock>^{B}*"*"+/[^/] {
721 yyextra->CCodeBuffer += yytext;
722 }
723<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] { // start of a comment line
724 yyextra->CCodeBuffer += yytext;
725 }
726<DocBlock>^{B}*({CPPC}){B}* { // strip embedded C++ comments if at the start of a line
727 yyextra->CCodeBuffer += yytext;
728 }
729<DocBlock>{CPPC} { // slashes in the middle of a comment block
730 yyextra->CCodeBuffer += yytext;
731 }
732<DocBlock>{CCS} { // start of a new comment in the
733
734 yyextra->CCodeBuffer += yytext;
735 }
736<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] { // escaped command
737 yyextra->CCodeBuffer += yytext;
738 }
739<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
740 yyextra->CCodeBuffer += yytext;
741 yyextra->docBlockName=&yytext[1];
742 if (yyextra->docBlockName.at(1)=='[')
743 {
744 yyextra->docBlockName.at(1)=']';
745 }
746 if (yyextra->docBlockName.at(1)=='{')
747 {
748 yyextra->docBlockName.at(1)='}';
749 }
750 if (yyextra->docBlockName.at(1)=='(')
751 {
752 yyextra->docBlockName.at(1)=')';
753 }
754 yyextra->fencedSize=0;
755 yyextra->nestedComment=false;
756 BEGIN(DocCopyBlock);
757 }
758<DocBlock>{B}*"<"{PRE}">" {
759 yyextra->CCodeBuffer += yytext;
760 yyextra->docBlockName="<pre>";
761 yyextra->fencedSize=0;
762 yyextra->nestedComment=false;
763 BEGIN(DocCopyBlock);
764 }
765<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!)
766 yyextra->CCodeBuffer += yytext;
767 yyextra->docBlockName="uml";
768 yyextra->fencedSize=0;
769 yyextra->nestedComment=false;
770 BEGIN(DocCopyBlock);
771 }
772<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
773 yyextra->CCodeBuffer += yytext;
774 yyextra->docBlockName=&yytext[1];
775 yyextra->fencedSize=0;
776 yyextra->nestedComment=false;
777 BEGIN(DocCopyBlock);
778 }
779<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
780 yyextra->CCodeBuffer += yytext;
782 yyextra->docBlockName="~~~";
784 yyextra->nestedComment=false;
785 BEGIN(DocCopyBlock);
786 }
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
size_t length() const
Returns the length of the string, not counting the 0-terminator.
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
787<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
788 yyextra->CCodeBuffer += yytext;
790 yyextra->docBlockName="```";
792 yyextra->nestedComment=false;
793 BEGIN(DocCopyBlock);
794 }
795<DocBlock>{B}*"<code>" {
796 REJECT;
797 }
798<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
799 yyextra->CCodeBuffer += yytext;
800 }
801<DocBlock>\n { // newline
802 yyextra->CCodeBuffer += yytext;
804 }
805<DocBlock>. { // command block
806 yyextra->CCodeBuffer += yytext;
807 }
808
809
810<DocCopyBlock>"</"{PRE}">" { // end of a <pre> block
811 yyextra->CCodeBuffer += yytext;
812 if (yyextra->docBlockName=="<pre>")
813 {
814 BEGIN(DocBlock);
815 }
816 }
817<DocCopyBlock>"</"{CODE}">" { // end of a <code> block
818 yyextra->CCodeBuffer += yytext;
819 if (yyextra->docBlockName=="<code>")
820 {
821 BEGIN(DocBlock);
822 }
823 }
824<DocCopyBlock>{CMD}("f$"|"f]"|"f}"|"f)") {
825 yyextra->CCodeBuffer += yytext;
826 if (yyextra->docBlockName==&yytext[1])
827 {
828 BEGIN(DocBlock);
829 }
830 }
831<DocCopyBlock>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
832 yyextra->CCodeBuffer += yytext;
833 if (&yytext[4]==yyextra->docBlockName)
834 {
835 BEGIN(DocBlock);
836 }
837 }
838<DocCopyBlock>^{B}*"*"+/{BN}+ { // start of a comment line
839 yyextra->CCodeBuffer += yytext;
840 if ((yyextra->docBlockName=="verbatim") || (yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
841 {
842 REJECT;
843 }
844 else
845 {
846 yyextra->CCodeBuffer += yytext;
847 }
848 }
849<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* { // start of a comment line with two *'s
850 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
851 {
852 yyextra->CCodeBuffer += yytext;
853 }
854 else
855 {
856 REJECT;
857 }
858 }
859<DocCopyBlock>^{B}*"*"+/({ID}|"(") { // Assume *var or *(... is part of source code (see bug723516)
860 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
861 {
862 yyextra->CCodeBuffer += yytext;
863 }
864 else
865 {
866 REJECT;
867 }
868 }
869<DocCopyBlock>^{B}*"*"+/{BN}* { // start of a comment line with one *
870 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
871 {
872 if (yyextra->nestedComment)
873 {
874 yyextra->CCodeBuffer += yytext;
875 }
876 else
877 {
878 yyextra->CCodeBuffer += yytext;
879 }
880 }
881 else
882 {
883 REJECT;
884 }
885 }
886<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
887 yyextra->CCodeBuffer += yytext;
890 {
891 BEGIN(DocBlock);
892 }
893 }
894<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
895 yyextra->CCodeBuffer += yytext;
898 {
899 BEGIN(DocBlock);
900 }
901 }
902<DocCopyBlock>[^<@/\*\]~\$\\\n]+ { // any character that is not special
903 yyextra->CCodeBuffer += yytext;
904 }
905<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
906 if (yytext[1]=='*')
907 {
908 yyextra->nestedComment=true;
909 }
910 else if (yytext[0]=='*')
911 {
912 yyextra->nestedComment=false;
913 }
914 yyextra->CCodeBuffer += yytext;
915 }
916<DocCopyBlock>\n { // newline
917 yyextra->CCodeBuffer += yytext;
919 }
920<DocCopyBlock>. { // any other character
921 yyextra->CCodeBuffer += yytext;
922 }
923<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" { // desc is followed by another one
924 yyextra->docBlockContext = SkipCurlyEndDoc;
925 yyextra->CCodeBuffer += yytext;
926 if (yytext[yyleng-3]=='/')
927 {
928 BEGIN( DocLine );
929 }
930 else
931 {
932 BEGIN( DocBlock );
933 }
934 }
935<SkipCurlyEndDoc>"}" {
936 yyextra->CCodeBuffer += yytext;
937 BEGIN(SkipCurly);
938 }
939
940<UserSection>.*{nl} {
941 yyextra->CCodeBuffer += yytext;
942 yyextra->yyLineNr++;
943 }
944
945<*>. { fprintf(stderr,"Lex code scanner Def rule for %s: #%s#\n",stateToString(YY_START),yytext);}
946<*>{nl} { fprintf(stderr,"Lex code scanner Def rule for newline %s: #%s#\n",stateToString(YY_START),yytext); yyextra->yyLineNr++;}
947 */
948<*><<EOF>> {
951 }
952%%